ROSE
0.9.6a
|
This mechanism provides capabilities to define a mapping from strings to AstAttributes. An instance of this class is accessible at each ROSE AST node in the data member 'attribute'. More...
#include <AstAttributeMechanism.h>
Public Member Functions | |
AstAttributeMechanism (const AstAttributeMechanism &X) | |
AstAttributeMechanism () | |
This mechanism provides capabilities to define a mapping from strings to AstAttributes. An instance of this class is accessible at each ROSE AST node in the data member 'attribute'.
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 179 of file AstAttributeMechanism.h.
AstAttributeMechanism::AstAttributeMechanism | ( | const AstAttributeMechanism & | X) |
AstAttributeMechanism::AstAttributeMechanism | ( | ) |