source: branches/Release12/src/SDLog.cc@ 1557

Last change on this file since 1557 was 717, checked in by mar637, 19 years ago

implemented use of SDLog

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 483 bytes
Line 
1#include "SDLog.h"
2
3using namespace asap;
4
5std::string SDLog::log_ = std::string("");
6
7SDLog::SDLog()
8{
9 enableLog();
10}
11
12SDLog::SDLog(bool enabled)
13{
14 enabled_ = enabled;
15}
16
17void SDLog::pushLog(const std::string& s) const
18{
19 if (enabled_) {
20 log_+=s;log_+="\n";
21 };
22}
23std::string SDLog::popLog() const
24{
25 std::string out;
26 if (enabled_) out=log_;log_="";
27 return out;
28}
29void SDLog::enableLog()
30{
31 enabled_ = true;
32}
33void SDLog::disableLog()
34{
35 enabled_ = false;
36}
Note: See TracBrowser for help on using the repository browser.