]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - tools/debugserver/source/MacOSX/DarwinLog/LogFilterChain.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / tools / debugserver / source / MacOSX / DarwinLog / LogFilterChain.h
1 //===-- LogFilterChain.h ----------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LogFilterChain_h
11 #define LogFilterChain_h
12
13 #include <vector>
14
15 #include "DarwinLogInterfaces.h"
16
17 class LogFilterChain {
18 public:
19   LogFilterChain(bool default_accept);
20
21   void AppendFilter(const LogFilterSP &filter_sp);
22
23   void ClearFilterChain();
24
25   bool GetDefaultAccepts() const;
26
27   void SetDefaultAccepts(bool default_accepts);
28
29   bool GetAcceptMessage(const LogMessage &message) const;
30
31 private:
32   using FilterVector = std::vector<LogFilterSP>;
33
34   FilterVector m_filters;
35   bool m_default_accept;
36 };
37
38 #endif /* LogFilterChain_hpp */