AstAttribute Class Reference
[AST Processing]

#include <AstAttributeMechanism.h>

Inheritance diagram for AstAttribute:

Inheritance graph
[legend]
List of all members.

Detailed Description

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"];


Public Member Functions

 AstAttribute ()
virtual ~AstAttribute ()
virtual std::string toString ()
AstAttributeconstructor ()
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< AttributeEdgeInfoadditionalEdgeInfo ()
virtual std::vector< AttributeNodeInfoadditionalNodeInfo ()
virtual AstAttributecopy ()
virtual bool commentOutNodeInGraph ()

Classes

class  AttributeEdgeInfo
class  AttributeNodeInfo


Constructor & Destructor Documentation

AstAttribute::AstAttribute (  ) 

virtual AstAttribute::~AstAttribute (  )  [virtual]


Member Function Documentation

virtual std::string AstAttribute::toString (  )  [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 (  ) 

Reimplemented in MetricAttribute.

std::string AstAttribute::attribute_class_name (  ) 

Reimplemented in MetricAttribute.

virtual int AstAttribute::packed_size (  )  [virtual]

Reimplemented in MetricAttribute.

virtual char* AstAttribute::packed_data (  )  [virtual]

Reimplemented in MetricAttribute.

virtual void AstAttribute::unpacked_data ( int  size,
char *  data 
) [virtual]

Reimplemented in MetricAttribute.

virtual std::string AstAttribute::additionalNodeOptions (  )  [virtual]

virtual std::vector<AttributeEdgeInfo> AstAttribute::additionalEdgeInfo (  )  [virtual]

virtual std::vector<AttributeNodeInfo> AstAttribute::additionalNodeInfo (  )  [virtual]

virtual AstAttribute* AstAttribute::copy (  )  [virtual]

Reimplemented in ssa_private::VarUniqueName, and MetricAttribute.

virtual bool AstAttribute::commentOutNodeInGraph (  )  [virtual]


The documentation for this class was generated from the following file:
Generated on Tue Jan 31 05:33:23 2012 for ROSE by  doxygen 1.4.7