Index: trunk/psLib/src/collections/psArray.h
===================================================================
--- trunk/psLib/src/collections/psArray.h	(revision 486)
+++ trunk/psLib/src/collections/psArray.h	(revision 493)
@@ -8,6 +8,6 @@
  *  @author Ross Harman, MHPCC
  *   
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-04-21 00:40:32 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-04-21 18:53:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -35,16 +35,16 @@
  */
 typedef enum {
-    PS_TYPE_CHAR,   ///< Character.
-    PS_TYPE_SHORT,   ///< Short integer.
-    PS_TYPE_INT,   ///< Integer.
-    PS_TYPE_LONG,   ///< Long integer.
-    PS_TYPE_UCHAR,   ///< Unsigned character.
-    PS_TYPE_USHORT,   ///< Unsigned short integer.
-    PS_TYPE_UINT,   ///< Unsigned integer.
-    PS_TYPE_ULONG,   ///< Unsigned long integer.
-    PS_TYPE_FLOAT,   ///< Floating point.
-    PS_TYPE_DOUBLE,   ///< Double-precision floating point.
-    PS_TYPE_COMPLEX,  ///< Complex numbers consisting of floating point.
-    PS_TYPE_OTHER,   ///< Something else that's not supported for arithmetic.
+    PS_TYPE_CHAR,       ///< Character.
+    PS_TYPE_SHORT,      ///< Short integer.
+    PS_TYPE_INT,        ///< Integer.
+    PS_TYPE_LONG,       ///< Long integer.
+    PS_TYPE_UCHAR,      ///< Unsigned character.
+    PS_TYPE_USHORT,     ///< Unsigned short integer.
+    PS_TYPE_UINT,       ///< Unsigned integer.
+    PS_TYPE_ULONG,      ///< Unsigned long integer.
+    PS_TYPE_FLOAT,      ///< Floating point.
+    PS_TYPE_DOUBLE,     ///< Double-precision floating point.
+    PS_TYPE_COMPLEX,    ///< Complex numbers consisting of floating point.
+    PS_TYPE_OTHER,      ///< Something else that's not supported for arithmetic.
 } psElemType;
 
@@ -55,9 +55,9 @@
  */
 typedef enum {
-    PS_DIMEN_SCALAR,  ///< Scalar.
-    PS_DIMEN_VECTOR,  ///< Vector.
-    PS_DIMEN_TRANSV,  ///< Transposed vector.
-    PS_DIMEN_IMAGE,   ///< Image.
-    PS_DIMEN_OTHER   ///< Something else that's not supported for arithmetic.
+    PS_DIMEN_SCALAR,    ///< Scalar.
+    PS_DIMEN_VECTOR,    ///< Vector.
+    PS_DIMEN_TRANSV,    ///< Transposed vector.
+    PS_DIMEN_IMAGE,     ///< Image.
+    PS_DIMEN_OTHER      ///< Something else that's not supported for arithmetic.
 } psDimen;
 
@@ -70,6 +70,6 @@
 typedef struct
 {
-    psElemType type;  ///< Primitive type.
-    psDimen dimen;   ///< Dimensionality.
+    psElemType type;    ///< Primitive type.
+    psDimen dimen;      ///< Dimensionality.
 }
 psType;
@@ -78,18 +78,4 @@
  *
  * Struct for maintaining an array of integer numbers.
- *
- */
-typedef struct
-{
-    psType type;    ///< Type of data. THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
-    int nalloc;  ///< Total number of elements available.
-    int n;   ///< Number of elements in use.
-    int *arr;  ///< Array data.
-}
-psIntArray;
-
-/** An array of floats.
- *
- * Struct for maintaining an array of floating point numbers.
  *
  */
@@ -99,4 +85,18 @@
     int nalloc;     ///< Total number of elements available.
     int n;          ///< Number of elements in use.
