HEventManager.h
1 // Copyright (c) Tech Soft 3D, Inc.
2 //
3 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
4 // and considered a trade secret as defined under civil and criminal statutes.
5 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
6 // unauthorized use or misappropriation of its trade secrets. Use of this information
7 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
8 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
9 
10 #ifndef _HEVENTMANAGER_H
11 #define _HEVENTMANAGER_H
12 
13 #ifdef H_PACK_8
14 #pragma pack(push)
15 #pragma pack(8)
16 #endif
17 
18 #include "HTools.h"
19 #include "HEventListener.h"
20 
21 class HEventListener;
22 class HBaseView;
23 
25 
27 {
28 public:
33  int m_Priority;
35 };
36 
37 
38 
40 
44 class MVO_API HEventManager
45 {
46 public:
50  HEventManager();
51  virtual ~HEventManager();
52 
59  void RegisterHandler(HEventListener *listener, const char * eventtype, int priority);
66  void RegisterHandler(HEventListener *listener, HEventListenerType eventtype, int priority);
67 
73  HEventListener *GetEventListenerManager(const char *eventtype);
79  HEventListener *GetEventListenerManager(HEventListenerType eventtype);
80 
86  bool UnRegisterHandler(HEventListener *listener, const char * eventtype);
92  bool UnRegisterHandler(HEventListener *listener, HEventListenerType eventtype);
97  void UnRegisterHandler(HEventListener *listener);
98 
99 
100 protected:
101 
102 
103  struct vhash_s * m_pEventListenerListHash;
106 };
107 
109 
115 class MVO_API HObject
116 {
117 public:
121  HObject() {} ;
122  virtual ~HObject() {} ;
123 
126  virtual const char *GetName() = 0;
127 protected:
128 };
129 
130 
132 
137 class MVO_API HObjectManager
138 {
139 public:
143  HObjectManager();
144  virtual ~HObjectManager();
145 
152  HObject * AddHObject(HObject *hobject);
158  HObject *RemoveHObject(const char *name);
164  HObject *GetHObject(const char *name);
165 
173  static HC_KEY FindHObjectSegment(HC_KEY segkey, char *res = 0, char *ores = 0);
174 
175 
180  static void FileLoadHObjectCheck(HC_KEY segkey);
181 
186  static void SetHObjectSegment(const char *objecttype);
192  static void SetHObjectInfo(const char *objectinfo);
193 
194 
195 protected:
196 
197  struct vhash_s * m_pObjectHash;
199  static long object_segment_count;
200 
201 };
202 
203 
204 #ifdef H_PACK_8
205 #pragma pack(pop)
206 #endif
207 
208 #endif
209 
210 
211 
struct vhash_s * m_pObjectHash
Definition: HEventManager.h:197
HObject()
Definition: HEventManager.h:121
The HObject is the base class for generic MVO objects.
Definition: HEventManager.h:115
The HObjectManager class keeps track of generic MVO objects.
Definition: HEventManager.h:137
int m_Priority
Definition: HEventManager.h:33
HEventListener * m_pEventListener
Definition: HEventManager.h:34
struct vhash_s * m_pEventListenerListHashString
Definition: HEventManager.h:104
The HEventListener class is the base class for all event types.
Definition: HEventListener.h:210
The HEventManager class dispatches arbitrary events.
Definition: HEventManager.h:44
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:332
HEventListenerType
Definition: HEventListener.h:45
The HEventListenerItem class encapsulates a pointer to an event listener.
Definition: HEventManager.h:26
struct vhash_s * m_pEventListenerListHash
Definition: HEventManager.h:103
HEventListenerItem()
Definition: HEventManager.h:32