Ignore:
Timestamp:
Mar 11, 2010, 2:19:53 PM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
Children:
e9f2e1
Parents:
8a4f12
Message:

Made logger class use the new Singleton framework

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/logger.hpp

    r8a4f12 rc3f8c4  
    1111#include <iostream>
    1212
     13#include "Patterns/Singleton.hpp"
     14
    1315using namespace std;
    1416
    1517class Verbose;
    1618
    17 class logger {
     19class logger : public Singleton<logger> {
     20  friend class Singleton<logger>;
    1821public :
    1922  static ostream *nix;
    2023  static int verbosity;
    2124
    22   static logger* getInstance();
    23   static void purgeInstance();
    2425  static bool DoOutput();
    2526  static void setVerbosity(int verbosityLevel);
     
    3031  /** Do not call this destructor directly, use purgeInstance() instead. */
    3132  ~logger();
    32 
    33 private:
    34   static logger* instance;
    3533};
    3634
Note: See TracChangeset for help on using the changeset viewer.