IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2004, 5:19:15 PM (22 years ago)
Author:
Paul Price
Message:

Doxygenation of Lupton stuff partially complete. Still need to hack some more to conform everything to coding standards.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/archive/pslib/include/psArray.h

    r181 r196  
    33
    44#include <stdlib.h>
    5 /*
     5/**
    66 * Declare TYPEArray
    77 */
     
    1919
    2020/*****************************************************************************/
    21 /*
     21/**
    2222 * Generate the code TYPEArray's constructors/destructors
    2323 */
     
    7878
    7979/*****************************************************************************/
    80 /*
    81  * Support for pointer types
     80/**
     81 * Declare array of pointers
    8282 */
    8383#define PS_DECLARE_ARRAY_PTR_TYPE(TYPE) \
     
    8585    PS_DECLARE_ARRAY_TYPE(PS_CONCAT(TYPE, Ptr))
    8686
     87/**
     88 * Create constructors/destructors for array of pointers
     89 */
    8790#define PS_CREATE_ARRAY_PTR_TYPE(TYPE); \
    8891    P_PS_CREATE_ARRAY_TYPE(static, my_, P_PS_CONCAT(TYPE, Ptr)) \
     
    117120
    118121/*****************************************************************************/
    119 /*
    120  * Declare some common types of arrays
     122/**
     123 * Array of pointers to void.
    121124 *
    122125 * psVoidPtrArray is special, as it needs to have a destructor that
     
    125128 */
    126129typedef struct {
    127    int n, size;
    128    void **arr;
     130    int n;                              //!< Number of elements in use
     131    int size;                           //!< Number of total elements
     132    void **arr;                         //!< The elements
    129133} psVoidPtrArray;
    130134
    131 psVoidPtrArray *psVoidPtrArrayAlloc(int n, int s);
    132 psVoidPtrArray *psVoidPtrArrayRealloc(psVoidPtrArray *arr, int n);
    133 void psVoidPtrArrayFree(psVoidPtrArray *arr,
    134                         void (*elemFree)(void *)); // destructor for array data
     135/** Constructor */
     136psVoidPtrArray *psVoidPtrArrayAlloc(int n, //!< Number of elements to use
     137                                    int s //!< Total number of elements
     138                                    );
     139/** Reallocate */
     140psVoidPtrArray *psVoidPtrArrayRealloc(psVoidPtrArray *arr, //!< Array to reallocate
     141                                      int n //!< Number of elements
     142                                      );
     143/** Destructor */
     144void psVoidPtrArrayFree(psVoidPtrArray *arr, //!< array to destroy
     145                        void (*elemFree)(void *) //!< destructor for array data
     146                        );
    135147
    136148
Note: See TracChangeset for help on using the changeset viewer.