Last change
on this file since 1103 was 1102, checked in by mar637, 19 years ago |
added documentation
fixed ifndef
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.1 KB
|
Line | |
---|
1 | #ifndef ASAPLOGGER_H
|
---|
2 | #define ASAPLOGGER_H
|
---|
3 |
|
---|
4 | #include <string>
|
---|
5 | #include <iostream>
|
---|
6 |
|
---|
7 | namespace asap {
|
---|
8 | /**
|
---|
9 | * This class provides the logging within asap. All other classes which need to log
|
---|
10 | * should inherit from this.
|
---|
11 | * @brief The ASAP logging class
|
---|
12 | * @author Malte Marquarding
|
---|
13 | * @date $Date: 2006-08-02 03:16:16 +0000 (Wed, 02 Aug 2006) $
|
---|
14 | * @version
|
---|
15 | */
|
---|
16 | class Logger {
|
---|
17 | public:
|
---|
18 | /**
|
---|
19 | * Default Constructor
|
---|
20 | **/
|
---|
21 | Logger();
|
---|
22 |
|
---|
23 | /**
|
---|
24 | * Constructor with switch to enable/disable logging
|
---|
25 | * @param[in] enabled indicating the deafult state
|
---|
26 | */
|
---|
27 | Logger(bool enabled);
|
---|
28 |
|
---|
29 | /*
|
---|
30 | * Destructor
|
---|
31 | */
|
---|
32 | virtual ~Logger();
|
---|
33 | /**
|
---|
34 | * push another message into the logger
|
---|
35 | * @param[in] the message
|
---|
36 | * @param[in] whether to add a newline character at the end
|
---|
37 | */
|
---|
38 | void pushLog(const std::string& s, bool newline=true) const;
|
---|
39 | /**
|
---|
40 | * pop the message form the logger
|
---|
41 | * @returns the log message string
|
---|
42 | */
|
---|
43 | std::string popLog() const;
|
---|
44 | /**
|
---|
45 | * enable logging
|
---|
46 | */
|
---|
47 | virtual void enableLog();
|
---|
48 | /**
|
---|
49 | * disable logging
|
---|
50 | */
|
---|
51 | virtual void disableLog();
|
---|
52 |
|
---|
53 | private:
|
---|
54 | static std::string log_;
|
---|
55 | bool enabled_;
|
---|
56 | };
|
---|
57 |
|
---|
58 | } // namespace
|
---|
59 |
|
---|
60 | #endif
|
---|
61 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.