ROSE
0.9.6a
|
Base class for attributes that can be attached to AST nodes using the attribute mechanism in each AST node. More...
#include <AstAttributeMechanism.h>
Classes | |
class | AttributeEdgeInfo |
class | AttributeNodeInfo |
Public Member Functions | |
AstAttribute () | |
virtual | ~AstAttribute () |
virtual std::string | toString () |
AstAttribute * | constructor () |
std::string | attribute_class_name () |
virtual int | packed_size () |
virtual char * | packed_data () |
virtual void | unpacked_data (int size, char *data) |
virtual std::string | additionalNodeOptions () |
virtual std::vector < AttributeEdgeInfo > | additionalEdgeInfo () |
virtual std::vector < AttributeNodeInfo > | additionalNodeInfo () |
virtual AstAttribute * | copy () |
virtual bool | commentOutNodeInGraph () |
Base class for attributes that can be attached to AST nodes using the attribute mechanism in each AST node.
Objects of class AstAttribute can be be attached to ROSE AST nodes. An attribute must be a subclass of AstAttribute. Each node of the ROSE AST contains an AstAttributeMechanism, accessible as data member 'attribute'. Using this mechnism attributes can be attached to AST nodes.
example: class MyAstAttribute : public AstAttribute { public: MyAstAttribute(int v):val(v){} ... private: int val; };
node->attribute.add("myattribute1",new MyAstAttribute(5));
MyAstAttribute* accessexample = node->attribute["myattribute1"];
Definition at line 18 of file AstAttributeMechanism.h.
AstAttribute::AstAttribute | ( | ) |
|
virtual |
|
virtual |
This function is used by other components to print the value of an attribute. For example the pdf generation calls this function to print the value of an attribute in the pdf file. The default implementation is to return an empty string.
Reimplemented in MetricAttribute, and AstTextAttribute.
AstAttribute* AstAttribute::constructor | ( | ) |
std::string AstAttribute::attribute_class_name | ( | ) |
|
virtual |
Reimplemented in MetricAttribute.
|
virtual |
Reimplemented in MetricAttribute.
|
virtual |
Reimplemented in MetricAttribute.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |