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

#include <Callgraph.h>

Inheritance diagram for CallgraphTraversal:
Collaboration diagram for CallgraphTraversal:

Public Member Functions

 CallgraphTraversal (SgProject &project)
 
CallgraphInhAttr evaluateInheritedAttribute (SgNode *astNode, CallgraphInhAttr inheritedAttribute)
 pure virtual function which must be implemented to compute the inherited attribute at a node More...
 
void removeDeletedFunctionRows (void)
 remove functions row entries from DB using mpFunctionDefinitions More...
 
void setFunctionDefinitions (vector< long > *set)
 set function def vector More...
 
vector< long > * getFunctionDefinitions (void)
 get function def vector More...
 
void setFileScopes (vector< long > *set)
 set file scope vector More...
 
vector< long > * getFileScopes (void)
 get file scope vector More...
 
void setDB (GlobalDatabaseConnection *set)
 set DB connection More...
 
GlobalDatabaseConnection * getDB (void)
 get DB connection More...
 
void setProjectId (long set)
 set project ID More...
 
long getProjectId (void)
 get project ID More...
 
void setFileId (long set)
 set file ID More...
 
long getFileId (void)
 get file ID More...
 
void setCallgraph (Callgraph *set)
 set pointer to the callgraph graph object More...
 
CallgraphgetCallgraph (void)
 get pointer to the callgraph graph object More...
 
void setClasshierarchy (Classhierarchy *set)
 set pointer to the Classhierarchy graph object More...
 
ClasshierarchygetClasshierarchy (void)
 get pointer to the Classhierarchy graph object More...
 
void setSgProject (SgProject *set)
 set pointer to the SgProject graph object More...
 
SgProjectgetSgProject (void)
 get pointer to the SgProject graph object More...
 
set< int > * getCGFileSubgraphs (void)
 get callgraph file subgraph storage More...
 
void setDeclList (list< SgNode * > *set)
 set query decl list More...
 

Private Member Functions

void addCallEdge (SgFunctionDeclaration *funcDec, long functionScope)
 add an edge for the call to this function to the callgraph More...
 

Private Attributes

GlobalDatabaseConnection * mpGDB
 
long mProjectId
 ID of the current project. More...
 
long mFileId
 ID of the current file. More...
 
CallgraphmCallgraph
 graph to store the callgraph More...
 
ClasshierarchymClasshierarchy
 graph to store the class hierarchy More...
 
vector< long > * mpFunctionDefinitions
 vector of encoutered function definitions (needed for detection of deleted functions) More...
 
vector< long > * mpFileScopes
 vector of all id's of the processed files (for cleanup) More...
 
SgProjectmpSgProject
 pointer to the project node More...
 
set< int > mCGFileSubgraphs
 inited callgraph file subgraph values More...
 
list< SgNode * > * mpDeclQList
 pointer to a query list of declaration nodes for quicker query More...
 

Additional Inherited Members

- Public Types inherited from AstTopDownProcessing< CallgraphInhAttr >
typedef SgTreeTraversal
< CallgraphInhAttr,
DummyAttribute >
::SynthesizedAttributesList 
SynthesizedAttributesList
 
- Protected Types inherited from SgTreeTraversal< CallgraphInhAttr, DummyAttribute >
typedef
AstSuccessorsSelectors::SuccessorsContainer 
SuccessorsContainer
 
typedef SuccessorsContainerSuccessorsContainerRef
 
- Protected Member Functions inherited from AstTopDownProcessing< CallgraphInhAttr >
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 ()
 
virtual void destroyInheritedValue (SgNode *, CallgraphInhAttr)
 

Detailed Description

Definition at line 113 of file Callgraph.h.

Constructor & Destructor Documentation

CallgraphTraversal::CallgraphTraversal ( SgProject project)
inline

Member Function Documentation

CallgraphInhAttr CallgraphTraversal::evaluateInheritedAttribute ( SgNode astNode,
CallgraphInhAttr  inheritedValue 
)
virtual

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

Implements AstTopDownProcessing< CallgraphInhAttr >.

void CallgraphTraversal::removeDeletedFunctionRows ( void  )

remove functions row entries from DB using mpFunctionDefinitions

void CallgraphTraversal::setFunctionDefinitions ( vector< long > *  set)
inline

set function def vector

Definition at line 139 of file Callgraph.h.

References mpFunctionDefinitions.

vector<long>* CallgraphTraversal::getFunctionDefinitions ( void  )
inline

get function def vector

Definition at line 141 of file Callgraph.h.

References mpFunctionDefinitions.

void CallgraphTraversal::setFileScopes ( vector< long > *  set)
inline

set file scope vector

Definition at line 144 of file Callgraph.h.

References mpFileScopes.

vector<long>* CallgraphTraversal::getFileScopes ( void  )
inline

get file scope vector

