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

spl/collection/intarray.h

00001 
00002 #error "Plain Old C no longer supported"
00003 
00004 //~ #ifndef _intarray_h
00005 //~ #define _intarray_h
00006 
00007 
00008 //~ #ifdef _WIN32
00009 //~ #include <spl/configwin32.h>
00010 //~ #endif
00011 
00012 //~ #include <spl/types.h>
00013 
00014 //~ #ifdef __cplusplus
00015 //~ extern "C" {
00016 //~ #endif
00017 
00018 //~ typedef struct _intarray
00019 //~ {
00020         //~ int *data;
00021         //~ int size;
00022 //~ } intarray;
00023 
00024 //~ intarray *intarrayConstruct( int size );
00025 //~ void intarrayDestruct( intarray * );
00026 //~ void intarraySetElement( intarray *a, int e, int pos );
00027 //~ int intarrayGetElement( intarray *a, int pos );
00028 //~ int intarrayCapacity( intarray *a );
00029 
00030 //~ #ifdef DEBUG
00031 //~ void intarrayValidateMem( intarray *a );
00032 //~ void intarrayCheckMem( intarray *a );
00033 //~ #else
00034 //~ #define intarrayValidateMem(a)
00035 //~ #define intarrayCheckMem(a)
00036 //~ #endif
00037 
00038 //~ struct int16array
00039 //~ {
00040         //~ int16 *data;
00041         //~ int size;
00042 //~ };
00043 
00044 //~ struct int16array *int16arrayConstruct( int size );
00045 //~ void int16arrayDestruct( struct int16array * );
00046 //~ bool int16arraySetElement( struct int16array *a, int16 e, int pos );
00047 //~ bool int16arraySet2Element( struct int16array *a, int32 e, int pos );
00048 //~ int16 int16arrayGetElement( struct int16array *a, int pos );
00049 //~ int32 int16arrayGetInt32( struct int16array *a, int pos );
00050 //~ int int16arrayCapacity( struct int16array *a );
00051 
00052 //~ #define int16arrayGetElement(a,pos) ((a)->data[(pos)])
00053 
00054 //~ #define int16arrayGetInt32(a,pos) ((int16arrayGetElement( (a), (pos) )<<16) + (uint16)int16arrayGetElement( (a), (pos)+1 ))
00055 
00056 //~ #define int16arrayCapacity(a) ((a)->size)
00057 
00058 //~ #if defined( DEBUG ) || defined( _DEBUG )
00059 //~ void int16arrayValidateMem( struct int16array *a );
00060 //~ void int16arrayCheckMem( struct int16array *a );
00061 //~ #else
00062 //~ #define int16arrayValidateMem(a)
00063 //~ #define int16arrayCheckMem(a)
00064 //~ #endif
00065 
00066 //~ #ifdef __cplusplus
00067 //~ }
00068 //~ #endif
00069 
00070 //~ #endif