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

#include <ClassHierarchyGraph.h>

Collaboration diagram for ClassHierarchyWrapper:

Public Types

typedef boost::unordered_set
< SgClassDefinition * > 
ClassDefSet
 
typedef boost::unordered_map
< std::string, ClassDefSet
MangledNameToClassDefsMap
 

Public Member Functions

 ClassHierarchyWrapper (SgNode *node)
 
const ClassDefSetgetSubclasses (SgClassDefinition *) const
 
const ClassDefSetgetDirectSubclasses (SgClassDefinition *) const
 
const ClassDefSetgetAncestorClasses (SgClassDefinition *) const
 

Static Private Member Functions

static void buildAncestorsMap (const MangledNameToClassDefsMap &parents, MangledNameToClassDefsMap &transitiveParents)
 Computes the transitive closure of the child-parent class relationship. More...
 

Private Attributes

MangledNameToClassDefsMap directParents
 Map from each class to all its immediate superclasses. More...
 
MangledNameToClassDefsMap directChildren
 Map from each class to all its immediate subclasses. More...
 
MangledNameToClassDefsMap ancestorClasses
 Map from class to all (strict) ancestors. More...
 
MangledNameToClassDefsMap subclasses
 Map from class to all (strict) subclasses. More...
 
SgIncidenceDirectedGraphclassGraph
 

Detailed Description

Definition at line 8 of file ClassHierarchyGraph.h.

Member Typedef Documentation

typedef boost::unordered_set<SgClassDefinition*> ClassHierarchyWrapper::ClassDefSet

Definition at line 11 of file ClassHierarchyGraph.h.

typedef boost::unordered_map<std::string, ClassDefSet> ClassHierarchyWrapper::MangledNameToClassDefsMap

Definition at line 13 of file ClassHierarchyGraph.h.

Constructor & Destructor Documentation

ClassHierarchyWrapper::ClassHierarchyWrapper ( SgNode node)

Member Function Documentation

const ClassDefSet& ClassHierarchyWrapper::getSubclasses ( SgClassDefinition ) const
const ClassDefSet& ClassHierarchyWrapper::getDirectSubclasses ( SgClassDefinition ) const
const ClassDefSet& ClassHierarchyWrapper::getAncestorClasses ( SgClassDefinition ) const
static void ClassHierarchyWrapper::buildAncestorsMap ( const MangledNameToClassDefsMap parents,
MangledNameToClassDefsMap transitiveParents 
)
staticprivate

Computes the transitive closure of the child-parent class relationship.

Parameters
parentsmap from each class to its parents.
transitiveParentsmap from each class to all its ancestors

Member Data Documentation

MangledNameToClassDefsMap ClassHierarchyWrapper::directParents
private

Map from each class to all its immediate superclasses.

Definition at line 19 of file ClassHierarchyGraph.h.

MangledNameToClassDefsMap ClassHierarchyWrapper::directChildren
private

Map from each class to all its immediate subclasses.

Definition at line 22 of file ClassHierarchyGraph.h.

MangledNameToClassDefsMap ClassHierarchyWrapper::ancestorClasses
private

Map from class to all (strict) ancestors.

Definition at line 25 of file ClassHierarchyGraph.h.

MangledNameToClassDefsMap ClassHierarchyWrapper::subclasses
private

Map from class to all (strict) subclasses.

Definition at line 28 of file ClassHierarchyGraph.h.

SgIncidenceDirectedGraph* ClassHierarchyWrapper::classGraph
private

Definition at line 30 of file ClassHierarchyGraph.h.


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