Puma Reference Manual Puma: Puma::CTypeQualified Class Reference



Puma::CTypeQualified Class Reference

Type qualification. More...

#include <Puma/CTypeInfo.h>

Inheritance diagram for Puma::CTypeQualified:
Inheritance graph

List of all members.

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.

Detailed Description

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

Constructor & Destructor Documentation

Puma::CTypeQualified::CTypeQualified ( CTypeInfo base,
bool  c,
bool  v,
bool  r,
CTypeInfo::TypeId  id 
) [inline, protected]

Constructor.

Parameters:
baseThe base type.
cType has qualifier const.
vType has qualifier volatile.
rType has qualifier restrict.
idThe type identifier.
Puma::CTypeQualified::CTypeQualified ( CTypeInfo base,
bool  c,
bool  v,
bool  r 
) [inline]

Constructor.

Type has id CTypeInfo::TYPE_QUALIFIED.

Parameters:
baseThe base type.
cType has qualifier const.
vType has qualifier volatile.
rType has qualifier restrict.
Puma::CTypeQualified::~CTypeQualified ( ) [inline]

Destructor.


Member Function Documentation

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.

Parameters:
vTrue if qualified.
void Puma::CTypeQualified::isRestrict ( bool  v) [inline]

Set whether the type has qualifier restrict.

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

Parameters:
vTrue if qualified.