+    int *arr;       ///< Array data.
+}
+psIntArray;
+
+/** An array of floats.
+ *
+ * Struct for maintaining an array of single precision floating point numbers.
+ *
+ */
+typedef struct
+{
+    psType type;    ///< Type of data.
+    int nalloc;     ///< Total number of elements available.
+    int n;          ///< Number of elements in use.
     float *arr;     ///< Array data.
 }
@@ -110,5 +110,5 @@
 typedef struct
 {
-    psType type;    ///< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
+    psType type;    ///< Type of data.
     int nalloc;     ///< Total number of elements available.
     int n;          ///< Number of elements in use.
@@ -117,4 +117,34 @@
 psDoubleArray;
 
+/** An array of complex numbers.
+ *
+ * Struct for maintaining an array of single precision floating point complex numbers.
+ *
+ */
+typedef struct
+{
+    psType type;        ///< Type of data.
+    int nalloc;         ///< Total number of elements available.
+    int n;              ///< Number of elements in use
+    complex float *arr; ///< Array data.
+}
+psComplexArray;
+
+/** An array of void pointers.
+ *
+ * Struct for maintaining an array of void pointers. This struct needs a deallocation function that accepts
+ * deallocation of the array elements.
+ *
+ */
+typedef struct
+{
+    psType type;    ///< Type of data.
+    int nalloc;     ///< Number of total elements.
+    int n;          ///< Number of elements in use.
+    void **arr;     ///< Aray data.
+}
+psVoidPtrArray;
+
+
 /*****************************************************************************/
 /* FUNCTION PROTOTYPES                                                       */
@@ -127,5 +157,5 @@
  */
 psIntArray *psIntArrayAlloc(
-    int nalloc  ///< Total number of elements to make available
+    int nalloc  ///< Total number of elements to make available.
 );
 
@@ -149,5 +179,5 @@
  */
 void psIntArrayFree(
-    psIntArray *restrict myArray    ///< Array to free
+    psIntArray *restrict psArr  ///< Array to free.
 );
 
@@ -168,9 +198,9 @@
  */
 psFloatArray *psFloatArrayRealloc(
-    psFloatArray *myArray,  ///< Array to reallocate.
+    psFloatArray *psArr,  ///< Array to reallocate.
     int nalloc              ///< Total number of elements to make available.
 );
 
-/** Deallocate a float array
+/** Deallocate a float array.
  *
  * Uses psLib memory allocation functions to deallocate an array of floats as defined by the psFloatArray 
@@ -179,8 +209,8 @@
  */
 void psFloatArrayFree(
-    psFloatArray *restrict myArray  ///< Array to free
-);
-
-/** Allocate a Double array.
+    psFloatArray *restrict myArray  ///< Array to free.
+);
+
+/** Allocate a double array.
  *
  * Uses psLib memory allocation functions to create an array of doubles as defined by the psDoubleArray 
@@ -192,5 +222,5 @@
 );
 
-/** Reallocate a Double array.
+/** Reallocate a double array.
  *
  * Uses psLib memory allocation functions to reallocate an array of Doubles as defined by the psDoubleArray 
@@ -199,9 +229,9 @@
  */
 psDoubleArray *psDoubleArrayRealloc(
-    psDoubleArray *myArray, ///< Array to reallocate.
+    psDoubleArray *psArr, ///< Array to reallocate.
     int nalloc              ///< Total number of elements to make available.
 );
 
-/** Deallocate a Double array
+/** Deallocate a double array.
  *
  * Uses psLib memory allocation functions to deallocate an array of doubles as defined by the psDoubleArray 
@@ -210,69 +240,68 @@
  */
 void psDoubleArrayFree(
-    psDoubleArray *restrict myArray  ///< Array to free
-);
-
-
-
-
-
-
-
-
-/** An array of complex numbers.
- *
- * Struct for maintaining an array of complex numbers.
- *
- */
-typedef struct
-{
-    psType type;  ///< Type of data. THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
-    int size;   ///< Total number of elements available.
-    int n;    ///< Number of elements in use
-    complex float *arr; ///< Array data.
-}
-psComplexArray;
-
-/** Constructor \ingroup DataGroup */
-psComplexArray *psComplexArrayAlloc(int nalloc) ///< Total number of elements to make available
+    psDoubleArray *restrict psArr  ///< Array to free.
+);
+
+/** Allocate a complex array.
+ *
+ * Uses psLib memory allocation functions to create an array of single precision floating point complex
+ * numbers as defined by the psComplexArray struct.
+ *
+ */
+psComplexArray *psComplexArrayAlloc(int nalloc) ///< Total number of elements to make available.
 ;
 
