Main Page   Data Structures   File List   Data Fields   Globals  

ds_vector.h

Go to the documentation of this file.
00001 #ifndef __DS_VECTOR_H__
00002 #define __DS_VECTOR_H__
00003 
00004 #include "ds_common.h"
00005 
00006 #ifdef __cplusplus
00007 extern "C" {
00008 #endif /* __cplusplus */
00009 
00011 typedef struct Vector {
00012     long lSize; 
00013     long lReserved; 
00014     long lDelta; 
00015     void **ppData; 
00016 } Vector;
00017 
00031 Vector* VectorCreate(long lSize, long lDelta);
00040 void VectorDestroy(Vector *pVec);
00060 void** VectorPushBack(Vector *pVec, void *pData);
00071 void** VectorPushFront(Vector *pVec, void *pData);
00082 void** VectorFind(Vector *pVec, void **ppIter, void *pData, bool bDirection);
00093 void** VectorSimpleFind(Vector *pVec, void *pData);
00101 void VectorRemove(Vector *pVec, void **pIter);
00111 void VectorPopBack(Vector *pVec);
00122 void VectorPopFront(Vector *pVec);
00123 
00133 #define VecOffset(vec, iter) (iter - vec->ppData)
00134 
00140 #define VecIter(vec, index) (vec->ppData + index)
00141 
00142 #ifdef __cplusplus
00143 } /* extern "C" block */
00144 #endif /* __cplusplus */
00145 
00146 #endif /* __DS_VECTOR_H__ */

Generated at Sun Sep 30 00:21:33 2001 for DSLib by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001