ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ssa_private::VarUniqueName Class Reference

Class holding a unique name for a variable. More...

#include <uniqueNameTraversal.h>

Inheritance diagram for ssa_private::VarUniqueName:
Collaboration diagram for ssa_private::VarUniqueName:

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...
 
VarUniqueNamecopy ()
 
const 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 ()
 
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
< 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
 

Detailed Description

Class holding a unique name for a variable.

Is attached to varRefs as a persistant attribute. This is used to assign absolute names to VarRefExp nodes during VariableRenaming.

Definition at line 11 of file uniqueNameTraversal.h.

Constructor & Destructor Documentation

ssa_private::VarUniqueName::VarUniqueName ( )
inline

Constructs the attribute with an empty key.

Definition at line 26 of file uniqueNameTraversal.h.

Referenced by copy().

ssa_private::VarUniqueName::VarUniqueName ( SgInitializedName thisNode)
inline

Constructs the attribute with value thisNode.

The key will consist of only the current node.

Parameters
thisNodeThe node to use for the key.

Definition at line 36 of file uniqueNameTraversal.h.

References key.

ssa_private::VarUniqueName::VarUniqueName ( const std::vector< SgInitializedName * > &  prefix,
SgInitializedName thisNode 
)
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.

Parameters
prefixThe prefix of the new name.
thisNodeThe node to append to the end of the new name.

Definition at line 49 of file uniqueNameTraversal.h.

References key.

ssa_private::VarUniqueName::VarUniqueName ( const VarUniqueName other)
inline

Copy the attribute.

Parameters
otherThe attribute to copy from.

Definition at line 59 of file uniqueNameTraversal.h.

References key.

Member Function Documentation

VarUniqueName* ssa_private::VarUniqueName::copy ( )
inlinevirtual

Reimplemented from AstAttribute.

Definition at line 64 of file uniqueNameTraversal.h.

References VarUniqueName().

const std::vector<SgInitializedName*>& ssa_private::VarUniqueName::getKey ( )
inline

Get a constant reference to the name.

Returns
Constant Reference to the name.

Definition at line 74 of file uniqueNameTraversal.h.

References key.

void ssa_private::VarUniqueName::setKey ( const std::vector< SgInitializedName * > &  newKey)
inline

Set the value of the name.

Parameters
newKeyThe new name to use.

Definition at line 83 of file uniqueNameTraversal.h.

References key.

bool ssa_private::VarUniqueName::getUsesThis ( )
inline

Definition at line 88 of file uniqueNameTraversal.h.

References usesThis.

void ssa_private::VarUniqueName::setUsesThis ( bool  uses)
inline

Definition at line 93 of file uniqueNameTraversal.h.

References usesThis.

std::string ssa_private::VarUniqueName::getNameString ( )
inline

Get the string representing this uniqueName.

Returns
The name string.

Definition at line 102 of file uniqueNameTraversal.h.

References key, name, and usesThis.

Member Data Documentation

std::vector<SgInitializedName*> ssa_private::VarUniqueName::key
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.

Definition at line 18 of file uniqueNameTraversal.h.

Referenced by getKey(), getNameString(), setKey(), and VarUniqueName().

bool ssa_private::VarUniqueName::usesThis
private

Definition at line 20 of file uniqueNameTraversal.h.

Referenced by getNameString(), getUsesThis(), and setUsesThis().


The documentation for this class was generated from the following file: