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 00163 bool 00164 is_sc_event(SgVarRefExp* var_ref); 00165 00173 bool 00174 is_sc_event_and_list(SgVarRefExp* var_ref); 00175 00183 bool 00184 is_sc_event_or_list(SgVarRefExp* var_ref); 00185 00194 bool 00195 is_sc_in_port(SgTemplateInstantiationDefn* template_class); 00196 00205 bool 00206 is_sc_out_port(SgTemplateInstantiationDefn* template_class); 00207 00216 bool 00217 is_sc_inout_port(SgTemplateInstantiationDefn* template_class); 00218 00226 bool 00227 is_sc_in_clk(SgClassDefinition* definition); 00228 00236 bool 00237 is_sc_out_clk(SgClassDefinition* definition); 00238 00246 bool 00247 is_sc_inout_clk(SgClassDefinition* definition); 00248 00256 bool 00257 is_sc_in_bool(SgClassDefinition* definition); 00258 00266 bool 00267 is_sc_fifo_in(SgVarRefExp *var_ref); 00268 00276 bool 00277 is_sc_fifo_out(SgVarRefExp *var_ref); 00278 00279 } // end namespace tools 00280 00281 } // end namespace risc 00282 00283 #endif /* CLASS_IS_DERIVED_FROM_H_INCLUDED_ */ 00284 00285 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */