00001 #ifndef CLASS_H_INCLUDED_ 00002 #define CLASS_H_INCLUDED_ 00003 00004 #include <string> 00005 00006 #include "rose.h" 00007 00008 #include "definition.h" 00009 #include "event.h" 00010 #include "function.h" 00011 #include "variable.h" 00012 00013 #include "event.h" 00014 #include "module_instance.h" 00015 #include "primitive_channel_instance.h" 00016 #include "hierarchical_channel_instance.h" 00017 00018 #include "port.h" 00019 #include "inport.h" 00020 #include "inoutport.h" 00021 #include "outport.h" 00022 00023 namespace risc { 00024 00025 class Class: public Definition { 00026 00027 public: 00028 00032 explicit Class(SgClassDefinition *ast_node, Type type); 00033 00034 ~Class(); 00035 00036 virtual void initialize_functions(); 00037 00042 void initialize_variables(); 00043 00049 SgFunctionDefinition* get_before_end_of_elaboration_definition(); 00050 00055 Variable* find_variable(SgVariableDefinition* var_def); 00056 00060 Port* find_port(SgVariableDefinition* var_def); 00061 00065 Event* find_event(SgVariableDefinition* var_def); 00066 00070 ModuleInstance* find_module(SgVariableDefinition* var_def); 00071 00075 PrimitiveChannelInstance* find_prim_channel(SgVariableDefinition* var_def); 00076 00080 HierarchicalChannelInstance* find_hier_channel(SgVariableDefinition* var_def); 00081 00086 SgClassDefinition* get_ast_node(); 00087 00091 std::string get_name(); 00092 00097 virtual std::string get_ast_type_name(); 00098 00102 EventVector events_; 00103 00107 VariableVector variables_; 00108 00112 InPortVector inports_; 00113 00117 InOutPortVector inoutports_; 00118 00122 OutPortVector outports_; 00123 00128 PrimitiveChannelInstanceVector sub_prim_channel_; 00129 00134 HierarchicalChannelInstanceVector sub_hier_channel_; 00135 00139 ModuleInstanceVector sub_modules_; 00140 00144 FunctionVector functions_; 00145 00146 private: 00150 Class(const Class &c); 00151 }; 00152 00153 00154 } // end of namespace risc 00155 00156 00157 #endif /* CLASS_H_INCLUDED_ */ 00158 00159 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */