|
ROSE
0.9.6a
|
Class holding a unique name for a variable. More...
#include <VariableRenaming.h>


Public Member Functions | |
| VarUniqueName () | |
| Constructs the attribute with an empty key. More... | |
| VarUniqueName (SgInitializedName *thisNode) | |
| Constructs the attribute with value thisNode. More... | |
| VarUniqueName (const std::vector< SgInitializedName * > &prefix, SgInitializedName *thisNode) | |
| Constructs the attribute using the prefix vector and thisNode. More... | |
| VarUniqueName (const VarUniqueName &other) | |
| Copy the attribute. More... | |
| VarUniqueName * | copy () |
| std::vector< SgInitializedName * > & | getKey () |
| Get a constant reference to the name. More... | |
| void | setKey (const std::vector< SgInitializedName * > &newKey) |
| Set the value of the name. More... | |
| bool | getUsesThis () |
| void | setUsesThis (bool uses) |
| std::string | getNameString () |
| Get the string representing this uniqueName. More... | |
Public Member Functions inherited from AstAttribute | |
| 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 bool | commentOutNodeInGraph () |
Private Attributes | |
| std::vector< SgInitializedName * > | key |
| The vector of initializedNames that uniquely identifies this VarRef. More... | |
| bool | usesThis |
Class holding a unique name for a variable.
Is attached to varRefs as a persistent attribute. This is used to assign absolute names to VarRefExp nodes during VariableRenaming.
It handles complex case like : Additional comments by Liao 5/4/2012 using this pointer: this->member_x; using member of aggregate data: e.g. a.b.c.e how about a->b->c ?
Definition at line 26 of file VariableRenaming.h.
|
inline |
Constructs the attribute with an empty key.
Definition at line 41 of file VariableRenaming.h.
Referenced by copy().
|
inline |
Constructs the attribute with value thisNode.
The key will consist of only the current node.
| thisNode | The node to use for the key. |
Definition at line 51 of file VariableRenaming.h.
References key.
|
inline |
Constructs the attribute using the prefix vector and thisNode.
The key will first be copied from the prefix value, and then the thisNode value will be appended.
| prefix | The prefix of the new name. |
| thisNode | The node to append to the end of the new name. |
Definition at line 64 of file VariableRenaming.h.
References key.
|
inline |
Copy the attribute.
| other | The attribute to copy from. |
Definition at line 74 of file VariableRenaming.h.
References key.
|
inlinevirtual |
Reimplemented from AstAttribute.
Definition at line 79 of file VariableRenaming.h.
References VarUniqueName().
|
inline |
Get a constant reference to the name.
Definition at line 89 of file VariableRenaming.h.
References key.
|
inline |
Set the value of the name.
| newKey | The new name to use. |
Definition at line 95 of file VariableRenaming.h.
References key.
|
inline |
Definition at line 97 of file VariableRenaming.h.
References usesThis.
|
inline |
Definition at line 98 of file VariableRenaming.h.
References usesThis.
|
inline |
Get the string representing this uniqueName.
Definition at line 104 of file VariableRenaming.h.
|
private |
The vector of initializedNames that uniquely identifies this VarRef.
The node which this name is attached to should be the last in the list. why a vector? in order to handle a.b.c ??
Definition at line 34 of file VariableRenaming.h.
Referenced by getKey(), getNameString(), setKey(), and VarUniqueName().
|
private |
Definition at line 36 of file VariableRenaming.h.
Referenced by getNameString(), getUsesThis(), and setUsesThis().