orx  1.14
Portable Game Engine
orxConfig.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2022 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 {
65 
66  orxCONFIG_EVENT_NONE = orxENUM_NONE
67 
69 
70 
72 typedef orxBOOL (orxFASTCALL *orxCONFIG_SAVE_FUNCTION)(const orxSTRING _zSectionName, const orxSTRING _zKeyName, const orxSTRING _zFileName, orxBOOL _bUseEncryption);
73 
75 typedef orxBOOL (orxFASTCALL *orxCONFIG_CLEAR_FUNCTION)(const orxSTRING _zSectionName, const orxSTRING _zKeyName);
76 
77 typedef orxSTATUS (orxFASTCALL *orxCONFIG_BOOTSTRAP_FUNCTION)();
78 
79 
82 extern orxDLLAPI void orxFASTCALL orxConfig_Setup();
83 
87 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Init();
88 
91 extern orxDLLAPI void orxFASTCALL orxConfig_Exit();
92 
93 
98 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetEncryptionKey(const orxSTRING _zEncryptionKey);
99 
103 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetEncryptionKey();
104 
111 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBootstrap(const orxCONFIG_BOOTSTRAP_FUNCTION _pfnBootstrap);
112 
117 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBaseName(const orxSTRING _zBaseName);
118 
122 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetMainFileName();
123 
124 
129 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Load(const orxSTRING _zFileName);
130 
136 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_LoadFromMemory(orxCHAR *_acBuffer, orxU32 _u32BufferSize);
137 
141 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ReloadHistory();
142 
149 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Save(const orxSTRING _zFileName, orxBOOL _bUseEncryption, const orxCONFIG_SAVE_FUNCTION _pfnSaveCallback);
150 
157 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_CopyFile(const orxSTRING _zDstFileName, const orxSTRING _zSrcFileName, const orxSTRING _zEncryptionKey);
158 
166 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_MergeFiles(const orxSTRING _zDstFileName, const orxSTRING *_azSrcFileName, orxU32 _u32Number, const orxSTRING _zEncryptionKey);
167 
172 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SelectSection(const orxSTRING _zSectionName);
173 
179 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_RenameSection(const orxSTRING _zSectionName, const orxSTRING _zNewSectionName);
180 
185 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetOrigin(const orxSTRING _zSectionName);
186 
191 extern orxDLLAPI orxSTRINGID orxFASTCALL orxConfig_GetOriginID(const orxSTRING _zSectionName);
192 
198 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetParent(const orxSTRING _zSectionName, const orxSTRING _zParentName);
199 
204 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetParent(const orxSTRING _zSectionName);
205 
210 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetDefaultParent(const orxSTRING _zSectionName);
211 
215 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetCurrentSection();
216 
221 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PushSection(const orxSTRING _zSectionName);
222 
226 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PopSection();
227 
232 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasSection(const orxSTRING _zSectionName);
233 
239 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ProtectSection(const orxSTRING _zSectionName, orxBOOL _bProtect);
240 
244 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetSectionCount();
245 
250 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetSection(orxU32 _u32SectionIndex);
251 
252 
257 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Clear(const orxCONFIG_CLEAR_FUNCTION _pfnClearCallback);
258 
262 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearSection(const orxSTRING _zSectionName);
263 
268 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearValue(const orxSTRING _zKey);
269 
270 
275 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsLocallyInheritedValue(const orxSTRING _zKey);
276 
281 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsInheritedValue(const orxSTRING _zKey);
282 
287 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsRandomValue(const orxSTRING _zKey);
288 
293 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsDynamicValue(const orxSTRING _zKey);
294 
299 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsCommandValue(const orxSTRING _zKey);
300 
305 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasValue(const orxSTRING _zKey);
306 
311 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetValueSource(const orxSTRING _zKey);
312 
317 extern orxDLLAPI orxS32 orxFASTCALL orxConfig_GetS32(const orxSTRING _zKey);
318 
323 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetU32(const orxSTRING _zKey);
324 
329 extern orxDLLAPI orxS64 orxFASTCALL orxConfig_GetS64(const orxSTRING _zKey);
330 
335 extern orxDLLAPI orxU64 orxFASTCALL orxConfig_GetU64(const orxSTRING _zKey);
336 
341 extern orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetFloat(const orxSTRING _zKey);
342 
348 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetString(const orxSTRING _zKey);
349 
354 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetBool(const orxSTRING _zKey);
355 
361 extern orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetVector(const orxSTRING _zKey, orxVECTOR *_pvVector);
362 
367 extern orxDLLAPI orxSTRING orxFASTCALL orxConfig_DuplicateRawValue(const orxSTRING _zKey);
368 
369 
375 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS32(const orxSTRING _zKey, orxS32 _s32Value);
376 
382 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU32(const orxSTRING _zKey, orxU32 _u32Value);
383 
389 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS64(const orxSTRING _zKey, orxS64 _s64Value);
390 
396 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU64(const orxSTRING _zKey, orxU64 _u64Value);
397 
403 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetFloat(const orxSTRING _zKey, orxFLOAT _fValue);
404 
410 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetString(const orxSTRING _zKey, const orxSTRING _zValue);
411 
417 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetStringBlock(const orxSTRING _zKey, const orxSTRING _zValue);
418 
424 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBool(const orxSTRING _zKey, orxBOOL _bValue);
425 
431 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetVector(const orxSTRING _zKey, const orxVECTOR *_pvValue);
432 
433 
438 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsList(const orxSTRING _zKey);
439 
444 extern orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListCount(const orxSTRING _zKey);
445 
451 extern orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListS32(const orxSTRING _zKey, orxS32 _s32ListIndex);
452 
458 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetListU32(const orxSTRING _zKey, orxS32 _s32ListIndex);
459 
465 extern orxDLLAPI orxS64 orxFASTCALL orxConfig_GetListS64(const orxSTRING _zKey, orxS32 _s32ListIndex);
466 
472 extern orxDLLAPI orxU64 orxFASTCALL orxConfig_GetListU64(const orxSTRING _zKey, orxS32 _s32ListIndex);
473 
479 extern orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetListFloat(const orxSTRING _zKey, orxS32 _s32ListIndex);
480 
487 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetListString(const orxSTRING _zKey, orxS32 _s32ListIndex);
488 
494 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetListBool(const orxSTRING _zKey, orxS32 _s32ListIndex);
495 
502 extern orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetListVector(const orxSTRING _zKey, orxS32 _s32ListIndex, orxVECTOR *_pvVector);
503 
510 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetListString(const orxSTRING _zKey, const orxSTRING _azValue[], orxU32 _u32Number);
511 
518 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_AppendListString(const orxSTRING _zKey, const orxSTRING _azValue[], orxU32 _u32Number);
519 
523 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetKeyCount();
524 
529 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetKey(orxU32 _u32KeyIndex);
530 
531 #endif /*_orxCONFIG_H_*/
532 
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 orxBOOL orxFASTCALL orxConfig_IsCommandValue(const orxSTRING _zKey)
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 orxU32 orxFASTCALL orxConfig_GetSectionCount()
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_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 orxSTRINGID orxFASTCALL orxConfig_GetOriginID(const orxSTRING _zSectionName)
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 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 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:256
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)
orxBOOL(orxFASTCALL * orxCONFIG_CLEAR_FUNCTION)(const orxSTRING _zSectionName, const orxSTRING _zKeyName)
Definition: orxConfig.h:75
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:370
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:72
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Clear(const orxCONFIG_CLEAR_FUNCTION _pfnClearCallback)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetBool(const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU64(const orxSTRING _zKey, orxU64 _u64Value)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetKeyCount()
orxSTATUS(orxFASTCALL * orxCONFIG_BOOTSTRAP_FUNCTION)()
Definition: orxConfig.h:77
orxDLLAPI orxS32 orxFASTCALL orxConfig_GetS32(const orxSTRING _zKey)
orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListCount(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 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)

Generated for orx by doxygen 1.8.11