Go to the first, previous, next, last section, table of contents.


CNArray<type> -- 1-dimensional Arrays of other <Type>s

DESCRIPTION

CNCL currently provides array classes for the data types char, double, float, int, long, and CNObject * with the classes CNArrayChar, CNArrayDouble, CNArrayFloat, CNArrayInt, CNArrayLong, and CNArrayObject respectively.

All CNCL compatible objects can be stored in a CNArrayObject, thus that there is no need for specialized array types.

Nevertheless it is possible to generate arrays of other data types with the CNarray script.

Usage:

CNarray name

The required parameter is the name of the data type. CNarray generates two files ArrayName.h and ArrayName.c with the definition and implementation of the desired array class.

Please note that name must be a single word, pointers and references are not allowed, either. If you need an array of pointers or e.g. an array of unsigned long, you can use an appropiate typedef:

typedef unsigned long ulong;
typedef Data *DataP;

and then generate an array

CNarray ulong
CNarray DataP

yielding the classes CNArrayUlong and CNArrayDataP.


Go to the first, previous, next, last section, table of contents.