All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
definition.h
Go to the documentation of this file.
1 #ifndef DEFINITION_H_INCLUDED_
2 #define DEFINITION_H_INCLUDED_
3 
4 #include <string>
5 
6 #include "rose.h"
7 
8 namespace risc {
9 
10 class Class;
11 
12 class Definition {
13 
14 public:
15 
20  enum Type {
44  /* TLM 2.0 */
48  };
49 
51 
55  explicit Definition(SgNode *ast_node, Type type = DefinitionType);
56 
60  virtual std::string get_name();
61 
65  virtual SgNode* get_ast_node();
66 
70  virtual SgType* get_ast_type();
71 
75  virtual std::string get_ast_type_name();
76 
80  bool has_source_location();
81 
86  std::string get_file_name();
87 
92  int get_line_number();
93 
100 
101  SgNode* ast_node_;
103 
104 private:
105  Definition(const Definition& rhs);
106 };
107 
108 
109 } // end of namespace risc
110 
111 
112 #endif /* DEFINITION_H_INCLUDED_ */
113 
114 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
Definition: definition.h:30
Type type_
Definition: definition.h:50
Definition: definition.h:47
Definition: definition.h:46
Definition: definition.h:31
virtual SgNode * get_ast_node()
Returns the associated ast node of the definition.
Definition: definition.cpp:21
Definition: definition.h:12
SgType * ast_type_pointer_
Definition: definition.h:102
Definition: definition.h:25
Definition: definition.h:22
Definition: definition.h:40
Definition: definition.h:23
std::string get_file_name()
Get the name of the file where the declaration is located.
Definition: definition.cpp:45
bool has_source_location()
Determines if a ast node has an associated ast node.
Definition: definition.cpp:34
Definition: definition.h:33
Definition: definition.h:34
int get_line_number()
Get the line number of the instance.
Definition: definition.cpp:53
Definition: definition.h:45
virtual std::string get_ast_type_name()
Returns the name of the type of the ast node.
Definition: definition.cpp:15
Definition: definition.h:24
virtual SgType * get_ast_type()
Returns the type of the ast node.
Definition: definition.cpp:27
Definition(SgNode *ast_node, Type type=DefinitionType)
default constructor
Definition: definition.cpp:3
Definition: definition.h:35
SgNode * ast_node_
Definition: definition.h:101
Definition: definition.h:21
virtual std::string get_name()
Returns the name of the defintion.
Definition: definition.cpp:9
Definition: definition.h:36
Definition: definition.h:37
Definition: definition.h:39
Type
We are using these enums to identify type type of and instance or definition during traversal...
Definition: definition.h:20
Definition: definition.h:43
Definition: definition.h:38
Definition: definition.h:27
Definition: definition.h:26
Definition: definition.h:32
Definition: definition.h:42
int get_position_in_line()
Get the position of the in declaration in the corresponding line In other words the column in the lin...
Definition: definition.cpp:61