Puma Reference Manual Puma: Puma::CT_TypeTraitExpr Class Reference



Puma::CT_TypeTraitExpr Class Reference

Tree node representing an type trait expression. More...

#include <Puma/CTree.h>

Inheritance diagram for Puma::CT_TypeTraitExpr:
Inheritance graph

List of all members.

Public Member Functions

 CT_TypeTraitExpr (CTree *k, CTree *o, CTree *t, CTree *c)
 Constructor.
 CT_TypeTraitExpr (CTree *k, CTree *o, CTree *t1, CTree *cc, CTree *t2, CTree *c)
 Constructor.
const char * NodeName () const
 Get the name of the node.
int Sons () const
 Get the number of sons.
CTreeSon (int n) const
 Get the n-th son.
void ReplaceSon (CTree *old_son, CTree *new_son)
 Replace a son.
int Operator () const
 Get the type trait operator.
CT_NamedTypeFirstType () const
 Get the first type.
CT_NamedTypeSecondType () const
 Get the second type.

Static Public Member Functions

static const char * NodeId ()
 Get the identifier for this node type.

Detailed Description

Tree node representing an type trait expression.

Example:

 __is_enum(E) 

Constructor & Destructor Documentation

Puma::CT_TypeTraitExpr::CT_TypeTraitExpr ( CTree k,
CTree o,
CTree t,
CTree c 
) [inline]

Constructor.

Parameters:
kThe type trait keyword.
oLeft parenthesis around the type name.
tThe type from which to get the trait.
cRight parenthesis around the type name.
Puma::CT_TypeTraitExpr::CT_TypeTraitExpr ( CTree k,
CTree o,
CTree t1,
CTree cc,
CTree t2,
CTree c 
) [inline]

Constructor.

Parameters:
kThe type trait keyword.
oLeft parenthesis around the type name.
t1The first type from which to get the trait.
ccThe comma between the types.
t2The second type from which to get the trait.
cRight parenthesis around the type name.

Member Function Documentation

CT_NamedType* Puma::CT_TypeTraitExpr::FirstType ( ) const [inline]

Get the first type.

static const char* Puma::CT_TypeTraitExpr::NodeId ( ) [static]

Get the identifier for this node type.

Can be compared with NodeName().

Reimplemented from Puma::CT_Expression.

const char* Puma::CT_TypeTraitExpr::NodeName ( ) const [inline, virtual]

Get the name of the node.

Can be compared with NodeId().

Reimplemented from Puma::CT_Expression.

int Puma::CT_TypeTraitExpr::Operator ( ) const [inline]

Get the type trait operator.

void Puma::CT_TypeTraitExpr::ReplaceSon ( CTree old_son,
CTree new_son 
) [inline, virtual]

Replace a son.

Parameters:
old_sonThe son to replace.
new_sonThe new son.

Reimplemented from Puma::CTree.

CT_NamedType* Puma::CT_TypeTraitExpr::SecondType ( ) const [inline]

Get the second type.

CTree* Puma::CT_TypeTraitExpr::Son ( int  n) const [inline, virtual]

Get the n-th son.

Parameters:
nThe index of the son.
Returns:
The n-th son or NULL.

Reimplemented from Puma::CTree.

int Puma::CT_TypeTraitExpr::Sons ( ) const [inline, virtual]

Get the number of sons.

Implements Puma::CTree.