-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExceptionManager.h
More file actions
40 lines (29 loc) · 770 Bytes
/
Copy pathExceptionManager.h
File metadata and controls
40 lines (29 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include"BaseLib/CommonDefines.h"
#include"BaseLib/Mutex.h"
#include"BaseLib/Thread.h"
#include"BaseLib/ObjectBase.h"
#include"BaseLib/Export.h"
namespace BaseLib
{
class Exception;
class DLL_STATE ExceptionManager
: public Thread
, public ObjectBase
{
private:
ExceptionManager(std::string name = std::string("BaseLib.Manager.Exception"));
~ExceptionManager();
public:
static ExceptionManager* getOrCreateExceptionManager();
bool AddObject(Exception *base);
bool RemoveObject(Exception *base);
private:
virtual void run();
private:
static ExceptionManager *exceptionManager_;
typedef std::set<Exception*> SetException;
SetException setException_;
mutable Mutex managerMutex_;
};
}