-/** Reallocator \ingroup DataGroup */
-psComplexArray *psComplexArrayRealloc(psComplexArray *myArray, ///< Array to reallocate
-                                      int nalloc) ///< Total number of elements to make available
-;
-
-/** Destructor \ingroup DataGroup */
-void psComplexArrayFree(psComplexArray *restrict myArray) ///< Array to free
-;
-
-
-
-
-/** Array of pointers to void.
- *  psVoidPtrArray is special, as it needs to have a destructor that
- *  accepts a destructor for the array elements
- */
-typedef struct
-{
-    int n;    ///< Number of elements in use
-    int nalloc;    ///< Number of total elements
-    void **arr;    ///< The elements
-}
-psVoidPtrArray;
-
-/** Constructor \ingroup DataGroup */
-psVoidPtrArray *psVoidPtrArrayAlloc(int nalloc) ///< Number of elements to use
-;
-
-/** Reallocate \ingroup DataGroup */
-psVoidPtrArray *psVoidPtrArrayRealloc(psVoidPtrArray *arr, ///< Array to reallocate
-                                      int nalloc) ///< Number of elements
-;
-
-/** Destructor \ingroup DataGroup */
-void psVoidPtrArrayFree(psVoidPtrArray *arr, ///< array to destroy
-                        void (*elemFree)(void *)) ///< destructor for array data
-;
+/** Reallocate a complex array.
+ *
+ * Uses psLib memory allocation functions to reallocate an array of single precision floating point complex
+ * numbers as defined by the psComplexArray struct.
+ *
+ */
+psComplexArray *psComplexArrayRealloc(
+    psComplexArray *myArray,    ///< Array to reallocate.
+    int nalloc                  ///< Total number of elements to make available.
+);
+
+/** Deallocate a complex array.
+ *
+ * Uses psLib memory allocation functions to deallocate an array of single precision floating point complex
+ * numbers as defined by the psComplexArray struct.
+ *
+ */
+void psComplexArrayFree(
+    psComplexArray *restrict psArr  ///< Array to free.
+);
+
+/** Allocate a void pointer array.
+ *
+ * Uses psLib memory allocation functions to create an array of void pointers as defined by the psVoidPtrArray
+ * struct.
+ *
+ */
+psVoidPtrArray *psVoidPtrArrayAlloc(
+    int nalloc  ///< Number of elements to use.
+);
+
+/** Reallocate a void pointer array.
+ *
+ * Uses psLib memory allocation functions to reallocate an array of void pointers as defined by the 
+ * psVoidPtrArray struct.
+ *
+ */
+psVoidPtrArray *psVoidPtrArrayRealloc(
+    psVoidPtrArray *psArr,  ///< Array to reallocate.
+    int nalloc              ///< Number of elements.
+);
+
+/** Deallocate a void pointer array.
+ *
+ * Uses psLib memory allocation functions to deallocate an array of void pointers as defined by the 
+ * psVoidPtrArray struct.
+ *
+ */
+void psVoidPtrArrayFree(
+    psVoidPtrArray *restrict psArr,     ///< Array to destroy.
+    void (*elemFree)(void *)            ///< Callback function responsible for removing array data.
+);
 
 #endif
