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::Variable Class Reference

This class represents a variable in a module. More...

#include <variable.h>

Inheritance diagram for risc::Variable:
Inheritance graph
Collaboration diagram for risc::Variable:
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

 Variable (SgVariableDefinition *ast_node)
 default constructor More...
 
virtual std::string get_ast_type_name ()
 Returns the type of the variable definition. More...
 
bool is_reference ()
 returns true if the variable is a reference More...
 
bool is_static ()
 returns true if the variable is a static variable More...
 
bool is_pointer ()
 returns true if the variable is a pointer More...
 
SgVariableDefinition * get_ast_node ()
 Returns the ast definition of the object. More...
 
bool is_array ()
 checks if this object is an array More...
 
virtual std::string get_name ()
 Get function for the name of the module instance variable. More...
 
SgVariableSymbol * get_symbol ()
 return the symbol of the object More...
 
virtual SgType * get_ast_type ()
 Returns 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

unsigned int number_of_array_elements_
 
Type type_
 
SgNode * ast_node_
 
SgType * ast_type_pointer_
 

Private Member Functions

 Variable (const Variable &v)
 Disabled copy constructor. More...
 

Detailed Description

This class represents a variable in a module.

Member Enumeration Documentation

enum risc::Definition::Type
inherited

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::Variable::Variable ( SgVariableDefinition *  ast_node)
explicit

default constructor

risc::Variable::Variable ( const Variable v)
private

Disabled copy constructor.

Member Function Documentation

SgVariableDefinition * risc::Object::get_ast_node ( )
virtualinherited

Returns the ast definition of the object.

Returns
Pointer to the definition

Reimplemented from risc::Definition.

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

Returns the type of the ast node.

std::string risc::Variable::get_ast_type_name ( )
virtual

Returns the type of the variable definition.

Returns
type as string

Reimplemented from risc::Definition.

std::string risc::Definition::get_file_name ( )
inherited

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

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

Get the line number of the instance.

Returns
line number
std::string risc::Object::get_name ( )
virtualinherited

Get function for the name of the module instance variable.

Returns
Name as std::string

Reimplemented from risc::Definition.

int risc::Definition::get_position_in_line ( )
inherited

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

Returns
position in line
risc::Object::get_symbol ( )
inherited

return the symbol of the object

bool risc::Definition::has_source_location ( )
inherited

Determines if a ast node has an associated ast node.

bool risc::Object::is_array ( )
inherited

checks if this object is an array

bool risc::Variable::is_pointer ( )

returns true if the variable is a pointer

bool risc::Variable::is_reference ( )

returns true if the variable is a reference

bool risc::Variable::is_static ( )

returns true if the variable is a static variable

Member Data Documentation

SgNode* risc::Definition::ast_node_
inherited
SgType* risc::Definition::ast_type_pointer_
inherited
unsigned int risc::Object::number_of_array_elements_
inherited
Type risc::Definition::type_
inherited

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