| Puma Reference Manual | Puma: Puma::CT_TypeTraitExpr Class Reference |
Tree node representing an type trait expression. More...
#include <Puma/CTree.h>
Inherits Puma::CT_Expression.
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. | |
| CTree * | Son (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_NamedType * | FirstType () const |
| Get the first type. | |
| CT_NamedType * | SecondType () const |
| Get the second type. | |
Static Public Member Functions | |
| static const char * | NodeId () |
| Get the identifier for this node type. | |
Tree node representing an type trait expression.
Example:
__is_enum(E)
Constructor.
| 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.
| 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. |
| 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] |
| int Puma::CT_TypeTraitExpr::Operator | ( | ) | const [inline] |
Get the type trait operator.
Replace a son.
| 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.
| n | The index of the son. |
Reimplemented from Puma::CTree.
| int Puma::CT_TypeTraitExpr::Sons | ( | ) | const [inline, virtual] |
Get the number of sons.
Implements Puma::CTree.