!I (1670409):
[CRYENGINE.git] / Code / CryEngine / CrySystem / SystemCFG.h
blobef7508af4fde6735203682ffc858d56062810f01
1 // Copyright 2001-2018 Crytek GmbH / Crytek Group. All rights reserved.
3 //
4 // File: SystemCfg.h
5 //
6 // History:
7 // -Jan 22,2004:Created
8 //
9 //////////////////////////////////////////////////////////////////////
11 #pragma once
13 #include <math.h>
14 #include <map>
16 typedef string SysConfigKey;
17 typedef string SysConfigValue;
19 //////////////////////////////////////////////////////////////////////////
20 class CSystemConfiguration
22 public:
23 CSystemConfiguration(const string& strSysConfigFilePath, CSystem* pSystem, ILoadConfigurationEntrySink* pSink, ELoadConfigurationType configType, ELoadConfigurationFlags flags);
24 ~CSystemConfiguration();
26 string RemoveWhiteSpaces(string& s)
28 s.Trim();
29 return s;
32 bool IsError() const { return m_bError; }
34 static bool OpenFile(const string& filename, CCryFile& file, int flags);
36 private: // ----------------------------------------
38 // Returns:
39 // success
40 bool ParseSystemConfig();
42 CSystem* m_pSystem;
43 string m_strSysConfigFilePath;
44 bool m_bError;
45 ILoadConfigurationEntrySink* m_pSink; // never 0
46 ELoadConfigurationType m_configType;
47 ELoadConfigurationFlags m_flags = ELoadConfigurationFlags::None;