Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HEventManager.h
1 //
2 // Copyright (c) 2000 by Tech Soft 3D, LLC.
3 // The information contained herein is confidential and proprietary to
4 // Tech Soft 3D, LLC., and considered a trade secret as defined under
5 // civil and criminal statutes. Tech Soft 3D shall pursue its civil
6 // and criminal remedies in the event of unauthorized use or misappropriation
7 // of its trade secrets. Use of this information by anyone other than
8 // authorized employees of Tech Soft 3D, LLC. is granted only under a
9 // written non-disclosure agreement, expressly prescribing the scope and
10 // manner of such use.
11 //
12 // $Id: b975a239c18280ce2f39befa5c61837dcd0d7170 $
13 //
14 
15 
16 #ifndef _HEVENTMANAGER_H
17 #define _HEVENTMANAGER_H
18 
19 #ifdef H_PACK_8
20 #pragma pack(push)
21 #pragma pack(8)
22 #endif
23 
24 #include "HTools.h"
25 #include "HEventListener.h"
26 
27 class HEventListener;
28 class HBaseView;
29 
31 
33 {
34 public:
39  int m_Priority;
41 };
42 
43 
44 
46 
50 class MVO_API HEventManager
51 {
52 public:
56  HEventManager();
57  virtual ~HEventManager();
58 
65  void RegisterHandler(HEventListener *listener, const char * eventtype, int priority);
72  void RegisterHandler(HEventListener *listener, HEventListenerType eventtype, int priority);
73 
79  HEventListener *GetEventListenerManager(const char *eventtype);
85  HEventListener *GetEventListenerManager(HEventListenerType eventtype);
86 
92  bool UnRegisterHandler(HEventListener *listener, const char * eventtype);
98  bool UnRegisterHandler(HEventListener *listener, HEventListenerType eventtype);
103  void UnRegisterHandler(HEventListener *listener);
104 
105 
106 protected:
107 
108 
109  struct vhash_s * m_pEventListenerListHash;
112 };
113 
115 
121 class MVO_API HObject
122 {
123 public:
127  HObject() {} ;
128  virtual ~HObject() {} ;
129 
132  virtual const char *GetName() = 0;
133 protected:
134 };
135 
136 
138 
143 class MVO_API HObjectManager
144 {
145 public:
149  HObjectManager();
150  virtual ~HObjectManager();
151 
158  HObject * AddHObject(HObject *hobject);
164  HObject *RemoveHObject(const char *name);
170  HObject *GetHObject(const char *name);
171 
179  static HC_KEY FindHObjectSegment(HC_KEY segkey, char *res = 0, char *ores = 0);
180 
181 
186  static void FileLoadHObjectCheck(HC_KEY segkey);
187 
192  static void SetHObjectSegment(const char *objecttype);
198  static void SetHObjectInfo(const char *objectinfo);
199 
200 
201 protected:
202 
203  struct vhash_s * m_pObjectHash;
205  static long object_segment_count;
206 
207 };
208 
209 
210 #ifdef H_PACK_8
211 #pragma pack(pop)
212 #endif
213 
214 #endif
215 
216 
217 
struct vhash_s * m_pObjectHash
Definition: HEventManager.h:203
HObject()
Definition: HEventManager.h:127
The HObject is the base class for generic MVO objects.
Definition: HEventManager.h:121
The HObjectManager class keeps track of generic MVO objects.
Definition: HEventManager.h:143
#define HC_KEY
int m_Priority
Definition: HEventManager.h:39
HEventListener * m_pEventListener
Definition: HEventManager.h:40
struct vhash_s * m_pEventListenerListHashString
Definition: HEventManager.h:110
The HEventListener class is the base class for all event types.
Definition: HEventListener.h:199
The HEventManager class dispatches arbitrary events.
Definition: HEventManager.h:50
The HBaseView class defines and manages a view of model information.
Definition: HBaseView.h:337
HEventListenerType
Definition: HEventListener.h:50
The HEventListenerItem class encapsulates a pointer to an event listener.
Definition: HEventManager.h:32
struct vhash_s * m_pEventListenerListHash
Definition: HEventManager.h:109
HEventListenerItem()
Definition: HEventManager.h:38