Represents a attribute reference node (like .b) in the expression tree. More...
#include <attrrefs.h>
Public Member Functions | |
AttributeReference (const AttributeReference &ref) | |
Copy Constructor. | |
virtual | ~AttributeReference () |
Destructor. | |
AttributeReference & | operator= (const AttributeReference &ref) |
Assignment operator. | |
void | GetComponents (ExprTree *&expr, std::string &attr, bool &abs) const |
virtual ExprTree * | Copy () const |
bool | CopyFrom (const AttributeReference &ref) |
virtual bool | SameAs (const ExprTree *tree) const |
AttributeReference (const AttributeReference &ref) | |
Copy Constructor. | |
virtual | ~AttributeReference () |
Destructor. | |
AttributeReference & | operator= (const AttributeReference &ref) |
Assignment operator. | |
void | GetComponents (ExprTree *&expr, std::string &attr, bool &abs) const |
virtual ExprTree * | Copy () const |
bool | CopyFrom (const AttributeReference &ref) |
virtual bool | SameAs (const ExprTree *tree) const |
Static Public Member Functions | |
static AttributeReference * | MakeAttributeReference (ExprTree *expr, const std::string &attrName, bool absolute=false) |
static AttributeReference * | MakeAttributeReference (ExprTree *expr, const std::string &attrName, bool absolute=false) |
Protected Member Functions | |
AttributeReference () | |
Constructor. | |
AttributeReference () | |
Constructor. | |
Friends | |
bool | operator== (const AttributeReference &ref1, const AttributeReference &ref2) |
bool | operator== (const AttributeReference &ref1, const AttributeReference &ref2) |
Represents a attribute reference node (like .b) in the expression tree.
ExprTree * AttributeReference::Copy | ( | ) | const [virtual] |
Return a copy of this attribute reference.
Implements ExprTree.
virtual ExprTree* AttributeReference::Copy | ( | ) | const [virtual] |
Return a copy of this attribute reference.
Implements ExprTree.
bool AttributeReference::CopyFrom | ( | const AttributeReference & | ref | ) |
Copy from the given reference into this reference.
ref | The reference to copy from. |
bool AttributeReference::CopyFrom | ( | const AttributeReference & | ref | ) |
Copy from the given reference into this reference.
ref | The reference to copy from. |
void AttributeReference::GetComponents | ( | ExprTree *& | expr, | |
std::string & | attr, | |||
bool & | abs | |||
) | const |
Deconstructor to get the components of an attribute reference
expr | The expression part of the reference (NULL for absolute or simple references) | |
attr | The name of the attribute being referred to | |
abs | true iff the reference is absolute (i.e., .attr) |
void AttributeReference::GetComponents | ( | ExprTree *& | expr, | |
std::string & | attr, | |||
bool & | abs | |||
) | const |
Deconstructor to get the components of an attribute reference
expr | The expression part of the reference (NULL for absolute or simple references) | |
attr | The name of the attribute being referred to | |
abs | true iff the reference is absolute (i.e., .attr) |
static AttributeReference* AttributeReference::MakeAttributeReference | ( | ExprTree * | expr, | |
const std::string & | attrName, | |||
bool | absolute = false | |||
) | [static] |
Factory method to create attribute reference nodes.
expr | The expression part of the reference (i.e., in case of expr.attr). This parameter is NULL if the reference is absolute (i.e., .attr) or simple (i.e., attr). | |
attrName | The name of the reference. This string is duplicated internally. | |
absolute | True if the reference is an absolute reference (i.e., in case of .attr). This parameter cannot be true if expr is not NULL |
static AttributeReference* AttributeReference::MakeAttributeReference | ( | ExprTree * | expr, | |
const std::string & | attrName, | |||
bool | absolute = false | |||
) | [static] |
Factory method to create attribute reference nodes.
expr | The expression part of the reference (i.e., in case of expr.attr). This parameter is NULL if the reference is absolute (i.e., .attr) or simple (i.e., attr). | |
attrName | The name of the reference. This string is duplicated internally. | |
absolute | True if the reference is an absolute reference (i.e., in case of .attr). This parameter cannot be true if expr is not NULL |
bool AttributeReference::SameAs | ( | const ExprTree * | tree | ) | const [virtual] |
Is this attribute reference the same as another?
tree | The reference to compare with |
Implements ExprTree.
virtual bool AttributeReference::SameAs | ( | const ExprTree * | tree | ) | const [virtual] |
Is this attribute reference the same as another?
tree | The reference to compare with |
Implements ExprTree.
bool operator== | ( | const AttributeReference & | ref1, | |
const AttributeReference & | ref2 | |||
) | [friend] |
Are the two attribute references the same?
ref1 | An attribute reference | |
ref2 | Another attribute reference |
bool operator== | ( | const AttributeReference & | ref1, | |
const AttributeReference & | ref2 | |||
) | [friend] |
Are the two attribute references the same?
ref1 | An attribute reference | |
ref2 | Another attribute reference |