Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HEventManager.h
00001 //
00002 // Copyright (c) 2000 by Tech Soft 3D, LLC.
00003 // The information contained herein is confidential and proprietary to
00004 // Tech Soft 3D, LLC., and considered a trade secret as defined under
00005 // civil and criminal statutes.  Tech Soft 3D shall pursue its civil
00006 // and criminal remedies in the event of unauthorized use or misappropriation
00007 // of its trade secrets.  Use of this information by anyone other than
00008 // authorized employees of Tech Soft 3D, LLC. is granted only under a
00009 // written non-disclosure agreement, expressly prescribing the scope and
00010 // manner of such use.
00011 //
00012 // $Id: b975a239c18280ce2f39befa5c61837dcd0d7170 $
00013 //
00014 
00015  
00016 #ifndef _HEVENTMANAGER_H
00017 #define _HEVENTMANAGER_H
00018 
00019 #ifdef H_PACK_8
00020 #pragma pack(push)
00021 #pragma pack(8)
00022 #endif
00023 
00024 #include "HTools.h"
00025 #include "HEventListener.h"
00026 
00027 class HEventListener;
00028 class HBaseView;
00029 
00031  
00032 class HEventListenerItem
00033 {
00034 public:
00038     HEventListenerItem() { m_Priority = 0; m_pEventListener = 0; }
00039     int m_Priority;                         
00040     HEventListener *m_pEventListener;       
00041 };
00042 
00043 
00044 
00046 
00050 class MVO_API HEventManager  
00051 {
00052 public:
00056     HEventManager();
00057     virtual ~HEventManager();
00058 
00065     void RegisterHandler(HEventListener *listener, const char * eventtype, int priority);
00072     void RegisterHandler(HEventListener *listener, HEventListenerType eventtype, int priority);
00073 
00079     HEventListener *GetEventListenerManager(const char *eventtype);
00085     HEventListener *GetEventListenerManager(HEventListenerType eventtype);
00086 
00092     bool UnRegisterHandler(HEventListener *listener, const char * eventtype);
00098     bool UnRegisterHandler(HEventListener *listener, HEventListenerType eventtype);
00103     void UnRegisterHandler(HEventListener *listener);
00104 
00105 
00106 protected:
00107 
00108 
00109     struct vhash_s *    m_pEventListenerListHash;           
00110     struct vhash_s *    m_pEventListenerListHashString;     
00112 };
00113 
00115 
00121 class MVO_API HObject
00122 {
00123 public:
00127     HObject() {} ;
00128     virtual  ~HObject() {} ;
00129 
00132     virtual const char *GetName() = 0;
00133 protected:
00134 };
00135 
00136 
00138 
00143 class MVO_API HObjectManager  
00144 {
00145 public:
00149     HObjectManager();
00150     virtual ~HObjectManager();
00151 
00158     HObject * AddHObject(HObject *hobject);
00164     HObject *RemoveHObject(const char *name);
00170     HObject *GetHObject(const char *name);
00171     
00179     static HC_KEY FindHObjectSegment(HC_KEY segkey, char *res = 0, char *ores = 0);
00180 
00181     
00186     static void FileLoadHObjectCheck(HC_KEY segkey);
00187 
00192     static void SetHObjectSegment(const char *objecttype);
00198     static void SetHObjectInfo(const char *objectinfo);
00199 
00200 
00201 protected:
00202 
00203     struct vhash_s *    m_pObjectHash;          
00205     static long object_segment_count;
00206 
00207 };
00208 
00209 
00210 #ifdef H_PACK_8
00211 #pragma pack(pop)
00212 #endif
00213 
00214 #endif
00215 
00216 
00217