Debian Codegraph @

Source/Logger/CLogObserverData.h

raw
1 /*
2 * Copyright (C) 2013-2015, 2019 by the Konclude Developer Team.
3 *
4 * This file is part of the reasoning system Konclude.
5 * For details and support, see <http://konclude.com/>.
6 *
7 * Konclude is free software: you can redistribute it and/or modify
8 * it under the terms of version 3 of the GNU Lesser General Public
9 * License (LGPLv3) as published by the Free Software Foundation.
10 *
11 * Konclude is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU (Lesser) General Public License for more details.
15 *
16 * You should have received a copy of the GNU (Lesser) General Public
17 * License along with Konclude. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20 #ifndef LOGGER_CLogObserverData_H
21 #define LOGGER_CLogObserverData_H
22
23 #include <QSet>
24 #include <QStringList>
25
26 #include "CLogMessage.h"
27 #include "CAbstractLogObserver.h"
28
29 namespace Konclude {
30
31 namespace Logger {
32
33 /*! \class CLogObserverData
34 * \version 0.3
35 * \author Andreas Steigmiller
36 * \brief The abstract base Class for each Log-Entry for the CLogger
37 */
38 class CLogObserverData {
39
40 public:
41 CLogObserverData(CAbstractLogObserver *logObserver, double logLevel = 0, QStringList observeDomains = QStringList());
42 virtual ~CLogObserverData();
43
44 virtual void postLogMessage(CLogMessage *message);
45
46 virtual void postLogMessageOnce(CLogMessage *message);
47 virtual void postLogMessageMulti(CLogMessage *message);
48
49 QStringList getLogDomains();
50 void setLogDomains(QStringList observeDomains);
51 void addLogDomain(QString domain);
52 void removeLogDomain(QString domain);
53
54 double getLogLevel();
55 void setLogLevel(double logLevel);
56
57 private:
58 CAbstractLogObserver *observer;
59 QSet<qint64> sendedLogSet;
60
61 bool postOnce;
62 QStringList domains;
63 double level;
64
65 };
66
67 }; // end namespace Logger
68
69 }; // end namespace Konclude
70
71 #endif // LOGGER_CLogObserverData_H