SQLsmith  v1.2.1-5-gfacd7a8
A random SQL query generator
impedance.hh
Go to the documentation of this file.
1 
4 
5 #ifndef IMPEDANCE_HH
6 #define IMPEDANCE_HH
7 
8 #include <typeinfo>
9 #include <map>
10 #include "prod.hh"
11 #include "util.hh"
12 #include "log.hh"
13 #include "dut.hh"
14 
16  std::map<const char*, long> &_occured;
17  std::map<const char*, bool> found;
18  virtual void visit(struct prod *p);
19  impedance_visitor(std::map<const char*, long> &occured);
20  virtual ~impedance_visitor();
21 };
22 
24  virtual void executed(prod &query);
25  virtual void error(prod &query, const dut::failure &e);
26  impedance_feedback() { }
27 };
28 
29 namespace impedance {
30  bool matched(const char *p);
31  inline bool matched(const std::type_info &id) { return matched(id.name()); }
32  inline bool matched(prod *p) { return matched(typeid(*p)); }
33  void retry(const char *p);
34  inline void retry(const std::type_info &id) { return retry(id.name()); }
35  inline void retry(prod *p) { return retry(typeid(*p)); }
36  void limit(const char *p);
37  inline void limit(const std::type_info &id) { return limit(id.name()); }
38  inline void limit(prod *p) { return limit(typeid(*p)); }
39  void fail(const char *p);
40  inline void fail(const std::type_info &id) { return fail(id.name()); }
41  inline void fail(prod *p) { return fail(typeid(*p)); }
42  void report();
43  void report(std::ostream &out);
44 }
45 
46 #endif
Base class for device under test.
logging
Base class for grammar productions.
logger base class
Definition: log.hh:15
Base class for walking the AST.
Definition: prod.hh:11
Base class for AST nodes.
Definition: prod.hh:17