Puma Reference Manual | Puma: Puma::CTypeQualified Class Reference |
Type qualification. More...
#include <Puma/CTypeInfo.h>
Public Member Functions | |
CTypeQualified (CTypeInfo *base, bool c, bool v, bool r) | |
Constructor. | |
~CTypeQualified () | |
Destructor. | |
bool | isConst () const |
Check if the type has qualifier const. | |
bool | isVolatile () const |
Check if the type has qualifier volatile. | |
bool | isRestrict () const |
Check if the type has qualifier restrict. | |
void | isConst (bool v) |
Set whether the type has qualifier const. | |
void | isVolatile (bool v) |
Set whether the type has qualifier volatile. | |
void | isRestrict (bool v) |
Set whether the type has qualifier restrict. | |
Protected Member Functions | |
CTypeQualified (CTypeInfo *base, bool c, bool v, bool r, TypeId id) | |
Constructor. |
Type qualification.
There are three type qualifier: const, volatile, and restrict. Examples:
const int i = 0; // i has type 'const int' // type structure: // CTypeQualified const // CTypePrimitive int char * const s = 0; // s has type 'const pointer to char' // type structure: // CTypeQualified const // CTypePointer // CTypePrimitive char
Puma::CTypeQualified::CTypeQualified | ( | CTypeInfo * | base, |
bool | c, | ||
bool | v, | ||
bool | r, | ||
CTypeInfo::TypeId | id | ||
) | [inline, protected] |
Constructor.
base | The base type. |
c | Type has qualifier const. |
v | Type has qualifier volatile. |
r | Type has qualifier restrict. |
id | The type identifier. |
Puma::CTypeQualified::CTypeQualified | ( | CTypeInfo * | base, |
bool | c, | ||
bool | v, | ||
bool | r | ||
) | [inline] |
Constructor.
Type has id CTypeInfo::TYPE_QUALIFIED.
base | The base type. |
c | Type has qualifier const. |
v | Type has qualifier volatile. |
r | Type has qualifier restrict. |
Puma::CTypeQualified::~CTypeQualified | ( | ) | [inline] |
Destructor.
bool Puma::CTypeQualified::isConst | ( | ) | const [inline] |
Check if the type has qualifier const.
Reimplemented from Puma::CTypeInfo.
void Puma::CTypeQualified::isConst | ( | bool | v | ) | [inline] |
Set whether the type has qualifier const.
v | True if qualified. |
void Puma::CTypeQualified::isRestrict | ( | bool | v | ) | [inline] |
Set whether the type has qualifier restrict.
v | True if qualified. |
bool Puma::CTypeQualified::isRestrict | ( | ) | const [inline] |
Check if the type has qualifier restrict.
Reimplemented from Puma::CTypeInfo.
bool Puma::CTypeQualified::isVolatile | ( | ) | const [inline] |
Check if the type has qualifier volatile.
Reimplemented from Puma::CTypeInfo.
void Puma::CTypeQualified::isVolatile | ( | bool | v | ) | [inline] |
Set whether the type has qualifier volatile.
v | True if qualified. |