Alphabetical Class Index  Class Hierarchy   File Members   Compound Members   File List  

HEventManager.h
00001 // Copyright (c) 1998-2014 by Tech Soft 3D, Inc.
00002 //
00003 // The information contained herein is confidential and proprietary to Tech Soft 3D, Inc.,
00004 // and considered a trade secret as defined under civil and criminal statutes.
00005 // Tech Soft 3D, Inc. shall pursue its civil and criminal remedies in the event of
00006 // unauthorized use or misappropriation of its trade secrets.  Use of this information
00007 // by anyone other than authorized employees of Tech Soft 3D, Inc. is granted only under
00008 // a written non-disclosure agreement, expressly prescribing the scope and manner of such use.
00009 
00010 #ifndef _HEVENTMANAGER_H
00011 #define _HEVENTMANAGER_H
00012 
00013 #ifdef H_PACK_8
00014 #pragma pack(push)
00015 #pragma pack(8)
00016 #endif
00017 
00018 #include "HTools.h"
00019 #include "HEventListener.h"
00020 
00021 class HEventListener;
00022 class HBaseView;
00023 
00025  
00026 class HEventListenerItem
00027 {
00028 public:
00032     HEventListenerItem() { m_Priority = 0; m_pEventListener = 0; }
00033     int m_Priority;                         
00034     HEventListener *m_pEventListener;       
00035 };
00036 
00037 
00038 
00040 
00044 class MVO_API HEventManager  
00045 {
00046 public:
00050     HEventManager();
00051     virtual ~HEventManager();
00052 
00059     void RegisterHandler(HEventListener *listener, const char * eventtype, int priority);
00066     void RegisterHandler(HEventListener *listener, HEventListenerType eventtype, int priority);
00067 
00073     HEventListener *GetEventListenerManager(const char *eventtype);
00079     HEventListener *GetEventListenerManager(HEventListenerType eventtype);
00080 
00086     bool UnRegisterHandler(HEventListener *listener, const char * eventtype);
00092     bool UnRegisterHandler(HEventListener *listener, HEventListenerType eventtype);
00097     void UnRegisterHandler(HEventListener *listener);
00098 
00099 
00100 protected:
00101 
00102 
00103     struct vhash_s *    m_pEventListenerListHash;           
00104     struct vhash_s *    m_pEventListenerListHashString;     
00106 };
00107 
00109 
00115 class MVO_API HObject
00116 {
00117 public:
00121     HObject() {} ;
00122     virtual  ~HObject() {} ;
00123 
00126     virtual const char *GetName() = 0;
00127 protected:
00128 };
00129 
00130 
00132 
00137 class MVO_API HObjectManager  
00138 {
00139 public:
00143     HObjectManager();
00144     virtual ~HObjectManager();
00145 
00152     HObject * AddHObject(HObject *hobject);
00158     HObject *RemoveHObject(const char *name);
00164     HObject *GetHObject(const char *name);
00165     
00173     static HC_KEY FindHObjectSegment(HC_KEY segkey, char *res = 0, char *ores = 0);
00174 
00175     
00180     static void FileLoadHObjectCheck(HC_KEY segkey);
00181 
00186     static void SetHObjectSegment(const char *objecttype);
00192     static void SetHObjectInfo(const char *objectinfo);
00193 
00194 
00195 protected:
00196 
00197     struct vhash_s *    m_pObjectHash;          
00199     static long object_segment_count;
00200 
00201 };
00202 
00203 
00204 #ifdef H_PACK_8
00205 #pragma pack(pop)
00206 #endif
00207 
00208 #endif
00209 
00210 
00211