ROSE  0.9.6a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SgCopyHelp Class Referenceabstract

Supporting class from copy mechanism within ROSE. More...

#include <Cxx_Grammar.h>

Inheritance diagram for SgCopyHelp:

Public Types

typedef std::map< const SgNode
*, SgNode * > 
copiedNodeMapType
 
typedef copiedNodeMapType::iterator copiedNodeMapTypeIterator
 

Public Member Functions

virtual SgNodecopyAst (const SgNode *n)=0
 
 SgCopyHelp ()
 
virtual ~SgCopyHelp ()
 
int get_depth ()
 
void incrementDepth ()
 
void decrementDepth ()
 
copiedNodeMapTypeget_copiedNodeMap ()
 
void clearState ()
 
void insertCopiedNodePair (const SgNode *key, SgNode *value)
 

Private Attributes

int depth
 This data member records the depth of the traversal (root node == 0) More...
 
copiedNodeMapType copiedNodeMap
 This is internal state used to asscociate pairs of IR nodes copied instead of shared. More...
 

Detailed Description

Supporting class from copy mechanism within ROSE.

This class forms a base class for the SgShallowCopy and SgTreeCopy classes to support the control of copying of subtrees (what IR nodes are copied by a deep or shallow copy).

To tailor a specific type of copy operation derive a class from this abstract class and define the clone_node function as required. context information if required muyst be obtained through local analysis inside the function using the parent or scope information at each IR node.

Note
This is an abstract class.

Used in ROSETTA generated copy functions on each IR node. The location of this code should perhaps be changed to be in the generate copy code rather than Node.code in ROSETTA/Grammar.

Definition at line 7768 of file Cxx_Grammar.h.

Member Typedef Documentation

typedef std::map<const SgNode*,SgNode*> SgCopyHelp::copiedNodeMapType

Definition at line 7772 of file Cxx_Grammar.h.

typedef copiedNodeMapType::iterator SgCopyHelp::copiedNodeMapTypeIterator

Definition at line 7786 of file Cxx_Grammar.h.

Constructor & Destructor Documentation

SgCopyHelp::SgCopyHelp ( )
inline

Definition at line 7796 of file Cxx_Grammar.h.

virtual SgCopyHelp::~SgCopyHelp ( )
inlinevirtual

Definition at line 7799 of file Cxx_Grammar.h.

Member Function Documentation

virtual SgNode* SgCopyHelp::copyAst ( const SgNode n)
pure virtual

Implemented in SgTreeCopy, and SgShallowCopy.

int SgCopyHelp::get_depth ( )
inline

Definition at line 7802 of file Cxx_Grammar.h.

References depth.

void SgCopyHelp::incrementDepth ( )
inline

Definition at line 7803 of file Cxx_Grammar.h.

References depth.

void SgCopyHelp::decrementDepth ( )
inline

Definition at line 7804 of file Cxx_Grammar.h.

References depth.

copiedNodeMapType& SgCopyHelp::get_copiedNodeMap ( )
inline

Definition at line 7805 of file Cxx_Grammar.h.

References copiedNodeMap.

void SgCopyHelp::clearState ( )
inline

Definition at line 7808 of file Cxx_Grammar.h.

References copiedNodeMap, and depth.

void SgCopyHelp::insertCopiedNodePair ( const SgNode key,
SgNode value 
)

Member Data Documentation

int SgCopyHelp::depth
private

This data member records the depth of the traversal (root node == 0)

Definition at line 7777 of file Cxx_Grammar.h.

Referenced by clearState(), decrementDepth(), get_depth(), and incrementDepth().

copiedNodeMapType SgCopyHelp::copiedNodeMap
private

This is internal state used to asscociate pairs of IR nodes copied instead of shared.

Definition at line 7781 of file Cxx_Grammar.h.

Referenced by clearState(), and get_copiedNodeMap().


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