/** @page page_aryTplt  Array Template

Template for a dynamic array of values

Since C doesn't have templates I'm using this macro for array's of objects.
For arrays of pointers to objects use ptrAryTplt.h 

To use this (example of an array of ints):

\code
//In some header file ...
#define S int_ary
#define C IntAry
#define T int

#include "aryTplt.h"

#undef S
#undef C
#undef T

\endcode

The resulting code is type safe, after macro substitutions this will be
 
\code
typedef struct int_ary{
	int num;
	int* pAry;
	int (*append)(struct int_ary* pThis, int item);
	int (*rm)(struct int_ary* pThis, int idx);
	void (*del)(struct int_ary* pThis);
} IntAry;

IntAry* newIntAry()
 
\endcode

To generate the corresponding funciton bodies one must do the following
in a source file:

\code
//In some source file

#define C IntAry
#define T int

#include "aryTplt.c"

#undef C
#undef T
\endcode

Structures require an additional step.  Since structures cannot be compared
directly in C, a equals function must be defined in the C file.  Say for
example our type T is:

@code
typedef struct pair{ int one, int two} Pair;
@endcode

Then the macro @a EQUALS must be @#define'ed.  The following C file illustrates
how to instantiate the array template for a dynamic array of @c Pair structures.
@code

//In some source file

#define C PairAry
#define T Pair

#define EQUALS(a, b)  ( (a.one == b.one)&&(a.two == b.two) )

#include "aryTplt.c"

#undef EQUALS
#undef C
#undef T		
@endcode


@todo This code could be made much more efficient if one were able to pre-allocate
space, but still grow if that space were exceeded.
*/
