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

#include <attachPreprocessingInfoTraversal.h>

Inheritance diagram for AttachPreprocessingInfoTreeTrav:
Collaboration diagram for AttachPreprocessingInfoTreeTrav:

Public Member Functions

 AttachPreprocessingInfoTreeTrav (std::map< std::string, ROSEAttributesList * > *attrMap)
 
 ~AttachPreprocessingInfoTreeTrav ()
 
 AttachPreprocessingInfoTreeTrav (SgSourceFile *file, bool includeDirectivesAndCommentsFromAllFiles)
 
void setupPointerToPreviousNode (SgLocatedNode *currentLocNodePtr)
 
void iterateOverListAndInsertPreviouslyUninsertedElementsAppearingBeforeLineNumber (SgLocatedNode *locatedNode, int lineNumber, PreprocessingInfo::RelativePositionType location, bool reset_start_index, ROSEAttributesList *currentListOfAttributes)
 
AttachPreprocessingInfoTreeTraversalInheritedAttrribute evaluateInheritedAttribute (SgNode *n, AttachPreprocessingInfoTreeTraversalInheritedAttrribute inh)
 pure virtual function which must be implemented to compute the inherited attribute at a node More...
 
AttachPreprocessingInfoTreeTraversalSynthesizedAttribute evaluateSynthesizedAttribute (SgNode *n, AttachPreprocessingInfoTreeTraversalInheritedAttrribute inh, SubTreeSynthesizedAttributes st)
 pure virtual function which must be implemented to compute the synthesized attribute at a node. More...
 
void display (const std::string &label) const
 
AttributeMapTypeget_attributeMapForAllFiles ()
 
ROSEAttributesListgetListOfAttributes (int currentFileNameId)
 
void setMapOfAttributes ()
 
ROSEAttributesListbuildCommentAndCppDirectiveList (bool use_Wave, std::string currentFilename)
 

Protected Attributes

previousLocatedNodeInFileType previousLocatedNodeMap
 accumulator attribute More...
 
AttributeMapType attributeMapForAllFiles
 
SgSourceFilesourceFile
 current source file name id (only handle strings from current file) More...
 
bool use_Wave
 AS(011306) Map of ROSEAttributesLists mapped to filename from Wave. More...
 
StartingIndexAttributeMapType startIndexMap
 Map of filenames to list of attributes as found by WAVE. More...
 
bool processAllIncludeFiles
 

Private Attributes

std::list< std::pair
< SgIncludeDirectiveStatement
*, SgStatement * > > 
statementsToInsertBefore
 
std::list< std::pair
< SgIncludeDirectiveStatement
*, SgStatement * > > 
statementsToInsertAfter
 

Additional Inherited Members

- Public Types inherited from AstTopDownBottomUpProcessing< AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute >
typedef SgTreeTraversal
< AttachPreprocessingInfoTreeTraversalInheritedAttrribute,
AttachPreprocessingInfoTreeTraversalSynthesizedAttribute >
::SynthesizedAttributesList 
SynthesizedAttributesList
 
typedef SynthesizedAttributesList SubTreeSynthesizedAttributes
 
- Protected Types inherited from SgTreeTraversal< AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute >
typedef
AstSuccessorsSelectors::SuccessorsContainer 
SuccessorsContainer
 
typedef SuccessorsContainerSuccessorsContainerRef
 
- Protected Member Functions inherited from AstTopDownBottomUpProcessing< AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute >
virtual void atTraversalStart ()
 Function called at the start of the traversal, before any node is visited; override if necessary, the default implementation is a no-op. More...
 
virtual void atTraversalEnd ()
 

Detailed Description

Definition at line 70 of file attachPreprocessingInfoTraversal.h.

Constructor & Destructor Documentation

AttachPreprocessingInfoTreeTrav::AttachPreprocessingInfoTreeTrav ( std::map< std::string, ROSEAttributesList * > *  attrMap)
AttachPreprocessingInfoTreeTrav::~AttachPreprocessingInfoTreeTrav ( )
AttachPreprocessingInfoTreeTrav::AttachPreprocessingInfoTreeTrav ( SgSourceFile file,
bool  includeDirectivesAndCommentsFromAllFiles 
)

