Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef MONITOR_POINT_REGISTRY_H
00014 #define MONITOR_POINT_REGISTRY_H
00015
00016 #include "ace/pre.h"
00017
00018 #include "ace/Thread_Mutex.h"
00019
00020 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00021 #pragma once
00022 #endif
00023
00024 #if defined (ACE_HAS_MONITOR_FRAMEWORK) && (ACE_HAS_MONITOR_FRAMEWORK == 1)
00025
00026 #include "ace/Synch_Traits.h"
00027 #include "ace/Null_Mutex.h"
00028 #include "ace/Hash_Map_Manager_T.h"
00029 #include "ace/Monitor_Control_Types.h"
00030 #include "ace/Singleton.h"
00031
00032 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00033
00034 namespace ACE
00035 {
00036 namespace Monitor_Control
00037 {
00038 class Monitor_Base;
00039
00040
00041
00042
00043
00044
00045
00046 class ACE_Export Monitor_Point_Registry
00047 {
00048 public:
00049 friend class ACE_Singleton<Monitor_Point_Registry, ACE_SYNCH_MUTEX>;
00050
00051
00052
00053 static Monitor_Point_Registry* instance (void);
00054
00055
00056 bool add (Monitor_Base* type);
00057
00058
00059 bool remove (const char* name);
00060
00061
00062 Monitor_Control_Types::NameList names (void);
00063
00064
00065
00066 Monitor_Base* get (const ACE_CString& name) const;
00067
00068
00069 long constraint_id (void);
00070
00071
00072
00073 void cleanup (void);
00074
00075 private:
00076
00077 Monitor_Point_Registry (void);
00078
00079
00080 typedef ACE_Hash_Map_Manager<ACE_CString,
00081 Monitor_Base*,
00082 ACE_SYNCH_NULL_MUTEX> Map;
00083
00084 mutable ACE_SYNCH_MUTEX mutex_;
00085 Map map_;
00086
00087
00088
00089 long constraint_id_;
00090 };
00091 }
00092 }
00093
00094 ACE_END_VERSIONED_NAMESPACE_DECL
00095
00096 #endif
00097
00098 #include "ace/post.h"
00099
00100 #endif // MONITOR_POINT_REGISTRY_H