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 _HDB_H 00011 #define _HDB_H 00012 00013 #ifdef H_PACK_8 00014 #pragma pack(push) 00015 #pragma pack(8) 00016 #endif 00017 00018 #include "HTools.h" 00019 00020 00021 class HImManager; 00022 class HIOManager; 00023 class HTManager; 00024 class HMaterialLibrary; 00025 00026 00028 00032 class MVO_API HDB { 00033 00034 00035 public: 00036 /*Constructs an HDB object.*/ 00037 HDB (); 00038 virtual ~HDB (); 00039 00045 virtual void Init (); 00046 00047 static HDB * GetHDB(); 00048 00050 static void IncrementInstanceCount(); 00051 00053 static void DecrementInstanceCount(); 00054 00056 static void SetInstanceBase(const char* s); 00057 00059 static const char* GetInstanceBase(); 00060 00062 static void SetDriverType(const char* s); 00063 00065 static const char* GetDriverType(); 00066 00068 static bool GetCleanInclude() { return m_bCleanInclude; } 00069 00072 static void SetCleanInclude(bool value) { m_bCleanInclude = value; } 00073 00075 static int GetInstanceCount() {return m_InstanceCount; } 00076 00078 static int GetUniqueID() {return m_nextUID++; } 00079 00083 static void SetInstanceCount(int count) {m_InstanceCount = count;} 00084 00086 static HImManager * GetHImManager(); 00087 00092 static HImManager * SetHImManager(HImManager * manager); 00093 00094 00096 static HIOManager * GetHIOManager(); 00097 00102 static HIOManager * SetHIOManager(HIOManager * manager); 00103 00105 static HMaterialLibrary * GetMaterialLibrary(); 00106 00108 static void SetMaterialLibrary(HMaterialLibrary *library); 00109 00111 static HTManager * GetHTManager(); 00112 00117 static HTManager * SetHTManager(HTManager * manager); 00118 00120 static HC_KEY GetUniqueIncludeKey(); 00121 00123 static unsigned long GetNextCookie() { return next_cookie++; }; 00124 00133 static void ReportError( const char *message, int severity = 1, int category = 0, int specific = 0 ); 00134 00136 static void EnableErrorManager(); 00138 static void DisableErrorManager(); 00139 00141 static void SetOwnsSystem(bool owns) {m_bOwnsSystem=owns;}; 00143 static bool GetOwnsSystem() {return m_bOwnsSystem;}; 00145 static void SetIsolatedDrivers(bool isolated) {m_bIsolatedDrivers=isolated;}; 00147 static bool GetIsolatedDrivers() {return m_bIsolatedDrivers;}; 00148 00149 static void Lock(); 00150 00151 static void UnLock(); 00152 00153 static bool GetPublishExchangeLicenseSet() { return m_bPublishExchangeLicenseSet; } 00154 00155 static void SetPublishExchangeLicenseSet(bool isSet); 00156 00157 00158 private: 00159 00160 static HDB * m_pHDB; 00161 static void * m_Mutex; 00162 00163 static int m_InstanceCount; 00164 static int m_nextUID; 00165 static char* m_pInstanceBase; 00166 static char* m_pDriverType; 00167 static bool m_bCleanInclude; 00168 static bool m_bUsingErrorManager; 00169 static bool m_bOwnsSystem; 00170 static bool m_bIsolatedDrivers; 00171 00172 static HImManager * m_pHImManager; 00173 00174 static HIOManager * m_pHIOManager; 00175 00176 static HMaterialLibrary * m_pHMaterialLibrary; 00177 00178 static HTManager * m_pHTManager; 00179 00180 static unsigned long include_counter; 00181 static unsigned long next_cookie; 00182 00183 static bool m_bPublishExchangeLicenseSet; 00184 00185 00186 }; 00187 00188 00189 #ifdef H_PACK_8 00190 #pragma pack(pop) 00191 #endif 00192 00193 #endif 00194 00195 00196 00197 00198 00199