Member Function Documentation

void AttachPreprocessingInfoTreeTrav::setupPointerToPreviousNode ( SgLocatedNode currentLocNodePtr)
void AttachPreprocessingInfoTreeTrav::iterateOverListAndInsertPreviouslyUninsertedElementsAppearingBeforeLineNumber ( SgLocatedNode locatedNode,
int  lineNumber,
PreprocessingInfo::RelativePositionType  location,
bool  reset_start_index,
ROSEAttributesList currentListOfAttributes 
)
AttachPreprocessingInfoTreeTraversalInheritedAttrribute AttachPreprocessingInfoTreeTrav::evaluateInheritedAttribute ( SgNode astNode,
AttachPreprocessingInfoTreeTraversalInheritedAttrribute  inheritedValue 
)
virtual

pure virtual function which must be implemented to compute the inherited attribute at a node

Implements AstTopDownBottomUpProcessing< AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute >.

pure virtual function which must be implemented to compute the synthesized attribute at a node.

The list of synthesized attributes consists of the synthesized attributes computed at the children node of the current node. The inherited attribute value is computed by evaluateInheritedAttribute at the same node and simply passed to this function. Use the typedef SynthesizedAttributeList as type for the synthesized attributes list.

Implements AstTopDownBottomUpProcessing< AttachPreprocessingInfoTreeTraversalInheritedAttrribute, AttachPreprocessingInfoTreeTraversalSynthesizedAttribute >.

void AttachPreprocessingInfoTreeTrav::display ( const std::string &  label) const
AttributeMapType& AttachPreprocessingInfoTreeTrav::get_attributeMapForAllFiles ( )
inline

Definition at line 159 of file attachPreprocessingInfoTraversal.h.

References attributeMapForAllFiles.

ROSEAttributesList* AttachPreprocessingInfoTreeTrav::getListOfAttributes ( int  currentFileNameId)
void AttachPreprocessingInfoTreeTrav::setMapOfAttributes ( )
ROSEAttributesList* AttachPreprocessingInfoTreeTrav::buildCommentAndCppDirectiveList ( bool  use_Wave,
std::string  currentFilename 
)

Member Data Documentation

std::list<std::pair<SgIncludeDirectiveStatement*, SgStatement*> > AttachPreprocessingInfoTreeTrav::statementsToInsertBefore
private

Definition at line 77 of file attachPreprocessingInfoTraversal.h.

std::list<std::pair<SgIncludeDirectiveStatement*, SgStatement*> > AttachPreprocessingInfoTreeTrav::statementsToInsertAfter
private

Definition at line 78 of file attachPreprocessingInfoTraversal.h.

previousLocatedNodeInFileType AttachPreprocessingInfoTreeTrav::previousLocatedNodeMap
protected

accumulator attribute

Definition at line 85 of file attachPreprocessingInfoTraversal.h.

AttributeMapType AttachPreprocessingInfoTreeTrav::attributeMapForAllFiles
protected

Definition at line 90 of file attachPreprocessingInfoTraversal.h.

Referenced by get_attributeMapForAllFiles().

SgSourceFile* AttachPreprocessingInfoTreeTrav::sourceFile
protected

current source file name id (only handle strings from current file)

Definition at line 102 of file attachPreprocessingInfoTraversal.h.

bool AttachPreprocessingInfoTreeTrav::use_Wave
protected

AS(011306) Map of ROSEAttributesLists mapped to filename from Wave.

Use_Wave == true specifies if a wave preprocessor is used

Definition at line 110 of file attachPreprocessingInfoTraversal.h.

StartingIndexAttributeMapType AttachPreprocessingInfoTreeTrav::startIndexMap
protected

Map of filenames to list of attributes as found by WAVE.

AS(092107) Optimization variable to avoid n^2 complexity in iterateOverListAndInsertPreviouslyUninsertedElementsAppearingBeforeLineNumber()

Definition at line 119 of file attachPreprocessingInfoTraversal.h.

bool AttachPreprocessingInfoTreeTrav::processAllIncludeFiles
protected

Definition at line 123 of file attachPreprocessingInfoTraversal.h.


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