Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

RmUtilTable.h

00001 //============================================================================//
00002 // filename: RmUtilTable.h                                                    //
00003 //                                                                            //
00004 // author:                                                                    //
00005 //           ATI Research, Inc.                                               //
00006 //           3D Application Research Group                                    //
00007 //                                                                            //
00008 // description: RenderMonkey Table utility                                    //
00009 //                                                                            //
00010 //============================================================================//
00011 //  ( C ) 2002 ATI Research, Inc.  All rights reserved.                       //
00012 //============================================================================//
00013 
00014 #ifndef __RMUTIL_TABLE_H__
00015 #define __RMUTIL_TABLE_H__
00016 
00017 #pragma pack(push)
00018 #pragma pack(1)
00019 
00020 typedef struct
00021 {
00022    union                                                          
00023    {                                                              
00024       vector_t    dataVector;
00025       struct                                                      
00026       {                                                           
00027          int      dataCount;                                    
00028          int      dataAlloc;                                    
00029          int      dataSize;                                     
00030          int      (*dataCompare)(const void*, const void*);     
00031          char     *data;                                           
00032       };                                                          
00033    };
00034    
00035    union                                                          
00036    {                                                              
00037       vector_t    indexVector;
00038       struct                                                      
00039       {                                                           
00040          int      indexCount;                                    
00041          int      indexAlloc;                                    
00042          int      indexSize;                                     
00043          int      (*indexCompare)(const void*, const void*);     
00044          int      *nIndex;                                           
00045       };                                                          
00046    };
00047    
00048    union                                                          
00049    {                                                              
00050       vector_t    emptyVector;
00051       struct                                                      
00052       {                                                           
00053          int      emptyCount;                                    
00054          int      emptyAlloc;                                    
00055          int      emptySize;                                     
00056          int      (*emptyCompare)(const void*, const void*);     
00057          int      *empty;                                           
00058       };                                                          
00059    };
00060                                            
00061 } RmTable;
00062 
00063 #pragma pack(pop)
00064 
00065 RMUTIL_API void RmTableInit(RmTable* table, int size);
00066 RMUTIL_API void RmTableAddElement(RmTable* table, void* element, int nIndex, int append);
00067 RMUTIL_API void RmTableRemoveIndex(RmTable* table, int nIndex);
00068 RMUTIL_API void RmTableClear(RmTable* table);
00069 RMUTIL_API void RmTableFree(RmTable* table);
00070 
00071 #endif

Generated on Fri Feb 25 16:08:42 2005 for RenderMonkey SDK by doxygen 1.3.6