All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
class_is_derived_from.h
Go to the documentation of this file.
1 #ifndef CLASS_IS_DERIVED_FROM_H_INCLUDED_
2 #define CLASS_IS_DERIVED_FROM_H_INCLUDED_
3 
4 #include <unordered_map>
5 
6 #include "rose.h"
7 
8 
9 namespace risc {
10 
11 namespace tools {
12 
16 extern std::unordered_map<SgClassDefinition*,
17  std::unordered_map<SgClassDefinition*, bool> > lookup;
18 
31 bool
33  SgClassDefinition* derived_class,
34  SgClassDefinition* base_class);
35 
47 bool
49  SgClassDefinition* derived_class,
50  SgClassDefinition* base_class);
51 
59 bool
60 is_derived_from_sc_interface(SgClassDefinition* derived_class);
61 
68 bool
69 is_derived_from_sc_channel(SgClassDefinition* derived_class);
70 
77 bool
78 is_derived_from_sc_prim_channel(SgClassDefinition* derived_class);
79 
86 bool
87 is_derived_from_sc_module(SgClassDefinition* derived_class);
88 
95 bool
96 is_derived_from_sc_port(SgClassDefinition* derived_class);
97 
104 bool
105 is_derived_from_sc_port_base(SgClassDefinition* derived_class);
106 
113 bool
114 is_derived_from_tlm_base_initiator_socket_b(SgClassDefinition* derived_class);
115 
122 bool
123 is_derived_from_tlm_base_target_socket_b(SgClassDefinition* derived_class);
124 
131 bool
132 is_derived_from_sc_port_base(SgVarRefExp* var_ref);
133 
140 bool
141 is_derived_from_sc_prim_channel(SgClassDefinition* derived_class);
142 
149 bool
150 is_derived_from_sc_channel(SgClassDefinition* derived_class);
151 
158 bool
159 is_sc_event(SgClassDefinition* derived_class);
160 
167 bool
168 is_sc_event_and_list(SgClassDefinition* derived_class);
169 
176 bool
177 is_sc_event_or_list(SgClassDefinition* derived_class);
178 
186 bool
187 is_sc_time(SgVarRefExp* var_ref);
188 
196 bool
197 is_sc_event(SgVarRefExp* var_ref);
198 
206 bool
207 is_sc_event_and_list(SgVarRefExp* var_ref);
208 
216 bool
217 is_sc_event_or_list(SgVarRefExp* var_ref);
218 
225 bool
226 is_sc_port(SgClassDefinition* derived_class);
227 
235 bool
236 is_sc_in_port(SgTemplateInstantiationDefn* template_class);
237 
246 bool
247 is_sc_out_port(SgTemplateInstantiationDefn* template_class);
248 
257 bool
258 is_sc_inout_port(SgTemplateInstantiationDefn* template_class);
259 
267 bool
268 is_sc_in_clk(SgClassDefinition* definition);
269 
277 bool
278 is_sc_out_clk(SgClassDefinition* definition);
279 
287 bool
288 is_sc_inout_clk(SgClassDefinition* definition);
289 
297 bool
298 is_sc_in_bool(SgClassDefinition* definition);
299 
307 bool
308 is_sc_fifo_in(SgVarRefExp *var_ref);
309 
317 bool
318 is_sc_fifo_out(SgVarRefExp *var_ref);
319 
320 } // end namespace tools
321 
322 } // end namespace risc
323 
324 #endif /* CLASS_IS_DERIVED_FROM_H_INCLUDED_ */
325 
326 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */
bool is_derived_from_sc_channel(SgClassDefinition *derived_class)
This function checks if the class is derived from sc_channel.
Definition: class_is_derived_from.cpp:257
bool is_derived_from_sc_prim_channel(SgClassDefinition *derived_class)
This function checks if the class is derived from sc_prim_channel.
Definition: class_is_derived_from.cpp:250
bool is_derived_from_tlm_base_initiator_socket_b(SgClassDefinition *derived_class)
This function checks if the class is derived from tlm_base_initiator_socket_b.
Definition: class_is_derived_from.cpp:208
bool is_sc_inout_clk(SgClassDefinition *definition)
This function checks if the given defintion is qual to the definition of a sc_inout_clk.
Definition: class_is_derived_from.cpp:325
bool is_derived_from_tlm_base_target_socket_b(SgClassDefinition *derived_class)
This function checks if the class is derived from tlm_base_target_socket_b.
Definition: class_is_derived_from.cpp:216
bool is_derived_from_sc_interface(SgClassDefinition *derived_class)
This function checks if the class is derived from sc_interface.
Definition: class_is_derived_from.cpp:178
bool is_sc_port(SgClassDefinition *derived_class)
This function checks if the class is derived from sc_port_base and not from tlm_base_initiator_socket...
Definition: class_is_derived_from.cpp:264
bool is_sc_event_and_list(SgClassDefinition *derived_class)
This function checks if the class is derived from sc_event_and_list or if it is sc_event_and_list its...
Definition: class_is_derived_from.cpp:343
bool is_derived_from_sc_port(SgClassDefinition *derived_class)
This function checks if the class is derived from sc_port.
Definition: class_is_derived_from.cpp:194
bool is_derived_from_internal(SgClassDefinition *derived_class, SgClassDefinition *base_class)
This function is for internal usage only because no caching is applied.
Definition: class_is_derived_from.cpp:65
bool is_sc_out_port(SgTemplateInstantiationDefn *template_class)
This function checks if the template class bases on the class template sc_out_port.
Definition: class_is_derived_from.cpp:285
bool is_sc_in_clk(SgClassDefinition *definition)
This function checks if the given defintion is qual to the definition of a sc_in_clk.
Definition: class_is_derived_from.cpp:309
bool is_sc_event_or_list(SgClassDefinition *derived_class)
This function checks if the class is derived from sc_event_or_list or if it is sc_event_or_list itsel...
Definition: class_is_derived_from.cpp:353
bool is_sc_fifo_in(SgVarRefExp *var_ref)
This function checks if the variable is of the type sc_fifo_in.
Definition: class_is_derived_from.cpp:460
bool is_sc_in_port(SgTemplateInstantiationDefn *template_class)
This function checks if the template class bases on the class template sc_in_port.
Definition: class_is_derived_from.cpp:273
bool is_derived_from_sc_port_base(SgClassDefinition *derived_class)
This function checks if the class is derived from sc_port_base.
Definition: class_is_derived_from.cpp:201
bool is_sc_in_bool(SgClassDefinition *definition)
This function checks if the given defintion is qual to the definition of a sc_in&lt;bool&gt; ...
Definition: class_is_derived_from.cpp:436
bool is_sc_time(SgVarRefExp *var_ref)
This function checks if the variable access is of the type sc_time (or a reference to a sc_time) ...
Definition: class_is_derived_from.cpp:422
bool is_derived_from_sc_module(SgClassDefinition *derived_class)
This function checks if the class is derived from sc_module.
Definition: class_is_derived_from.cpp:185
bool is_sc_event(SgClassDefinition *derived_class)
This function checks if the class is derived from sc_event or if it is sc_event itself.
Definition: class_is_derived_from.cpp:333
bool is_sc_out_clk(SgClassDefinition *definition)
This function checks if the given defintion is qual to the definition of a sc_out_clk.
Definition: class_is_derived_from.cpp:317
bool is_sc_fifo_out(SgVarRefExp *var_ref)
This function checks if the variable is of the type sc_fifo_out.
Definition: class_is_derived_from.cpp:497
std::unordered_map< SgClassDefinition *, std::unordered_map< SgClassDefinition *, bool > > lookup
lookup for derived classes (base class, derived class, is derived)
Definition: class_is_derived_from.cpp:14
bool is_derived_from(SgClassDefinition *derived_class, SgClassDefinition *base_class)
This function checks if the derived class is derived from the base class Caching techniques are appli...
Definition: class_is_derived_from.cpp:21
bool is_sc_inout_port(SgTemplateInstantiationDefn *template_class)
This function checks if the template class bases on the class template sc_inout_port.
Definition: class_is_derived_from.cpp:297