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>

Inherits Puma::CT_Expression.

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:
k The type trait keyword.
o Left parenthesis around the type name.
t The type from which to get the trait.
c Right 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:
k The type trait keyword.
o Left parenthesis around the type name.
t1 The first type from which to get the trait.
cc The comma between the types.
t2 The second type from which to get the trait.
c Right 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]

Replace a son.

Parameters:
old_son The son to replace.
new_son The new son.
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:
n The 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.




Puma Reference Manual. Created on 11 Sep 2009.