orx  stable
Portable Game Engine
orxConfig.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2017 Orx-Project
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  *
18  * 2. Altered source versions must be plainly marked as such, and must not be
19  * misrepresented as being the original software.
20  *
21  * 3. This notice may not be removed or altered from any source
22  * distribution.
23  */
24 
43 #ifndef _orxCONFIG_H_
44 #define _orxCONFIG_H_
45 
46 
47 #include "orxInclude.h"
48 
49 #include "math/orxVector.h"
50 
51 
54 #define orxCONFIG_KZ_RESOURCE_GROUP "Config"
59 typedef enum __orxCONFIG_EVENT_t
60 {
66 
67  orxCONFIG_EVENT_NONE = orxENUM_NONE
68 
70 
71 
73 typedef orxBOOL (orxFASTCALL *orxCONFIG_SAVE_FUNCTION)(const orxSTRING _zSectionName, const orxSTRING _zKeyName, const orxSTRING _zFileName, orxBOOL _bUseEncryption);
74 typedef orxSTATUS (orxFASTCALL *orxCONFIG_BOOTSTRAP_FUNCTION)();
75 
76 
79 extern orxDLLAPI void orxFASTCALL orxConfig_Setup();
80 
84 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Init();
85 
88 extern orxDLLAPI void orxFASTCALL orxConfig_Exit();
89 
90 
95 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetEncryptionKey(const orxSTRING _zEncryptionKey);
96 
100 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetEncryptionKey();
101 
108 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBootstrap(const orxCONFIG_BOOTSTRAP_FUNCTION _pfnBootstrap);
109 
114 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBaseName(const orxSTRING _zBaseName);
115 
119 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetMainFileName();
120 
121 
126 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Load(const orxSTRING _zFileName);
127 
133 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_LoadFromMemory(orxCHAR *_acBuffer, orxU32 _u32BufferSize);
134 
138 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ReloadHistory();
139 
146 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Save(const orxSTRING _zFileName, orxBOOL _bUseEncryption, const orxCONFIG_SAVE_FUNCTION _pfnSaveCallback);
147 
154 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_CopyFile(const orxSTRING _zDstFileName, const orxSTRING _zSrcFileName, const orxSTRING _zEncryptionKey);
155 
163 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_MergeFiles(const orxSTRING _zDstFileName, const orxSTRING *_azSrcFileName, orxU32 _u32Number, const orxSTRING _zEncryptionKey);
164 
169 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SelectSection(const orxSTRING _zSectionName);
170 
176 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_RenameSection(const orxSTRING _zSectionName, const orxSTRING _zNewSectionName);
177 
182 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetOrigin(const orxSTRING _zSectionName);
183 
188 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetOriginID(const orxSTRING _zSectionName);
189 
195 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetParent(const orxSTRING _zSectionName, const orxSTRING _zParentName);
196 
201 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetParent(const orxSTRING _zSectionName);
202 
207 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetDefaultParent(const orxSTRING _zSectionName);
208 
212 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetCurrentSection();
213 
218 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PushSection(const orxSTRING _zSectionName);
219 
223 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PopSection();
224 
229 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasSection(const orxSTRING _zSectionName);
230 
236 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ProtectSection(const orxSTRING _zSectionName, orxBOOL _bProtect);
237 
241 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetSectionCounter();
242 
247 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetSection(orxU32 _u32SectionIndex);
248 
249 
253 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Clear();
254 
258 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearSection(const orxSTRING _zSectionName);
259 
264 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearValue(const orxSTRING _zKey);
265 
266 
271 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsLocallyInheritedValue(const orxSTRING _zKey);
272 
277 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsInheritedValue(const orxSTRING _zKey);
278 
283 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsRandomValue(const orxSTRING _zKey);
284 
289 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsDynamicValue(const orxSTRING _zKey);
290 
295 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasValue(const orxSTRING _zKey);
296 
301 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetValueSource(const orxSTRING _zKey);
302 
307 extern orxDLLAPI orxS32 orxFASTCALL orxConfig_GetS32(const orxSTRING _zKey);
308 
313 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetU32(const orxSTRING _zKey);
314 
319 extern orxDLLAPI orxS64 orxFASTCALL orxConfig_GetS64(const orxSTRING _zKey);
320 
325 extern orxDLLAPI orxU64 orxFASTCALL orxConfig_GetU64(const orxSTRING _zKey);
326 
331 extern orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetFloat(const orxSTRING _zKey);
332 
337 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetString(const orxSTRING _zKey);
338 
343 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetBool(const orxSTRING _zKey);
344 
350 extern orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetVector(const orxSTRING _zKey, orxVECTOR *_pvVector);
351 
356 extern orxDLLAPI orxSTRING orxFASTCALL orxConfig_DuplicateRawValue(const orxSTRING _zKey);
357 
358 
364 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS32(const orxSTRING _zKey, orxS32 _s32Value);
365 
371 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU32(const orxSTRING _zKey, orxU32 _u32Value);
372 
378 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS64(const orxSTRING _zKey, orxS64 _s64Value);
379 
385 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU64(const orxSTRING _zKey, orxU64 _u64Value);
386 
392 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetFloat(const orxSTRING _zKey, orxFLOAT _fValue);
393 
399 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetString(const orxSTRING _zKey, const orxSTRING _zValue);
400 
406 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetStringBlock(const orxSTRING _zKey, const orxSTRING _zValue);
407 
413 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBool(const orxSTRING _zKey, orxBOOL _bValue);
414 
420 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetVector(const orxSTRING _zKey, const orxVECTOR *_pvValue);
421 
422 
427 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsList(const orxSTRING _zKey);
428 
433 extern orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListCounter(const orxSTRING _zKey);
434 
440 extern orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListS32(const orxSTRING _zKey, orxS32 _s32ListIndex);
441 
447 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetListU32(const orxSTRING _zKey, orxS32 _s32ListIndex);
448 
454 extern orxDLLAPI orxS64 orxFASTCALL orxConfig_GetListS64(const orxSTRING _zKey, orxS32 _s32ListIndex);
455 
461 extern orxDLLAPI orxU64 orxFASTCALL orxConfig_GetListU64(const orxSTRING _zKey, orxS32 _s32ListIndex);
462 
468 extern orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetListFloat(const orxSTRING _zKey, orxS32 _s32ListIndex);
469 
475 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetListString(const orxSTRING _zKey, orxS32 _s32ListIndex);
476 
482 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetListBool(const orxSTRING _zKey, orxS32 _s32ListIndex);
483 
490 extern orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetListVector(const orxSTRING _zKey, orxS32 _s32ListIndex, orxVECTOR *_pvVector);
491 
498 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetListString(const orxSTRING _zKey, const orxSTRING _azValue[], orxU32 _u32Number);
499 
506 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_AppendListString(const orxSTRING _zKey, const orxSTRING _azValue[], orxU32 _u32Number);
507 
511 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetKeyCounter();
512 
517 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetKey(orxU32 _u32KeyIndex);
518 
519 #endif /*_orxCONFIG_H_*/
520 
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PushSection(const orxSTRING _zSectionName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetListString(const orxSTRING _zKey, const orxSTRING _azValue[], orxU32 _u32Number)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ProtectSection(const orxSTRING _zSectionName, orxBOOL _bProtect)
orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetListFloat(const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PopSection()
orxDLLAPI orxSTRING orxFASTCALL orxConfig_DuplicateRawValue(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_LoadFromMemory(orxCHAR *_acBuffer, orxU32 _u32BufferSize)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetEncryptionKey()
orxDLLAPI void orxFASTCALL orxConfig_Exit()
orxDLLAPI orxU64 orxFASTCALL orxConfig_GetListU64(const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_CopyFile(const orxSTRING _zDstFileName, const orxSTRING _zSrcFileName, const orxSTRING _zEncryptionKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Save(const orxSTRING _zFileName, orxBOOL _bUseEncryption, const orxCONFIG_SAVE_FUNCTION _pfnSaveCallback)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Clear()
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS32(const orxSTRING _zKey, orxS32 _s32Value)
orxDLLAPI orxS64 orxFASTCALL orxConfig_GetS64(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetParent(const orxSTRING _zSectionName, const orxSTRING _zParentName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetEncryptionKey(const orxSTRING _zEncryptionKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBool(const orxSTRING _zKey, orxBOOL _bValue)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsRandomValue(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_AppendListString(const orxSTRING _zKey, const orxSTRING _azValue[], orxU32 _u32Number)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU32(const orxSTRING _zKey, orxU32 _u32Value)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetCurrentSection()
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SelectSection(const orxSTRING _zSectionName)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetSectionCounter()
orxDLLAPI orxS64 orxFASTCALL orxConfig_GetListS64(const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearValue(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_RenameSection(const orxSTRING _zSectionName, const orxSTRING _zNewSectionName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ReloadHistory()
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBootstrap(const orxCONFIG_BOOTSTRAP_FUNCTION _pfnBootstrap)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetKey(orxU32 _u32KeyIndex)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetListBool(const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Init()
orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasSection(const orxSTRING _zSectionName)
orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListCounter(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearSection(const orxSTRING _zSectionName)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetU32(const orxSTRING _zKey)
orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListS32(const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBaseName(const orxSTRING _zBaseName)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsDynamicValue(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetString(const orxSTRING _zKey, const orxSTRING _zValue)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetSection(orxU32 _u32SectionIndex)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetDefaultParent(const orxSTRING _zSectionName)
orxSTATUS
Definition: orxType.h:243
orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetFloat(const orxSTRING _zKey)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsLocallyInheritedValue(const orxSTRING _zKey)
orxDLLAPI orxU64 orxFASTCALL orxConfig_GetU64(const orxSTRING _zKey)
orxDLLAPI void orxFASTCALL orxConfig_Setup()
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetParent(const orxSTRING _zSectionName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetStringBlock(const orxSTRING _zKey, const orxSTRING _zValue)
orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetVector(const orxSTRING _zKey, orxVECTOR *_pvVector)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasValue(const orxSTRING _zKey)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsInheritedValue(const orxSTRING _zKey)
#define orxDLLAPI
Definition: orxDecl.h:387
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetOrigin(const orxSTRING _zSectionName)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetListString(const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Load(const orxSTRING _zFileName)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetListU32(const orxSTRING _zKey, orxS32 _s32ListIndex)
orxBOOL(orxFASTCALL * orxCONFIG_SAVE_FUNCTION)(const orxSTRING _zSectionName, const orxSTRING _zKeyName, const orxSTRING _zFileName, orxBOOL _bUseEncryption)
Definition: orxConfig.h:73
orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetBool(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU64(const orxSTRING _zKey, orxU64 _u64Value)
orxSTATUS(orxFASTCALL * orxCONFIG_BOOTSTRAP_FUNCTION)()
Definition: orxConfig.h:74
orxDLLAPI orxS32 orxFASTCALL orxConfig_GetS32(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetVector(const orxSTRING _zKey, const orxVECTOR *_pvValue)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetString(const orxSTRING _zKey)
orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetListVector(const orxSTRING _zKey, orxS32 _s32ListIndex, orxVECTOR *_pvVector)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetOriginID(const orxSTRING _zSectionName)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsList(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_MergeFiles(const orxSTRING _zDstFileName, const orxSTRING *_azSrcFileName, orxU32 _u32Number, const orxSTRING _zEncryptionKey)
orxCONFIG_EVENT
Definition: orxConfig.h:59
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetValueSource(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetFloat(const orxSTRING _zKey, orxFLOAT _fValue)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetMainFileName()
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS64(const orxSTRING _zKey, orxS64 _s64Value)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetKeyCounter()

Generated for orx by doxygen 1.5.6