Puma Reference Manual Puma: Puma::CTypeArray Class Reference



Puma::CTypeArray Class Reference

Type of an array. More...

#include <Puma/CTypeInfo.h>

Inherits Puma::CTypeInfo.

Inherited by Puma::CTypeVarArray.

List of all members.

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.
CTypeQualifiedQualifiers () 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.
CTypeTemplateParamDepDim () 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.

Detailed Description

Type of an array.

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

Constructor & Destructor Documentation

Puma::CTypeArray::CTypeArray ( CTypeInfo base,
CTypeQualified quals,
CTypeInfo::TypeId  id 
) [inline, protected]

Constructor.

Parameters:
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.

Parameters:
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.


Member Function Documentation

CTypeTemplateParam * Puma::CTypeArray::DepDim (  )  const [inline]

Get the template parameter information if the dimension of the array depends on a template parameter.

Returns:
The template parameter or NULL.
void Puma::CTypeArray::DepDim ( CTypeTemplateParam param  )  [inline]

Set the template parameter information if the dimension of the array depends on this template parameter.

Parameters:
param The template parameter.
long int Puma::CTypeArray::Dimension (  )  const [inline]

Get the dimension of the array.

Reimplemented from Puma::CTypeInfo.

void Puma::CTypeArray::Dimension ( long int  dim  )  [inline]

Set the dimension of the array.

Parameters:
dim The dimension.
bool Puma::CTypeArray::hasDimension (  )  const [inline]

Check if the array has a constant dimension.

void Puma::CTypeArray::hasDimension ( bool  constant  )  [inline]

Set whether the array was declared with a constant dimension.

Parameters:
constant Array has constant dimension.
bool Puma::CTypeArray::isFixed (  )  const [inline]

Check if the array has a fixed length.

void Puma::CTypeArray::isFixed ( bool  fixed  )  [inline]

Set whether the array has a fixed length.

Parameters:
fixed Has fixed length.
CTypeQualified * Puma::CTypeArray::Qualifiers (  )  const [inline]

Get the array type qualifiers.




Puma Reference Manual. Created on 24 Nov 2009.