• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

spl/collection/carray.h

00001 #error "Plain Old C no longer supported"
00002 
00003 
00004 //~ #ifndef _array_h
00005 //~ #define _array_h
00006 
00007 //~ #ifdef _WIN32
00008 //~ #include <spl/configwin32.h>
00009 //~ #endif
00010 //~ #include <spl/types.h>
00011 
00012 //~ #ifdef __cplusplus
00013 //~ extern "C" {
00014 //~ #endif
00015 
00016 //~ typedef struct _darray
00017 //~ {
00018         //~ char *data;
00019         //~ int size;
00020         //~ int elementsize;
00021 //~ } darray;
00022 
00023 //~ darray *arrayConstruct( const int size, const int elementsize );
00024 //~ darray *arrayConstructDup( const darray *a );
00025 //~ void arrayDestruct( darray *a );
00026 //~ bool arraySetElement( darray *a, void *e, const int pos );
00027 //~ void arrayRemoveElementAt( darray *a, const int pos );
00028 //~ #ifdef DEBUG2
00029 //~ void *arrayGetElement( const darray *a, const int pos );
00030 //~ #else
00031 //~ #define arrayGetElement(a,pos) (( (pos) >= (a)->size ) ? NULL : &(a)->data[(pos) * (a)->elementsize])
00032 //~ #endif
00033 
00034 //~ int arrayCapacity( const darray *a );
00035 
00036 //~ #if defined( DEBUG ) || defined( _DEBUG )
00037 //~ void arrayValidateMem( const darray *a );
00038 //~ void arrayCheckMem( const darray *a );
00039 //~ #else
00040 //~ #define arrayValidateMem(a)
00041 //~ #define arrayCheckMem(a)
00042 //~ #endif
00043 
00044 //~ #ifdef __cplusplus
00045 //~ }
00046 //~ #endif
00047 
00048 //~ #endif