Mercurial > cgi-bin > hgwebdir.cgi > VMS > C_Libraries > DynArray
annotate DynArray.h @ 3:8473c52c6f0e
Changed name from Vector to DynArray
| author | Me |
|---|---|
| date | Sun, 12 Sep 2010 12:10:25 -0700 |
| parents | |
| children | f35e64d7a42b |
| rev | line source |
|---|---|
| Me@3 | 1 /* |
| Me@3 | 2 * File: Vector.h |
| Me@3 | 3 * Author: Me |
| Me@3 | 4 * |
| Me@3 | 5 * Created on May 14, 2010, 3:08 PM |
| Me@3 | 6 */ |
| Me@3 | 7 |
| Me@3 | 8 #ifndef _VECTOR_H |
| Me@3 | 9 #define _VECTOR_H |
| Me@3 | 10 |
| Me@3 | 11 //Doing one special cheat -- hiding a back-ptr in front of array |
| Me@3 | 12 typedef struct |
| Me@3 | 13 { |
| Me@3 | 14 void **arrayOfPtrs; |
| Me@3 | 15 int numPtrsInArray; |
| Me@3 | 16 int sizeOfArray; |
| Me@3 | 17 } |
| Me@3 | 18 Vector; |
| Me@3 | 19 |
| Me@3 | 20 Vector *createVect ( int32 initialSizeOfArray ); |
| Me@3 | 21 Vector *increaseSizeOfVect( Vector *vect ); |
| Me@3 | 22 bool8 addToVect ( void *ptrToAdd, Vector *vect ); |
| Me@3 | 23 bool8 removeLastInVect ( Vector *vect ); |
| Me@3 | 24 |
| Me@3 | 25 |
| Me@3 | 26 #endif /* _VECTOR_H */ |
| Me@3 | 27 |
