Puma Reference Manual | Puma: Puma::CTypeArray Class Reference |
#include <Puma/CTypeInfo.h>
Examples:
int i[10]; // i has type 'array of int' // type structure: // CTypeArray dim=10 // CTypePrimitive int char* sa[5]; // sa has type 'array of pointer to char' // type structure: // CTypeArray dim=5 // CTypePointer // CTypePrimitive char
Public Member Functions | |
CTypeArray (CTypeInfo *base, CTypeQualified *quals=0, bool has_dimension=false) | |
Constructor. | |
~CTypeArray () | |
Destructor. | |
void | Dimension (long int dim) |
Set the dimension of the array. | |
long int | Dimension () const |
Get the dimension of the array. | |
void | hasDimension (bool constant) |
Set whether the array was declared with a constant dimension. | |
bool | hasDimension () const |
Check if the array has a constant dimension. | |
void | isFixed (bool fixed) |
Set whether the array has a fixed length. | |
bool | isFixed () const |
Check if the array has a fixed length. | |
CTypeQualified * | Qualifiers () const |
Get the array type qualifiers. | |
void | DepDim (CTypeTemplateParam *param) |
Set the template parameter information if the dimension of the array depends on this template parameter. | |
CTypeTemplateParam * | DepDim () const |
Get the template parameter information if the dimension of the array depends on a template parameter. | |
Protected Member Functions | |
CTypeArray (CTypeInfo *base, CTypeQualified *quals, TypeId id) | |
Constructor. |
Puma::CTypeArray::CTypeArray | ( | CTypeInfo * | base, | |
CTypeQualified * | quals, | |||
CTypeInfo::TypeId | id | |||
) | [inline, protected] |
Constructor.
base | The base type of the array. | |
quals | The type qualifiers. | |
id | The type identifier. |
Puma::CTypeArray::CTypeArray | ( | CTypeInfo * | base, | |
CTypeQualified * | quals = 0 , |
|||
bool | has_dimension = false | |||
) | [inline] |
Constructor.
Type has id CTypeInfo::TYPE_ARRAY.
base | The base type of the array. | |
quals | The type qualifiers. | |
has_dimension | The array was declared with a constant dimension. |
Puma::CTypeArray::~CTypeArray | ( | ) | [inline] |
Destructor.
void Puma::CTypeArray::Dimension | ( | long int | dim | ) | [inline] |
Set the dimension of the array.
dim | The dimension. |
long int Puma::CTypeArray::Dimension | ( | ) | const [inline] |
void Puma::CTypeArray::hasDimension | ( | bool | constant | ) | [inline] |
Set whether the array was declared with a constant dimension.
constant | Array has constant dimension. |
bool Puma::CTypeArray::hasDimension | ( | ) | const [inline] |
Check if the array has a constant dimension.
void Puma::CTypeArray::isFixed | ( | bool | fixed | ) | [inline] |
Set whether the array has a fixed length.
fixed | Has fixed length. |
bool Puma::CTypeArray::isFixed | ( | ) | const [inline] |
Check if the array has a fixed length.
CTypeQualified * Puma::CTypeArray::Qualifiers | ( | ) | const [inline] |
Get the array type qualifiers.
void Puma::CTypeArray::DepDim | ( | CTypeTemplateParam * | param | ) | [inline] |
Set the template parameter information if the dimension of the array depends on this template parameter.
param | The template parameter. |
CTypeTemplateParam * Puma::CTypeArray::DepDim | ( | ) | const [inline] |
Get the template parameter information if the dimension of the array depends on a template parameter.