source: trunk/src/Logger.h@ 1102

Last change on this file since 1102 was 1102, checked in by mar637, 18 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
RevLine 
[1102]1#ifndef ASAPLOGGER_H
2#define ASAPLOGGER_H
[717]3
4#include <string>
5#include <iostream>
6
7namespace asap {
[1102]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 */
[890]16class Logger {
[717]17public:
[1102]18 /**
19 * Default Constructor
20 **/
[890]21 Logger();
[1102]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 */
[1030]32 virtual ~Logger();
[1102]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 */
[883]38 void pushLog(const std::string& s, bool newline=true) const;
[1102]39 /**
40 * pop the message form the logger
41 * @returns the log message string
42 */
[717]43 std::string popLog() const;
[1102]44 /**
45 * enable logging
46 */
[717]47 virtual void enableLog();
[1102]48 /**
49 * disable logging
50 */
[717]51 virtual void disableLog();
[1102]52
[717]53private:
54 static std::string log_;
55 bool enabled_;
56};
57
[1102]58} // namespace
[717]59
60#endif
61
Note: See TracBrowser for help on using the repository browser.