Definition at line 146 of file Callgraph.h.

References mpFileScopes.

void CallgraphTraversal::setDB ( GlobalDatabaseConnection *  set)
inline

set DB connection

Definition at line 149 of file Callgraph.h.

References mpGDB.

GlobalDatabaseConnection* CallgraphTraversal::getDB ( void  )
inline

get DB connection

Definition at line 151 of file Callgraph.h.

References mpGDB.

void CallgraphTraversal::setProjectId ( long  set)
inline

set project ID

Definition at line 154 of file Callgraph.h.

References mProjectId.

long CallgraphTraversal::getProjectId ( void  )
inline

get project ID

Definition at line 156 of file Callgraph.h.

References mProjectId.

void CallgraphTraversal::setFileId ( long  set)
inline

set file ID

Definition at line 159 of file Callgraph.h.

References mFileId.

long CallgraphTraversal::getFileId ( void  )
inline

get file ID

Definition at line 161 of file Callgraph.h.

References mFileId.

void CallgraphTraversal::setCallgraph ( Callgraph set)
inline

set pointer to the callgraph graph object

Definition at line 165 of file Callgraph.h.

References mCallgraph.

Callgraph* CallgraphTraversal::getCallgraph ( void  )
inline

get pointer to the callgraph graph object

Definition at line 167 of file Callgraph.h.

References mCallgraph.

void CallgraphTraversal::setClasshierarchy ( Classhierarchy set)
inline

set pointer to the Classhierarchy graph object

Definition at line 170 of file Callgraph.h.

References mClasshierarchy.

Classhierarchy* CallgraphTraversal::getClasshierarchy ( void  )
inline

get pointer to the Classhierarchy graph object

Definition at line 172 of file Callgraph.h.

References mClasshierarchy.

void CallgraphTraversal::setSgProject ( SgProject set)
inline

set pointer to the SgProject graph object

Definition at line 175 of file Callgraph.h.

References mpSgProject.

SgProject* CallgraphTraversal::getSgProject ( void  )
inline

get pointer to the SgProject graph object

Definition at line 177 of file Callgraph.h.

References mpSgProject.

set<int>* CallgraphTraversal::getCGFileSubgraphs ( void  )
inline

get callgraph file subgraph storage

Definition at line 180 of file Callgraph.h.

References mCGFileSubgraphs.

void CallgraphTraversal::setDeclList ( list< SgNode * > *  set)
inline

set query decl list

Definition at line 183 of file Callgraph.h.

References mpDeclQList.

void CallgraphTraversal::addCallEdge ( SgFunctionDeclaration funcDec,
long  functionScope 
)
private

add an edge for the call to this function to the callgraph

Member Data Documentation

GlobalDatabaseConnection* CallgraphTraversal::mpGDB
private

Definition at line 193 of file Callgraph.h.

Referenced by getDB(), and setDB().

long CallgraphTraversal::mProjectId
private

ID of the current project.

Definition at line 196 of file Callgraph.h.

Referenced by CallgraphTraversal(), getProjectId(), and setProjectId().

long CallgraphTraversal::mFileId
private

ID of the current file.

Definition at line 199 of file Callgraph.h.

Referenced by CallgraphTraversal(), getFileId(), and setFileId().

Callgraph* CallgraphTraversal::mCallgraph
private

graph to store the callgraph

Definition at line 203 of file Callgraph.h.

Referenced by CallgraphTraversal(), getCallgraph(), and setCallgraph().

Classhierarchy* CallgraphTraversal::mClasshierarchy
private

graph to store the class hierarchy

Definition at line 206 of file Callgraph.h.

Referenced by CallgraphTraversal(), getClasshierarchy(), and setClasshierarchy().

vector<long>* CallgraphTraversal::mpFunctionDefinitions
private

vector of encoutered function definitions (needed for detection of deleted functions)

Definition at line 209 of file Callgraph.h.

Referenced by CallgraphTraversal(), getFunctionDefinitions(), and setFunctionDefinitions().

vector<long>* CallgraphTraversal::mpFileScopes
private

vector of all id's of the processed files (for cleanup)

Definition at line 212 of file Callgraph.h.

Referenced by getFileScopes(), and setFileScopes().

SgProject* CallgraphTraversal::mpSgProject
private

pointer to the project node

Definition at line 215 of file Callgraph.h.

Referenced by CallgraphTraversal(), getSgProject(), and setSgProject().

set<int> CallgraphTraversal::mCGFileSubgraphs
private

inited callgraph file subgraph values

Definition at line 218 of file Callgraph.h.

Referenced by getCGFileSubgraphs().

list<SgNode*>* CallgraphTraversal::mpDeclQList
private

pointer to a query list of declaration nodes for quicker query

Definition at line 221 of file Callgraph.h.

Referenced by setDeclList().


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