Puma Reference Manual Puma: Puma::CTypeQualified Class Reference



Puma::CTypeQualified Class Reference

Type qualification. More...

#include <Puma/CTypeInfo.h>

Inherits Puma::CTypeInfo.

Inherited by Puma::CTypeFunction.

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

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

Set whether the type has qualifier const.

Parameters:
v True if qualified.
bool Puma::CTypeQualified::isConst (  )  const [inline]

Check if the type has qualifier const.

Reimplemented from Puma::CTypeInfo.

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

Set whether the type has qualifier restrict.

Parameters:
v True if qualified.
bool Puma::CTypeQualified::isRestrict (  )  const [inline]

Check if the type has qualifier restrict.

Reimplemented from Puma::CTypeInfo.

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

Set whether the type has qualifier volatile.

Parameters:
v True if qualified.
bool Puma::CTypeQualified::isVolatile (  )  const [inline]

Check if the type has qualifier volatile.

Reimplemented from Puma::CTypeInfo.




Puma Reference Manual. Created on 11 Sep 2009.