00001 #ifndef DEFINITION_H_INCLUDED_
00002 #define DEFINITION_H_INCLUDED_
00003
00004 #include <string>
00005
00006 #include "rose.h"
00007
00008 namespace risc {
00009
00010 class Class;
00011
00012 class Definition {
00013
00014 public:
00015
00020 enum Type {
00021 CThreadType,
00022 ChannelType,
00023 ChannelInstanceType,
00024 ClassType,
00025 DefinitionType,
00026 EventType,
00027 FunctionType,
00028 HierarchicalChannelType,
00029 HierarchicalChannelInstanceType,
00030 InOutPortType,
00031 InPortType,
00032 InstanceType,
00033 InterfaceType,
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