00001 #ifndef CLASS_IS_DERIVED_FROM_H_INCLUDED_ 00002 #define CLASS_IS_DERIVED_FROM_H_INCLUDED_ 00003 00004 #include <unordered_map> 00005 00006 #include "rose.h" 00007 00008 00009 namespace risc { 00010 00011 namespace tools { 00012 00016 extern std::unordered_map<SgClassDefinition*, 00017 std::unordered_map<SgClassDefinition*, bool> > lookup; 00018 00029 bool 00030 is_derived_from( 00031 SgClassDefinition* derived_class, 00032 SgClassDefinition* base_class); 00033 00043 bool 00044 is_derived_from_internal( 00045 SgClassDefinition* derived_class, 00046 SgClassDefinition* base_class); 00047 00054 bool 00055 is_derived_from_sc_interface(SgClassDefinition* derived_class); 00056 00063 bool 00064 is_derived_from_sc_channel(SgClassDefinition* derived_class); 00065 00072 bool 00073 is_derived_from_sc_prim_channel(SgClassDefinition* derived_class); 00074 00081 bool 00082 is_derived_from_sc_module(SgClassDefinition* derived_class); 00083 00090 bool 00091 is_derived_from_sc_port(SgClassDefinition* derived_class); 00092 00099 bool 00100 is_derived_from_sc_port_base(SgClassDefinition* derived_class); 00101 00108 bool 00109 is_derived_from_sc_port_base(SgVarRefExp* var_ref); 00110 00117 bool 00118 is_derived_from_sc_prim_channel(SgClassDefinition* derived_class); 00119 00126 bool 00127 is_derived_from_sc_channel(SgClassDefinition* derived_class); 00128 00135 bool 00136 is_sc_event(SgClassDefinition* derived_class); 00137 00144 bool 00145 is_sc_event_and_list(SgClassDefinition* derived_class); 00146 00153 bool 00154 is_sc_event_or_list(SgClassDefinition* derived_class); 00155 00162 bool 00163 is_sc_event(SgVarRefExp* var_ref); 00164 00171 bool 00172 is_sc_event_and_list(SgVarRefExp* var_ref); 00173 00180 bool 00181 is_sc_event_or_list(SgVarRefExp* var_ref); 00182 00191 bool 00192 is_sc_in_port(SgTemplateInstantiationDefn* template_class); 00193 00202 bool 00203 is_sc_out_port(SgTemplateInstantiationDefn* template_class); 00204 00213 bool 00214 is_sc_inout_port(SgTemplateInstantiationDefn* template_class); 00215 00223 bool 00224 is_sc_in_clk(SgClassDefinition* definition); 00225 00233 bool 00234 is_sc_out_clk(SgClassDefinition* definition); 00235 00243 bool 00244 is_sc_inout_clk(SgClassDefinition* definition); 00245 00253 bool 00254 is_sc_in_bool(SgClassDefinition* definition); 00255 00263 bool 00264 is_sc_fifo_in(SgVarRefExp *var_ref); 00265 00273 bool 00274 is_sc_fifo_out(SgVarRefExp *var_ref); 00275 00276 } // end namespace tools 00277 00278 } // end namespace risc 00279 00280 #endif /* CLASS_IS_DERIVED_FROM_H_INCLUDED_ */ 00281 00282 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */