Loading...
Searching...
No Matches
filters.hpp
Go to the documentation of this file.
1
2#pragma once
3
5
6namespace by {
16 class _nout filters: public filterable {
17 BY(ME(filters))
18
19 public:
20 filters() {}
21
29 template <typename... Es> explicit filters(const Es*... elems) { (add(elems), ...); }
30
31 virtual ~filters();
32
33 public:
34 ncnt len() const;
38 void rel();
43 void add(const filterable& new1);
48 void add(const filterable* new1);
53 void del();
62 nbool filt(errLv::level lv, const std::string& tag) const;
63
64 private:
65 std::vector<const filterable*> _arr;
66 };
67} // namespace by
Interface for objects that can filter log messages.
Definition filterable.hpp:17
Collection of filterable objects for logging control.
Definition filters.hpp:16
void rel()
Clears all contained filterable objects without deleting them.
nbool filt(errLv::level lv, const std::string &tag) const
Applies all contained filters to the log entry.
filters(const Es *... elems)
Constructs a filters object with multiple filterable elements.
Definition filters.hpp:29
void add(const filterable &new1)
Adds a filterable object to the collection.
void del()
Deletes all owned filterable objects and clears the collection.
void add(const filterable *new1)
Adds a filterable object to the collection.