Changeset 247 for trunk/archive/pslib/include/psStdArrays.h
- Timestamp:
- Mar 15, 2004, 3:20:03 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/archive/pslib/include/psStdArrays.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/archive/pslib/include/psStdArrays.h
r226 r247 2 2 #define PS_TYPES_H 3 3 4 #include <complex.h> 5 #include <stdint.h> 6 #include "psArray.h" 7 4 /** \file psStdArrays.h 5 * \brief Support for basic flat arrays 6 * \ingroup DataGroup 7 */ 8 8 9 9 /** Types of the elements of vectors, matrices, etc. */ … … 189 189 /************************************************************************************************************/ 190 190 191 /*****************************************************************************/ 192 /** Array of pointers to void. 193 * psVoidPtrArray is special, as it needs to have a destructor that 194 * accepts a destructor for the array elements 195 */ 196 typedef struct { 197 int n; //!< Number of elements in use 198 int size; //!< Number of total elements 199 void **arr; //!< The elements 200 } psVoidPtrArray; 201 202 /** Constructor */ 203 psVoidPtrArray *psVoidPtrArrayAlloc(int n, //!< Number of elements to use 204 int s //!< Total number of elements 205 ); 206 /** Reallocate */ 207 psVoidPtrArray *psVoidPtrArrayRealloc(psVoidPtrArray *arr, //!< Array to reallocate 208 int n //!< Number of elements 209 ); 210 /** Destructor */ 211 void psVoidPtrArrayFree(psVoidPtrArray *arr, //!< array to destroy 212 void (*elemFree)(void *) //!< destructor for array data 213 ); 214 215 191 216 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
