00001 #ifndef DEFINITION_H_INCLUDED_
00002 #define DEFINITION_H_INCLUDED_
00003
00004 #include <string>
00005
00006 #include "rose.h"
00007
00008
00009 namespace risc {
00010
00011 class Class;
00012
00013 class Definition {
00014
00015 public:
00016
00021 enum Type {
00022 CThreadType,
00023 ChannelType,
00024 ChannelInstanceType,
00025 ClassType,
00026 DefinitionType,
00027 EventType,
00028 FunctionType,
00029 HierarchicalChannelType,
00030 HierarchicalChannelInstanceType,
00031 InOutPortType,
00032 InPortType,
00033 InstanceType,
00034 MethodType,
00035 ModuleType,
00036 ModuleInstanceType,
00037 ObjectType,
00038 OutPortType,
00039 PortType,
00040 PrimitiveChannelType,
00041 PrimitiveChannelInstanceType,
00042 ThreadType,
00043 VariableType
00044 };
00045
00046 Type type_;
00047
00051 explicit Definition(SgNode *ast_node, Type type = DefinitionType);
00052
00056 virtual std::string get_name();
00057
00061 virtual SgNode* get_ast_node();
00062
00066 virtual SgType* get_ast_type();
00067
00071 virtual std::string get_ast_type_name();
00072
00076 bool has_source_location();
00077
00082 std::string get_file_name();
00083
00088 int get_line_number();
00089
00095 int get_position_in_line();
00096
00097 SgNode* ast_node_;
00098 SgType* ast_type_pointer_;
00099
00100 private:
00101 Definition(const Definition& rhs);
00102 };
00103
00104
00105 }
00106
00107
00108 #endif
00109
00110