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