All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
variable.h
Go to the documentation of this file.
1 #ifndef VARIABLE_H_INCLUDED_
2 #define VARIABLE_H_INCLUDED_
3 
4 #include <string>
5 #include <vector>
6 
7 #include "rose.h"
8 
9 #include "object.h"
10 
11 namespace risc {
12 
13 class Variable;
14 typedef std::vector<Variable*> VariableVector;
15 typedef std::vector<Variable*>::iterator VariableVectorIter;
16 typedef std::vector<Variable*>::const_iterator VariableVectorConstIter;
17 
22 class Variable: public Object {
23 
24 public:
25 
29  explicit Variable(SgVariableDefinition *ast_node);
30 
35  virtual std::string get_ast_type_name();
36 
40  bool is_reference();
41 
45  bool is_static();
46 
50  bool is_pointer();
51 
52 private:
53 
57  Variable(const Variable &v);
58 };
59 
60 }; // end of namespace risc
61 
62 #endif /* VARIABLE_H_INCLUDED_ */
63 
64 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
std::vector< Variable * >::const_iterator VariableVectorConstIter
Definition: variable.h:16
virtual std::string get_ast_type_name()
Returns the type of the variable definition.
Definition: variable.cpp:10
Variable(SgVariableDefinition *ast_node)
default constructor
Definition: variable.cpp:5
Definition: object.h:10
std::vector< Variable * > VariableVector
Definition: class.h:46
bool is_reference()
returns true if the variable is a reference
Definition: variable.cpp:21
bool is_pointer()
returns true if the variable is a pointer
Definition: variable.cpp:37
std::vector< Variable * >::iterator VariableVectorIter
Definition: variable.h:15
bool is_static()
returns true if the variable is a static variable
Definition: variable.cpp:29
This class represents a variable in a module.
Definition: variable.h:22