Puma Reference Manual | Puma: Puma::CT_OperatorName Class Reference |
Tree node representing the name of an overloaded operator. More...
#include <Puma/CTree.h>
Inherits Puma::CT_SpecialName.
Public Types | |
enum | { FCT_CALL = -100, SUBSCRIPT, NEW_ARRAY, DEL_ARRAY } |
Complex operator types. More... | |
Public Member Functions | |
CT_OperatorName (CTree *op) | |
Constructor. | |
CT_OperatorName (CTree *f, CTree *op, CTree *o, CTree *c) | |
Constructor. | |
const char * | NodeName () const |
Get the name of the node. | |
int | Operator () const |
Get the operator type (either the token type or one of the complex operator types). | |
void * | operator new (size_t) |
Own new operator reusing memory. | |
void | operator delete (void *) |
Own delete operator. | |
Static Public Member Functions | |
static const char * | NodeId () |
Get the identifier for this node type. |
Tree node representing the name of an overloaded operator.
Example:
operator==
anonymous enum |
Complex operator types.
FCT_CALL | |
SUBSCRIPT |
Function call operator, i.e. (). |
NEW_ARRAY |
Array subscript operator, i.e. []. |
DEL_ARRAY |
New array operator, i.e. new[]. Delete array operator, i.e. delete[]. |
Puma::CT_OperatorName::CT_OperatorName | ( | CTree * | op | ) |
Constructor.
op | The token containing the operator. |
Constructor.
f | The operator function keyword 'operator'. | |
op | The token containing the operator. | |
o | The token of '[' or '('. | |
c | The token of ']' or ')'. |
static const char* Puma::CT_OperatorName::NodeId | ( | ) | [static] |
Get the identifier for this node type.
Can be compared with NodeName().
Reimplemented from Puma::CT_SimpleName.
const char* Puma::CT_OperatorName::NodeName | ( | ) | const [inline, virtual] |
int Puma::CT_OperatorName::Operator | ( | ) | const [inline] |
Get the operator type (either the token type or one of the complex operator types).
void Puma::CT_OperatorName::operator delete | ( | void * | ) |
Own delete operator.
Reimplemented from Puma::CT_SpecialName.
void* Puma::CT_OperatorName::operator new | ( | size_t | ) |
Own new operator reusing memory.
Reimplemented from Puma::CT_SpecialName.