#include <ptlib/contain.h>
Go to the source code of this file.
Classes | |
class | PAbstractArray |
class | PBaseArray< T > |
class | PScalarArray< T > |
class | PCharArray |
Array of characters. More... | |
class | PShortArray |
Array of short integers. More... | |
class | PIntArray |
Array of integers. More... | |
class | PLongArray |
Array of long integers. More... | |
class | PBYTEArray |
Array of unsigned characters. More... | |
class | PWORDArray |
Array of unsigned short integers. More... | |
class | PUnsignedArray |
Array of unsigned integers. More... | |
Defines | |
#define | PBASEARRAY(cls, T) typedef PBaseArray<T> cls |
#define | PDECLARE_BASEARRAY(cls, T) |
#define | PSCALAR_ARRAY(cls, T) typedef PScalarArray<T> cls |
#define | PARRAY(cls, T) typedef PArray<T> cls |
#define | PDECLARE_ARRAY(cls, T) |
Functions | |
PSCALAR_ARRAY (PShortArray, short) | |
PSCALAR_ARRAY (PIntArray, int) | |
PSCALAR_ARRAY (PLongArray, long) | |
PDECLARE_BASEARRAY (PBYTEArray, BYTE) | |
PSCALAR_ARRAY (PWORDArray, WORD) | |
PSCALAR_ARRAY (PUnsignedArray, unsigned) | |
Overrides from class PObject | |
virtual void | PrintOn (ostream &strm) const |
Print the array. | |
virtual void | ReadFrom (istream &strm) |
Read the array. |
#define PARRAY | ( | cls, | |||
T | ) | typedef PArray<T> cls |
#define PBASEARRAY | ( | cls, | |||
T | ) | typedef PBaseArray<T> cls |
#define PDECLARE_ARRAY | ( | cls, | |||
T | ) |
Value:
PARRAY(cls##_PTemplate, T); \ PDECLARE_CLASS(cls, cls##_PTemplate) \ protected: \ inline cls(int dummy, const cls * c) \ : cls##_PTemplate(dummy, c) { } \ public: \ inline cls(PINDEX initialSize = 0) \ : cls##_PTemplate(initialSize) { } \ virtual PObject * Clone() const \ { return PNEW cls(0, this); } \
#define PDECLARE_BASEARRAY | ( | cls, | |||
T | ) |
Value:
PDECLARE_CLASS(cls, PBaseArray<T>) \ cls(PINDEX initialSize = 0) \ : PBaseArray<T>(initialSize) { } \ cls(T const * buffer, PINDEX length, PBoolean dynamic = PTrue) \ : PBaseArray<T>(buffer, length, dynamic) { } \ virtual PObject * Clone() const \ { return PNEW cls(*this, GetSize()); } \
If the compilation is using templates then this macro produces a descendent of the PBaseArray# template class. If templates are not being used then the macro defines a set of inline functions to do all casting of types. The resultant classes have an identical set of functions in either case.
See the PBaseArray# and PAbstractArray# classes for more information.
#define PSCALAR_ARRAY | ( | cls, | |||
T | ) | typedef PScalarArray<T> cls |
PDECLARE_BASEARRAY | ( | PBYTEArray | , | |
BYTE | ||||
) |
virtual void PrintOn | ( | ostream & | strm | ) | const [virtual] |
Print the array.
strm | Stream to output to. |
PSCALAR_ARRAY | ( | PUnsignedArray | , | |
unsigned | ||||
) |
PSCALAR_ARRAY | ( | PWORDArray | , | |
WORD | ||||
) |
PSCALAR_ARRAY | ( | PLongArray | , | |
long | ||||
) |
PSCALAR_ARRAY | ( | PIntArray | , | |
int | ||||
) |
PSCALAR_ARRAY | ( | PShortArray | , | |
short | ||||
) |
virtual void ReadFrom | ( | istream & | strm | ) | [virtual] |
Read the array.
strm | Stream to read the objects contents from. |