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

#include <definition.h>

Inheritance diagram for risc::Definition:
Inheritance graph
Collaboration diagram for risc::Definition:
Collaboration graph

Public Types

enum  Type {
  CThreadType, ChannelType, ChannelInstanceType, ClassType,
  DefinitionType, EventType, FunctionType, HierarchicalChannelType,
  HierarchicalChannelInstanceType, InOutPortType, InPortType, InstanceType,
  InterfaceType, MethodType, ModuleType, ModuleInstanceType,
  ObjectType, OutPortType, PortType, PrimitiveChannelType,
  PrimitiveChannelInstanceType, ThreadType, VariableType, SocketType,
  InitiatorSocketType, TargetSocketType
}
 We are using these enums to identify type type of and instance or definition during traversal. More...
 

Public Member Functions

 Definition (SgNode *ast_node, Type type=DefinitionType)
 default constructor More...
 
virtual std::string get_name ()
 Returns the name of the defintion. More...
 
virtual SgNode * get_ast_node ()
 Returns the associated ast node of the definition. More...
 
virtual SgType * get_ast_type ()
 Returns the type of the ast node. More...
 
virtual std::string get_ast_type_name ()
 Returns the name of the type of the ast node. More...
 
bool has_source_location ()
 Determines if a ast node has an associated ast node. More...
 
std::string get_file_name ()
 Get the name of the file where the declaration is located. More...
 
int get_line_number ()
 Get the line number of the instance. More...
 
int get_position_in_line ()
 Get the position of the in declaration in the corresponding line In other words the column in the line. More...
 

Public Attributes

Type type_
 
SgNode * ast_node_
 
SgType * ast_type_pointer_
 

Private Member Functions

 Definition (const Definition &rhs)
 

Member Enumeration Documentation

We are using these enums to identify type type of and instance or definition during traversal.

Enumerator
CThreadType 
ChannelType 
ChannelInstanceType 
ClassType 
DefinitionType 
EventType 
FunctionType 
HierarchicalChannelType 
HierarchicalChannelInstanceType 
InOutPortType 
InPortType 
InstanceType 
InterfaceType 
MethodType 
ModuleType 
ModuleInstanceType 
ObjectType 
OutPortType 
PortType 
PrimitiveChannelType 
PrimitiveChannelInstanceType 
ThreadType 
VariableType 
SocketType 
InitiatorSocketType 
TargetSocketType 

Constructor & Destructor Documentation

risc::Definition::Definition ( SgNode *  ast_node,
Type  type = DefinitionType 
)
explicit

default constructor

risc::Definition::Definition ( const Definition rhs)
private

Member Function Documentation

SgNode * risc::Definition::get_ast_node ( )
virtual

Returns the associated ast node of the definition.

Reimplemented in risc::Class, risc::Function, and risc::Object.

SgType * risc::Definition::get_ast_type ( )
virtual

Returns the type of the ast node.

std::string risc::Definition::get_ast_type_name ( )
virtual
std::string risc::Definition::get_file_name ( )

Get the name of the file where the declaration is located.

Returns
filename
int risc::Definition::get_line_number ( )

Get the line number of the instance.

Returns
line number
std::string risc::Definition::get_name ( )
virtual

Returns the name of the defintion.

Reimplemented in risc::Class, risc::Object, and risc::Function.

int risc::Definition::get_position_in_line ( )

Get the position of the in declaration in the corresponding line In other words the column in the line.

Returns
position in line
bool risc::Definition::has_source_location ( )

Determines if a ast node has an associated ast node.

Member Data Documentation

SgNode* risc::Definition::ast_node_
SgType* risc::Definition::ast_type_pointer_
Type risc::Definition::type_

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