Changeset 104 for cpp/gdk/errmanager.h
- Timestamp:
- 07/23/13 18:15:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/gdk/errmanager.h
r66 r104 9 9 #include "sstring.h" 10 10 #include "framsg.h" 11 #include "threads.h" 11 12 12 13 class ErrorHandlerBase; … … 26 27 {send(handlers.size()-1,o,m,bl,w);} 27 28 ~ErrorManager() {removeAll();} 29 30 static ThreadSingleton<ErrorManager> instance; 28 31 }; 29 30 extern ErrorManager globalErrorManager;31 32 32 33 //////////////////////////////////////// … … 51 52 void disable(); 52 53 53 ErrorHandlerBase(int opts=0): options(opts),mgr(0)54 ErrorHandlerBase(int opts=0):mgr(0),options(opts) 54 55 {if (!(options&DontEnable)) enable();} 55 56 ~ErrorHandlerBase() … … 87 88 }; 88 89 90 class ErrorRedirector: public ErrorHandlerBase 91 { 92 ErrorManager *other_mgr; 93 public: 94 ErrorRedirector(ErrorManager *om) 95 :ErrorHandlerBase(),other_mgr(om) {} 96 97 void handle(const char *o,const char *m,const char *bl,int w) 98 { 99 other_mgr->send(o,m,bl,w); 100 } 101 }; 102 89 103 #endif 90 104
Note: See TracChangeset
for help on using the changeset viewer.