#if !defined(PS_ARRAY_H)
#define PS_ARRAY_H

/** \file psArray.h
 *  \brief Support for void* arrays
 *  \ingroup DataGroup
 */

/** An array of pointers to void */
typedef struct {
    const int n;                        ///< size of array 
    const int nalloc;                   ///< allocated data block
    void **data;                        ///< pointer to data block
} psArray;

/** Functions **************************************************************/
/** \addtogroup DataGroup Data Utilities
 *  \{
 */

/** Constructor */
psArray *psArrayAlloc(int nalloc	///< Number to allocate
    );
/** Reallocator */
psArray *psArrayRealloc(const psArray *array, ///< Array to stretch
			int nalloc	///< New number to be allocated
    );

/** Sort an array */
psArray *psArraySort(psArray *array,	///< Array to sort
		     int (*compare)(const void **a, const void **b) ///< Comparison function
    );


#endif
