orx  1.9
Portable Game Engine
orxConfig.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2018 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 typedef orxSTATUS (orxFASTCALL *orxCONFIG_BOOTSTRAP_FUNCTION)();
74 
75 
78 extern orxDLLAPI void orxFASTCALL orxConfig_Setup();
79 
83 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Init();
84 
87 extern orxDLLAPI void orxFASTCALL orxConfig_Exit();
88 
89 
94 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetEncryptionKey(const orxSTRING _zEncryptionKey);
95 
99 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetEncryptionKey();
100 
107 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBootstrap(const orxCONFIG_BOOTSTRAP_FUNCTION _pfnBootstrap);
108 
113 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBaseName(const orxSTRING _zBaseName);
114 
118 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetMainFileName();
119 
120 
125 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Load(const orxSTRING _zFileName);
126 
132 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_LoadFromMemory(orxCHAR *_acBuffer, orxU32 _u32BufferSize);
133 
137 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ReloadHistory();
138 
145 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Save(const orxSTRING _zFileName, orxBOOL _bUseEncryption, const orxCONFIG_SAVE_FUNCTION _pfnSaveCallback);
146 
153 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_CopyFile(const orxSTRING _zDstFileName, const orxSTRING _zSrcFileName, const orxSTRING _zEncryptionKey);
154 
162 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_MergeFiles(const orxSTRING _zDstFileName, const orxSTRING *_azSrcFileName, orxU32 _u32Number, const orxSTRING _zEncryptionKey);
163 
168 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SelectSection(const orxSTRING _zSectionName);
169 
175 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_RenameSection(const orxSTRING _zSectionName, const orxSTRING _zNewSectionName);
176 
181 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetOrigin(const orxSTRING _zSectionName);
182 
187 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetOriginID(const orxSTRING _zSectionName);
188 
194 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetParent(const orxSTRING _zSectionName, const orxSTRING _zParentName);
195 
200 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetParent(const orxSTRING _zSectionName);
201 
206 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetDefaultParent(const orxSTRING _zSectionName);
207 
211 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetCurrentSection();
212 
217 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PushSection(const orxSTRING _zSectionName);
218 
222 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PopSection();
223 
228 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasSection(const orxSTRING _zSectionName);
229 
235 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ProtectSection(const orxSTRING _zSectionName, orxBOOL _bProtect);
236 
240 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetSectionCount();
241 
246 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetSection(orxU32 _u32SectionIndex);
247 
248 
252 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Clear();
253 
257 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearSection(const orxSTRING _zSectionName);
258 
263 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearValue(const orxSTRING _zKey);
264 
265 
270 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsLocallyInheritedValue(const orxSTRING _zKey);
271 
276 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsInheritedValue(const orxSTRING _zKey);
277 
282 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsRandomValue(const orxSTRING _zKey);
283 
288 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsDynamicValue(const orxSTRING _zKey);
289 
294 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsCommandValue(const orxSTRING _zKey);
295 
300 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasValue(const orxSTRING _zKey);
301 
306 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetValueSource(const orxSTRING _zKey);
307 
312 extern orxDLLAPI orxS32 orxFASTCALL orxConfig_GetS32(const orxSTRING _zKey);
313 
318 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetU32(const orxSTRING _zKey);
319 
324 extern orxDLLAPI orxS64 orxFASTCALL orxConfig_GetS64(const orxSTRING _zKey);
325 
330 extern orxDLLAPI orxU64 orxFASTCALL orxConfig_GetU64(const orxSTRING _zKey);
331 
336 extern orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetFloat(const orxSTRING _zKey);
337 
342 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetString(const orxSTRING _zKey);
343 
348 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetBool(const orxSTRING _zKey);
349 
355 extern orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetVector(const orxSTRING _zKey, orxVECTOR *_pvVector);
356 
361 extern orxDLLAPI orxSTRING orxFASTCALL orxConfig_DuplicateRawValue(const orxSTRING _zKey);
362 
363 
369 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS32(const orxSTRING _zKey, orxS32 _s32Value);
370 
376 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU32(const orxSTRING _zKey, orxU32 _u32Value);
377 
383 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS64(const orxSTRING _zKey, orxS64 _s64Value);
384 
390 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU64(const orxSTRING _zKey, orxU64 _u64Value);
391 
397 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetFloat(const orxSTRING _zKey, orxFLOAT _fValue);
398 
404 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetString(const orxSTRING _zKey, const orxSTRING _zValue);
405 
411 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetStringBlock(const orxSTRING _zKey, const orxSTRING _zValue);
412 
418 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBool(const orxSTRING _zKey, orxBOOL _bValue);
419 
425 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetVector(const orxSTRING _zKey, const orxVECTOR *_pvValue);
426 
427 
432 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsList(const orxSTRING _zKey);
433 
438 extern orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListCount(const orxSTRING _zKey);
439 
445 extern orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListS32(const orxSTRING _zKey, orxS32 _s32ListIndex);
446 
452 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetListU32(const orxSTRING _zKey, orxS32 _s32ListIndex);
453 
459 extern orxDLLAPI orxS64 orxFASTCALL orxConfig_GetListS64(const orxSTRING _zKey, orxS32 _s32ListIndex);
460 
466 extern orxDLLAPI orxU64 orxFASTCALL orxConfig_GetListU64(const orxSTRING _zKey, orxS32 _s32ListIndex);
467 
473 extern orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetListFloat(const orxSTRING _zKey, orxS32 _s32ListIndex);
474 
480 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetListString(const orxSTRING _zKey, orxS32 _s32ListIndex);
481 
487 extern orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetListBool(const orxSTRING _zKey, orxS32 _s32ListIndex);
488 
495 extern orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetListVector(const orxSTRING _zKey, orxS32 _s32ListIndex, orxVECTOR *_pvVector);
496 
503 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetListString(const orxSTRING _zKey, const orxSTRING _azValue[], orxU32 _u32Number);
504 
511 extern orxDLLAPI orxSTATUS orxFASTCALL orxConfig_AppendListString(const orxSTRING _zKey, const orxSTRING _azValue[], orxU32 _u32Number);
512 
516 extern orxDLLAPI orxU32 orxFASTCALL orxConfig_GetKeyCount();
517 
522 extern orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetKey(orxU32 _u32KeyIndex);
523 
524 #endif /*_orxCONFIG_H_*/
525 
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_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 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: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:394
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 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:73
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 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)

Generated for orx by doxygen 1.8.11