All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Types | Public Member Functions | Public Attributes | Private Member Functions | List of all members
risc::InstanceTree Class Reference

#include <instance_tree.h>

Collaboration diagram for risc::InstanceTree:
Collaboration graph

Classes

struct  Element
 

Public Types

enum  VariableType {
  ModuleInstance, PrimitiveChannelInstance, HierarchicalChannelInstance, EventInstance,
  VariableInstance, PortInstance
}
 These are the kind for of variables for which a traversal can search. More...
 
typedef std::list< ElementPath
 

Public Member Functions

 InstanceTree ()
 
 InstanceTree (const InstanceTree &other)
 
InstanceTree get_real_mapped_variable ()
 This function returns mapped variables for a reference. If the mapped variable is a global variable, the first scope pointer will be NULL. More...
 
std::list< InstanceTreefind_all_instances_of (SgSymbol *var_sym)
 This function returns all variables. More...
 
InstanceTree get_parent ()
 This function returns the parent variable of variable. More...
 
void print_instance_tree ()
 Prints the instance tree. More...
 
Classget_scope ()
 returns the scope of the object More...
 
Objectget_object ()
 returns the object More...
 
SgVariableSymbol * get_object_symbol ()
 returns the symbol of the object More...
 
void get_all_ports (std::list< InstanceTree > &occurence)
 returns all ports More...
 
void get_all_events (std::list< InstanceTree > &occurence)
 returns all events More...
 
Element pop_back ()
 Deletes the last element in the instance tree. More...
 
void push_back (Element ohs)
 Appends element ohs at the end of the list. More...
 
void get_instance_tree (SgVariableDefinition *var_def, int instance_id, risc::InstanceTree &tree, VariableType type)
 find the instance path to a variable with a given instance id of the hosting module More...
 
void recursive_tree_walk (SgVariableDefinition *var_def, int &current_id, int instance_id, risc::InstanceTree &tree, bool &found, VariableType type)
 For internal usage only! More...
 
InstanceTree extend_with_symbol_list (std::list< SgVariableSymbol * > syms)
 create a copy of current instance tree, extend the copy More...
 
bool operator== (const InstanceTree &ohs) const
 

Public Attributes

Path path_
 

Private Member Functions

void recursive_tree_walk (std::list< risc::InstanceTree > &occurence, SgSymbol *var_sym)
 Iterates recursively over the tree and collects all matching objects. More...
 
SgVariableSymbol * get_mapped_reference (SgVariableSymbol *reference, SgClassDefinition *base_class_def, SgClassDefinition *parent_class_def, SgVariableDefinition *parent_member)
 This function determines the mapped variables symbol in the parent class. Only for internal use. More...
 

Member Typedef Documentation

typedef std::list<Element> risc::InstanceTree::Path

Member Enumeration Documentation

These are the kind for of variables for which a traversal can search.

Enumerator
ModuleInstance 
PrimitiveChannelInstance 
HierarchicalChannelInstance 
EventInstance 
VariableInstance 
PortInstance 

Constructor & Destructor Documentation

risc::InstanceTree::InstanceTree ( )
risc::InstanceTree::InstanceTree ( const InstanceTree other)

Member Function Documentation

risc::InstanceTree::extend_with_symbol_list ( std::list< SgVariableSymbol * >  syms)

create a copy of current instance tree, extend the copy

risc::InstanceTree::find_all_instances_of ( SgSymbol *  var_sym)

This function returns all variables.

risc::InstanceTree::get_all_events ( std::list< InstanceTree > &  occurence)

returns all events

risc::InstanceTree::get_all_ports ( std::list< InstanceTree > &  occurence)

returns all ports

risc::InstanceTree::get_instance_tree ( SgVariableDefinition *  var_def,
int  instance_id,
risc::InstanceTree tree,
VariableType  type 
)

find the instance path to a variable with a given instance id of the hosting module

Parameters
var_defvariable for which is searched
instance_idinstance id of the hosting module/channel
treesearch starts from here
typetype of the variable
risc::InstanceTree::get_mapped_reference ( SgVariableSymbol *  reference,
SgClassDefinition *  base_class_def,
SgClassDefinition *  parent_class_def,
SgVariableDefinition *  parent_member 
)
private

This function determines the mapped variables symbol in the parent class. Only for internal use.

risc::InstanceTree::get_object ( )

returns the object

risc::InstanceTree::get_object_symbol ( )

returns the symbol of the object

risc::InstanceTree::get_parent ( )

This function returns the parent variable of variable.

risc::InstanceTree::get_real_mapped_variable ( )

This function returns mapped variables for a reference. If the mapped variable is a global variable, the first scope pointer will be NULL.

risc::InstanceTree::get_scope ( )

returns the scope of the object

bool risc::InstanceTree::operator== ( const InstanceTree ohs) const
risc::InstanceTree::pop_back ( )

Deletes the last element in the instance tree.

risc::InstanceTree::print_instance_tree ( )

Prints the instance tree.

risc::InstanceTree::push_back ( Element  ohs)

Appends element ohs at the end of the list.

risc::InstanceTree::recursive_tree_walk ( SgVariableDefinition *  var_def,
int &  current_id,
int  instance_id,
risc::InstanceTree tree,
bool &  found,
VariableType  type 
)

For internal usage only!

risc::InstanceTree::recursive_tree_walk ( std::list< risc::InstanceTree > &  occurence,
SgSymbol *  var_sym 
)
private

Iterates recursively over the tree and collects all matching objects.

Member Data Documentation

Path risc::InstanceTree::path_

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