Guest User

Untitled

a guest
May 26th, 2015
314
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class MyConfigSingleton : public Singleton
  2. {
  3.    MyConfigSingleton()   { /*get fileName*/ plog::init(fileName/*, ...*/); LOGD << "Created."; }
  4.    ~MyConfigSingleton() { LOGD << "Fail."; }
  5.    
  6.    void doNothing() const {LOGD << "Doing nothing";}
  7. };
  8.  
  9. int main()
  10. {
  11.     // init order - MyConfigSingleton::MyConfigSingleton (), Logger::Logger()
  12.     MyConfigSingleton::getInstance()->doNothing();
  13.  
  14.     // deinit order: Logger::~Logger(), MyConfigSingleton::~MyConfigSingleton()
  15.     return 0;
  16. }
RAW Paste Data