00001 #ifndef MODULE_INSTANCE_H_INCLUDED_ 00002 #define MODULE_INSTANCE_H_INCLUDED_ 00003 00004 #include <string> 00005 #include <vector> 00006 #include <map> 00007 00008 #include "rose.h" 00009 00010 #include "instance.h" 00011 #include "port.h" 00012 #include "object.h" 00013 00014 #include "class.h" // included for get_definition 00015 #include "module.h" // included for get_definition 00016 00017 namespace risc { 00018 00024 class ModuleInstance: public Instance { 00025 00026 public: 00027 00031 explicit ModuleInstance(SgVariableDefinition *ast_node, Module *ir_def); 00032 00037 explicit ModuleInstance(SgVariableDefinition *ast_node, Type type); 00038 00043 virtual Module* get_definition(); 00044 00049 void add_mapping(Port *port, Object *object); 00050 00051 std::map<Port*, Object*> mapping_; 00052 00053 private: 00054 00059 Module* module_definition_; 00060 00064 ModuleInstance(const ModuleInstance &md); 00065 }; 00066 00067 typedef std::vector<ModuleInstance*> 00068 ModuleInstanceVector; 00069 typedef std::vector<ModuleInstance*>::iterator 00070 ModuleInstanceVectorIter; 00071 typedef std::vector<ModuleInstance*>::const_iterator 00072 ModuleInstanceVectorConstIter; 00073 00074 }; // end namespace risc 00075 00076 #endif /* MODULE_INSTANCE_H_INCLUDED_ */ 00077 00078 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */