Puma Reference Manual Puma: Puma::CTypeQualified Class Reference



Puma::CTypeQualified Class Reference

#include <Puma/CTypeInfo.h>

Inheritance diagram for Puma::CTypeQualified:

Inheritance graph

List of all members.


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

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.

Constructor & Destructor Documentation

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

Constructor.

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

Parameters:
base The base type.
c Type has qualifier const.
v Type has qualifier volatile.
r Type 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.

bool Puma::CTypeQualified::isVolatile (  )  const [inline]

Check if the type has qualifier volatile.

Reimplemented from Puma::CTypeInfo.

bool Puma::CTypeQualified::isRestrict (  )  const [inline]

Check if the type has qualifier restrict.

Reimplemented from Puma::CTypeInfo.

void Puma::CTypeQualified::isConst ( bool  v  )  [inline]

Set whether the type has qualifier const.

Parameters:
v True if qualified.

void Puma::CTypeQualified::isVolatile ( bool  v  )  [inline]

Set whether the type has qualifier volatile.

Parameters:
v True if qualified.

void Puma::CTypeQualified::isRestrict ( bool  v  )  [inline]

Set whether the type has qualifier restrict.

Parameters:
v True if qualified.




Puma Reference Manual. Created on 5 Nov 2008.