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 
134 
141 bool
142 is_derived_from_sc_port_base(SgType* type);
143 
150 bool
151 is_derived_from_sc_prim_channel(SgClassDefinition* derived_class);
152 
159 bool
160 is_derived_from_sc_channel(SgClassDefinition* derived_class);
161 
168 bool
169 is_sc_event(SgClassDefinition* derived_class);
170 
177 bool
178 is_sc_event_and_list(SgClassDefinition* derived_class);
179 
186 bool
187 is_sc_event_or_list(SgClassDefinition* derived_class);
188 
196 bool
197 is_sc_time(SgVarRefExp* var_ref);
198 
206 bool
207 is_sc_event(SgVarRefExp* var_ref);
208 
216 bool
217 is_sc_event_and_list(SgVarRefExp* var_ref);
218 
226 bool
227 is_sc_event_or_list(SgVarRefExp* var_ref);
228 
235 bool
236 is_sc_port(SgClassDefinition* derived_class);
237 
245 bool
246 is_sc_in_port(SgTemplateInstantiationDefn* template_class);
247 
256 bool
257 is_sc_out_port(SgTemplateInstantiationDefn* template_class);
258 
267 bool
268 is_sc_inout_port(SgTemplateInstantiationDefn* template_class);
269 
277 bool
278 is_sc_in_clk(SgClassDefinition* definition);
279 
287 bool
288 is_sc_out_clk(SgClassDefinition* definition);
289 
297 bool
298 is_sc_inout_clk(SgClassDefinition* definition);
299 
307 bool
308 is_sc_in_bool(SgClassDefinition* definition);
309 
317 bool
318 is_sc_fifo_in(SgVarRefExp *var_ref);
319 
327 bool
328 is_sc_fifo_out(SgVarRefExp *var_ref);
329 
330 } // end namespace tools
331 
332 } // end namespace risc
333 
334 #endif /* CLASS_IS_DERIVED_FROM_H_INCLUDED_ */
335 
336 /* 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:264
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:257
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:332
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:271
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:350
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:292
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:316
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:360
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:467
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:280
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:443
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:429
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:340
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:324
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:504
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:304