Functions

risc::tools Namespace Reference

Functions

bool is_derived_from (SgClassDefinition *derived_class, SgClassDefinition *base_class)
 This function checks if the derived class is derived from the base class.
bool is_derived_from_sc_module (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_module.
bool is_derived_from_sc_port (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_port.
bool is_derived_from_sc_port_base (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_port_base.
bool is_derived_from_sc_prim_channel (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_prim_channel.
bool is_derived_from_sc_channel (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_channel.
bool is_sc_event (SgClassDefinition *derived_class)
 This function checks if the class is derived from sc_event or if it is sc_event itself.
bool is_sc_in_port (SgTemplateInstantiationDefn *template_class)
 This function checks if the template class bases on the class template sc_in_port.
bool is_sc_out_port (SgTemplateInstantiationDefn *template_class)
 This function checks if the template class bases on the class template sc_out_port.
bool is_sc_inout_port (SgTemplateInstantiationDefn *template_class)
 This function checks if the template class bases on the class template sc_inout_port.
bool is_data_structure (SgType *type)
 This function checks if the passed type represents a data structure.
bool is_builtin_type (SgType *type)
 This function checks if the passed type represents a C++ builtin type.
bool class_types_are_identical (SgClassDefinition *cd1, SgClassDefinition *cd2)
 Compares two classes.
bool is_func_name (const SgFunctionDeclaration *function, const std::string &name)
 Compares the function name with the given string.
void print_indented (std::string s, unsigned indent)
 Prints a string with indention.
SgClassDefinition * class_definition_of_variable (SgVariableDeclaration *var_decl)
 Determines the class defintion of varialbe It is expected that the type is SgClassType.
SgClassDefinition * find_class_definition (std::string class_name, std::string qualified_namespace, SgNode *root_node)
 This function searchs for a class by name (string) in namespace (string).

Function Documentation

SgClassDefinition * risc::tools::class_definition_of_variable ( SgVariableDeclaration *  var_decl  ) 

Determines the class defintion of varialbe It is expected that the type is SgClassType.

Parameters:
var_decl The given variable declaration
Returns:
Associated SgClassDefintion of the var_decl
bool risc::tools::class_types_are_identical ( SgClassDefinition *  cd1,
SgClassDefinition *  cd2 
)

Compares two classes.

Parameters:
cd1 Class definition 1
cd2 Class definition 2
Returns:
True, if the types are equal
SgClassDefinition * risc::tools::find_class_definition ( std::string  class_name,
std::string  qualified_namespace,
SgNode *  root_node 
)

This function searchs for a class by name (string) in namespace (string).

Parameters:
class_name Name of the class
qualified_namespace The absolute qualified namespace
root_node In this subtree the search will performed
Returns:
Pointer to the class definition. The pointer is zero, if the class does not exist in the given namespace
bool risc::tools::is_builtin_type ( SgType *  type  ) 

This function checks if the passed type represents a C++ builtin type.

Parameters:
type Type that will be checked
Returns:
True, if the type represents a C++ builtin type
bool risc::tools::is_data_structure ( SgType *  type  ) 

This function checks if the passed type represents a data structure.

Parameters:
type Type that will be checked
Returns:
True, if the type represents a data structure
bool risc::tools::is_derived_from ( SgClassDefinition *  derived_class,
SgClassDefinition *  base_class 
)

This function checks if the derived class is derived from the base class.

Parameters:
derived_class the derived class definition
base_class the base class definition
Returns:
true, if the class defintion derived_class is derived from calls definition base_class. Otherwise false
bool risc::tools::is_derived_from_sc_channel ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_channel.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_channel
bool risc::tools::is_derived_from_sc_module ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_module.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_module
bool risc::tools::is_derived_from_sc_port ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_port.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_port
bool risc::tools::is_derived_from_sc_port_base ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_port_base.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_port_base
bool risc::tools::is_derived_from_sc_prim_channel ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_prim_channel.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_prim_channel
bool risc::tools::is_func_name ( const SgFunctionDeclaration *  function,
const std::string &  name 
)

Compares the function name with the given string.

Parameters:
function The function declaration
name String which will be compared
Returns:
True, if the string and the function name are equal
bool risc::tools::is_sc_event ( SgClassDefinition *  derived_class  ) 

This function checks if the class is derived from sc_event or if it is sc_event itself.

Parameters:
derived_class the derived class definition
Returns:
True, if the class is derived from sc_event
bool risc::tools::is_sc_in_port ( SgTemplateInstantiationDefn *  template_class  ) 

This function checks if the template class bases on the class template sc_in_port.

Parameters:
class the class definition
Returns:
True, if the template class bases on the class template sc_in_port
bool risc::tools::is_sc_inout_port ( SgTemplateInstantiationDefn *  template_class  ) 

This function checks if the template class bases on the class template sc_inout_port.

Parameters:
class the class definition
Returns:
True, if the template class bases on the class template sc_inout_port
bool risc::tools::is_sc_out_port ( SgTemplateInstantiationDefn *  template_class  ) 

This function checks if the template class bases on the class template sc_out_port.

Parameters:
class the class definition
Returns:
True, if the template class bases on the class template sc_out_port
void risc::tools::print_indented ( std::string  s,
unsigned  indent 
)

Prints a string with indention.

Parameters:
s Sting to print
indent Indention level
 All Classes Namespaces Files Functions Variables Typedefs