ROSE
0.9.6a
|
Supporting class from copy mechanism within ROSE. More...
#include <Cxx_Grammar.h>
Public Types | |
typedef std::map< const SgNode *, SgNode * > | copiedNodeMapType |
typedef copiedNodeMapType::iterator | copiedNodeMapTypeIterator |
Public Member Functions | |
virtual SgNode * | copyAst (const SgNode *n)=0 |
SgCopyHelp () | |
virtual | ~SgCopyHelp () |
int | get_depth () |
void | incrementDepth () |
void | decrementDepth () |
copiedNodeMapType & | get_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... | |
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.
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.
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.
|
inline |
Definition at line 7796 of file Cxx_Grammar.h.
|
inlinevirtual |
Definition at line 7799 of file Cxx_Grammar.h.
Implemented in SgTreeCopy, and SgShallowCopy.
|
inline |
Definition at line 7802 of file Cxx_Grammar.h.
References depth.
|
inline |
Definition at line 7803 of file Cxx_Grammar.h.
References depth.
|
inline |
Definition at line 7804 of file Cxx_Grammar.h.
References depth.
|
inline |
Definition at line 7805 of file Cxx_Grammar.h.
References copiedNodeMap.
|
inline |
Definition at line 7808 of file Cxx_Grammar.h.
References copiedNodeMap, and 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().
|
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().