libcsdbg  1.28
C++ exception (and generic) stack trace debug library
filter.hpp
Go to the documentation of this file.
1 #ifndef _CSDBG_FILTER
2 #define _CSDBG_FILTER 1
3 
10 #include "./object.hpp"
11 
12 namespace csdbg {
13 
23 class filter: virtual public object
24 {
25 protected:
26 
27  /* Protected variables */
28 
29  regex_t m_expr;
31  bool m_mode;
34  /* Protected copy constructors */
35 
36  filter(const filter&);
37 
38  virtual filter* clone() const;
39 
40 
41  /* Protected operator overloading methods */
42 
43  virtual filter& operator=(const filter&);
44 
45 public:
46 
47  /* Friend classes and functions */
48 
49  template <class F> friend class node;
50 
51  template <class F> friend class chain;
52 
53 
54  /* Constructors, copy constructors and destructor */
55 
56  filter(const i8*, bool, bool = true);
57 
58  virtual ~filter();
59 
60 
61  /* Accessor methods */
62 
63  virtual bool mode() const;
64 
65  virtual filter& set_expr(const i8*, bool);
66 
67  virtual filter& set_mode(bool);
68 
69 
70  /* Generic methods */
71 
72  virtual bool apply(const i8*) const;
73 };
74 
75 }
76 
77 #endif
78 
This abstract class serves as the root of the class hierarchy tree.
Definition: object.hpp:17
Lightweight, templated, doubly-linked list (using XOR linking)
Definition: chain.hpp:33
char i8
8-bit signed integer
Definition: config.hpp:72
filter(const filter &)
Object copy constructor.
Definition: filter.cpp:17
Class csdbg::object definition.
virtual ~filter()
Object destructor.
Definition: filter.cpp:68
virtual filter & set_expr(const i8 *, bool)
Set the filter expression.
Definition: filter.cpp:96
bool m_mode
Filter type switch.
Definition: filter.hpp:31
virtual bool mode() const
Get the filter type.
Definition: filter.cpp:79
virtual filter & operator=(const filter &)
Assignment operator.
Definition: filter.cpp:40
virtual bool apply(const i8 *) const
Apply the filter to a function signature or a module absolute path.
Definition: filter.cpp:147
A node in a templated chain (doubly-linked list) or stack (singly-linked LIFO queue) ...
Definition: node.hpp:36
virtual filter * clone() const
Object virtual copy constructor.
Definition: filter.cpp:27
regex_t m_expr
Filter expression.
Definition: filter.hpp:29
Instrumentation filter.
Definition: filter.hpp:23
virtual filter & set_mode(bool)
Set the filter type.
Definition: filter.cpp:133