Go to the previous, next section.

CNArray2Char -- char array class

SYNOPSIS

#include <CNCL/Array2Char.h>

TYPE

CN_ARRAY2CHAR

BASE CLASSES

CNArray2

DERIVED CLASSES

None

RELATED CLASSES

CNArray2Double, CNArray2Float, CNArray2Int, CNArray2Long, CNArray2Object

DESCRIPTION

Constructors:

CNArray2Char();
CNArray2Char(CNParam *param);
CNArray2Char(size_t r, size_t c, char def = 0);
Initializes the CNArray2Char and optionally sets the arraysize to r rows and c cols.

CNArray2Char(const CNArray2Char &a);
Copy constructor.

Destructor:

~CNArray2Char();
Deletes the array.

In addition to the member functions required by CNCL, CNArray2Char provides:

virtual void size(size_t r, size_t c);
Resizes the array to r rows and c cols.

void put(int r, int c, chr value);
Writes the character value to position (r, c).

char get(int r, int c) const;
Returns the character written on position (r, c).

CNArrayChar& operator[] (int index);
Access to array by operator []. The row index is returned.

CNArray2Char &operator= (const CNArray2Char &a);
Defines the operator = for the array to allow copying of arrays.

Go to the previous, next section.