orx 1.16
Portable Game Engine
Loading...
Searching...
No Matches
OrxConfig

Macros

#define orxCONFIG_KZ_RESOURCE_GROUP   "Config"

Typedefs

typedef orxSTATUS(orxFASTCALL * orxCONFIG_BOOTSTRAP_FUNCTION) ()
typedef orxBOOL(orxFASTCALL * orxCONFIG_CLEAR_FUNCTION) (const orxSTRING _zSectionName, const orxSTRING _zKeyName)
typedef orxBOOL(orxFASTCALL * orxCONFIG_KEY_FUNCTION) (const orxSTRING _zKeyName, const orxSTRING _zSectionName, void *_pContext)
typedef orxBOOL(orxFASTCALL * orxCONFIG_SAVE_FUNCTION) (const orxSTRING _zSectionName, const orxSTRING _zKeyName, const orxSTRING _zFileName, orxBOOL _bUseEncryption)

Enumerations

enum  orxCONFIG_EVENT { orxCONFIG_EVENT_RELOAD_START = 0 , orxCONFIG_EVENT_RELOAD_STOP , orxCONFIG_EVENT_NUMBER , orxCONFIG_EVENT_NONE = orxENUM_NONE }

Functions

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_AppendListString (const orxSTRING _zKey, const orxSTRING _azValue[], orxU32 _u32Number)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_AppendString (const orxSTRING _zKey, const orxSTRING _zValue)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Clear (const orxCONFIG_CLEAR_FUNCTION _pfnClearCallback)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearSection (const orxSTRING _zSectionName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearValue (const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_CopyFile (const orxSTRING _zDstFileName, const orxSTRING _zSrcFileName, const orxSTRING _zEncryptionKey)
orxDLLAPI orxSTRING orxFASTCALL orxConfig_DuplicateRawValue (const orxSTRING _zKey)
orxDLLAPI void orxFASTCALL orxConfig_EnableTypoCheck (orxBOOL _bEnable)
orxDLLAPI void orxFASTCALL orxConfig_Exit ()
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ForAllKeys (const orxCONFIG_KEY_FUNCTION _pfnKeyCallback, orxBOOL _bIncludeParents, void *_pContext)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetBool (const orxSTRING _zKey)
orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetColorVector (const orxSTRING _zKey, orxCOLORSPACE _eColorSpace, orxVECTOR *_pvVector)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetCurrentSection ()
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetDefaultParent ()
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetEncryptionKey ()
orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetFloat (const orxSTRING _zKey)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetKey (orxU32 _u32KeyIndex)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetKeyCount ()
orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetListBool (const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetListColorVector (const orxSTRING _zKey, orxS32 _s32ListIndex, orxCOLORSPACE _eColorSpace, orxVECTOR *_pvVector)
orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListCount (const orxSTRING _zKey)
orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetListFloat (const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListS32 (const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxS64 orxFASTCALL orxConfig_GetListS64 (const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetListString (const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetListU32 (const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxU64 orxFASTCALL orxConfig_GetListU64 (const orxSTRING _zKey, orxS32 _s32ListIndex)
orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetListVector (const orxSTRING _zKey, orxS32 _s32ListIndex, orxVECTOR *_pvVector)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetMainFileName ()
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetOrigin (const orxSTRING _zSectionName)
orxDLLAPI orxSTRINGID orxFASTCALL orxConfig_GetOriginID (const orxSTRING _zSectionName)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetParent (const orxSTRING _zSectionName)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetParentDistance (const orxSTRING _zSectionName, const orxSTRING _zParentName)
orxDLLAPI orxS32 orxFASTCALL orxConfig_GetS32 (const orxSTRING _zKey)
orxDLLAPI orxS64 orxFASTCALL orxConfig_GetS64 (const orxSTRING _zKey)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetSection (orxU32 _u32SectionIndex)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetSectionCount ()
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetString (const orxSTRING _zKey)
orxDLLAPI orxU32 orxFASTCALL orxConfig_GetU32 (const orxSTRING _zKey)
orxDLLAPI orxU64 orxFASTCALL orxConfig_GetU64 (const orxSTRING _zKey)
orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetValueSource (const orxSTRING _zKey)
orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetVector (const orxSTRING _zKey, orxVECTOR *_pvVector)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasSection (const orxSTRING _zSectionName)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasValue (const orxSTRING _zKey)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasValueNoCheck (const orxSTRING _zKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Init ()
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsCommandValue (const orxSTRING _zKey)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsDynamicValue (const orxSTRING _zKey)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsInheritedValue (const orxSTRING _zKey)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsList (const orxSTRING _zKey)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsLocallyInheritedValue (const orxSTRING _zKey)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsRandomValue (const orxSTRING _zKey)
orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsTypoCheckEnabled ()
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Load (const orxSTRING _zFileName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_LoadFromMemory (orxCHAR *_acBuffer, orxU32 _u32BufferSize)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_MergeFiles (const orxSTRING _zDstFileName, const orxSTRING *_azSrcFileName, orxU32 _u32Number, const orxSTRING _zEncryptionKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PopSection ()
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ProtectSection (const orxSTRING _zSectionName, orxBOOL _bProtect)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PushSection (const orxSTRING _zSectionName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ReloadHistory ()
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_RenameSection (const orxSTRING _zSectionName, const orxSTRING _zNewSectionName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Save (const orxSTRING _zFileName, orxBOOL _bUseEncryption, const orxCONFIG_SAVE_FUNCTION _pfnSaveCallback)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SelectSection (const orxSTRING _zSectionName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBaseName (const orxSTRING _zBaseName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBool (const orxSTRING _zKey, orxBOOL _bValue)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBootstrap (const orxCONFIG_BOOTSTRAP_FUNCTION _pfnBootstrap)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetDefaultParent (const orxSTRING _zSectionName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetEncryptionKey (const orxSTRING _zEncryptionKey)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetFloat (const orxSTRING _zKey, orxFLOAT _fValue)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetListString (const orxSTRING _zKey, const orxSTRING _azValue[], orxU32 _u32Number)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetOrigin (const orxSTRING _zSectionName, const orxSTRING _zOrigin)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetParent (const orxSTRING _zSectionName, const orxSTRING _zParentName)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS32 (const orxSTRING _zKey, orxS32 _s32Value)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS64 (const orxSTRING _zKey, orxS64 _s64Value)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetString (const orxSTRING _zKey, const orxSTRING _zValue)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetStringBlock (const orxSTRING _zKey, const orxSTRING _zValue)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU32 (const orxSTRING _zKey, orxU32 _u32Value)
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU64 (const orxSTRING _zKey, orxU64 _u64Value)
orxDLLAPI void orxFASTCALL orxConfig_Setup ()
orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetVector (const orxSTRING _zKey, const orxVECTOR *_pvValue)

Detailed Description

Config module Module that handles configuration files

Macro Definition Documentation

◆ orxCONFIG_KZ_RESOURCE_GROUP

#define orxCONFIG_KZ_RESOURCE_GROUP   "Config"

Defines Config resource group

Definition at line 54 of file orxConfig.h.

Typedef Documentation

◆ orxCONFIG_BOOTSTRAP_FUNCTION

typedef orxSTATUS(orxFASTCALL * orxCONFIG_BOOTSTRAP_FUNCTION) ()

Config bootstrap function type to use with SetBootstrap

Definition at line 78 of file orxConfig.h.

◆ orxCONFIG_CLEAR_FUNCTION

typedef orxBOOL(orxFASTCALL * orxCONFIG_CLEAR_FUNCTION) (const orxSTRING _zSectionName, const orxSTRING _zKeyName)

Config callback function type to use with Clear

Definition at line 75 of file orxConfig.h.

◆ orxCONFIG_KEY_FUNCTION

typedef orxBOOL(orxFASTCALL * orxCONFIG_KEY_FUNCTION) (const orxSTRING _zKeyName, const orxSTRING _zSectionName, void *_pContext)

Config callback function type to use with ForAllKeys

Definition at line 81 of file orxConfig.h.

◆ orxCONFIG_SAVE_FUNCTION

typedef orxBOOL(orxFASTCALL * orxCONFIG_SAVE_FUNCTION) (const orxSTRING _zSectionName, const orxSTRING _zKeyName, const orxSTRING _zFileName, orxBOOL _bUseEncryption)

Config callback function type to use with Save

Definition at line 72 of file orxConfig.h.

Enumeration Type Documentation

◆ orxCONFIG_EVENT

Event enum

Enumerator
orxCONFIG_EVENT_RELOAD_START 

Event sent when reloading config starts

orxCONFIG_EVENT_RELOAD_STOP 

Event sent when reloading config stops

orxCONFIG_EVENT_NUMBER 
orxCONFIG_EVENT_NONE 

Definition at line 59 of file orxConfig.h.

Function Documentation

◆ orxConfig_AppendListString()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_AppendListString ( const orxSTRING _zKey,
const orxSTRING _azValue[],
orxU32 _u32Number )
extern

Appends string values to a config list (will create a new entry if not already present)

Parameters
[in]_zKeyKey name
[in]_azValueValues
[in]_u32NumberNumber of values
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_AppendString()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_AppendString ( const orxSTRING _zKey,
const orxSTRING _zValue )
extern

Appends a string value to a config list (will create a new entry if not already present)

Parameters
[in]_zKeyKey name
[in]_zValueValue
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_Clear()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Clear ( const orxCONFIG_CLEAR_FUNCTION _pfnClearCallback)
extern

Clears all config info

Parameters
[in]_pfnClearCallbackCallback used to filter sections/keys to clear. If null, all sections/keys will be cleared
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_ClearSection()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearSection ( const orxSTRING _zSectionName)
extern

Clears section

Parameters
[in]_zSectionNameSection name to clear

◆ orxConfig_ClearValue()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ClearValue ( const orxSTRING _zKey)
extern

Clears a value from current selected section

Parameters
[in]_zKeyKey name
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_CopyFile()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_CopyFile ( const orxSTRING _zDstFileName,
const orxSTRING _zSrcFileName,
const orxSTRING _zEncryptionKey )
extern

Copies a file with optional encryption

Parameters
[in]_zDstFileNameName of the destination file
[in]_zSrcFileNameName of the source file
[in]_zEncryptionKeyEncryption key to use when writing destination file, orxNULL for no encryption
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_DuplicateRawValue()

orxDLLAPI orxSTRING orxFASTCALL orxConfig_DuplicateRawValue ( const orxSTRING _zKey)
extern

Duplicates a raw value (string) from config

Parameters
[in]_zKeyKey name
Returns
The value. If non-null, needs to be deleted by the caller with orxString_Delete()

◆ orxConfig_EnableTypoCheck()

orxDLLAPI void orxFASTCALL orxConfig_EnableTypoCheck ( orxBOOL _bEnable)
extern

Enables/disables config typo check (debug-only)

◆ orxConfig_Exit()

orxDLLAPI void orxFASTCALL orxConfig_Exit ( )
extern

Exits from the Config Module

◆ orxConfig_ForAllKeys()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ForAllKeys ( const orxCONFIG_KEY_FUNCTION _pfnKeyCallback,
orxBOOL _bIncludeParents,
void * _pContext )
extern

Runs a callback for all keys of the current section

Parameters
[in]_pfnKeyCallbackFunction to run for each key. If this function returns orxFALSE, no other keys will be processed (ie. early exit)
[in]_bIncludeParentsInclude keys inherited from all parents (ie. that are not locally defined), except the default one
[in]_pContextUser defined context, passed to the callback
Returns
orxSTATUS_SUCCESS if all keys were processed without interruption, orxSTATUS_FAILURE otherwise

◆ orxConfig_GetBool()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetBool ( const orxSTRING _zKey)
extern

Reads a boolean value from config (will take a random value if a list is provided for this key)

Parameters
[in]_zKeyKey name
Returns
The value

◆ orxConfig_GetColorVector()

orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetColorVector ( const orxSTRING _zKey,
orxCOLORSPACE _eColorSpace,
orxVECTOR * _pvVector )
extern

Reads a vector value from config and interpret any color literals in the given color space (will take a random value if a list is provided for this key)

Parameters
[in]_zKeyKey name
[in]_eColorSpaceColor space to use when translating color literals (NONE: no literal, COMPONENT: 0-255 RGB values, all others: normalized spaces)
[out]_pvVectorStorage for vector value
Returns
The value if valid, orxNULL otherwise

◆ orxConfig_GetCurrentSection()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetCurrentSection ( )
extern

Gets current working section

Returns
Current selected section

◆ orxConfig_GetDefaultParent()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetDefaultParent ( )
extern

Gets default parent for all sections

Returns
Default parent name if set, orxNULL otherwise

◆ orxConfig_GetEncryptionKey()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetEncryptionKey ( )
extern

Gets encryption key

Returns
Current encryption key / orxSTRING_EMPTY

◆ orxConfig_GetFloat()

orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetFloat ( const orxSTRING _zKey)
extern

Reads a float value from config (will take a random value if a list is provided for this key)

Parameters
[in]_zKeyKey name
Returns
The value

◆ orxConfig_GetKey()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetKey ( orxU32 _u32KeyIndex)
extern

Gets key for the current section at the given index

Parameters
[in]_u32KeyIndexIndex of the desired key
Returns
orxSTRING if exist, orxSTRING_EMPTY otherwise

◆ orxConfig_GetKeyCount()

orxDLLAPI orxU32 orxFASTCALL orxConfig_GetKeyCount ( )
extern

Gets key count of the current section

Returns
Key count of the current section if valid, 0 otherwise

◆ orxConfig_GetListBool()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_GetListBool ( const orxSTRING _zKey,
orxS32 _s32ListIndex )
extern

Reads a boolean value from config list

Parameters
[in]_zKeyKey name
[in]_s32ListIndexIndex of desired item in list / -1 for random
Returns
The value

◆ orxConfig_GetListColorVector()

orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetListColorVector ( const orxSTRING _zKey,
orxS32 _s32ListIndex,
orxCOLORSPACE _eColorSpace,
orxVECTOR * _pvVector )
extern

Reads a vector value from config list and interpret any color literals in the given color space

Parameters
[in]_zKeyKey name
[in]_s32ListIndexIndex of desired item in list / -1 for random
[in]_eColorSpaceColor space to use when translating color literals (NONE: no literal, COMPONENT: 0-255 RGB values, all others: normalized spaces)
[out]_pvVectorStorage for vector value
Returns
The value if valid, orxNULL otherwise

◆ orxConfig_GetListCount()

orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListCount ( const orxSTRING _zKey)
extern

Gets list count for a given key

Parameters
[in]_zKeyKey name
Returns
List count if it's a valid list, 0 otherwise

◆ orxConfig_GetListFloat()

orxDLLAPI orxFLOAT orxFASTCALL orxConfig_GetListFloat ( const orxSTRING _zKey,
orxS32 _s32ListIndex )
extern

Reads a float value from config list

Parameters
[in]_zKeyKey name
[in]_s32ListIndexIndex of desired item in list / -1 for random
Returns
The value

◆ orxConfig_GetListS32()

orxDLLAPI orxS32 orxFASTCALL orxConfig_GetListS32 ( const orxSTRING _zKey,
orxS32 _s32ListIndex )
extern

Reads a signed integer value from config list

Parameters
[in]_zKeyKey name
[in]_s32ListIndexIndex of desired item in list / -1 for random
Returns
The value

◆ orxConfig_GetListS64()

orxDLLAPI orxS64 orxFASTCALL orxConfig_GetListS64 ( const orxSTRING _zKey,
orxS32 _s32ListIndex )
extern

Reads a signed integer value from config list

Parameters
[in]_zKeyKey name
[in]_s32ListIndexIndex of desired item in list / -1 for random
Returns
The value

◆ orxConfig_GetListString()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetListString ( const orxSTRING _zKey,
orxS32 _s32ListIndex )
extern

Reads a string value from config list Beware: result might not persist through any subsequent orxConfig_Get* calls

Parameters
[in]_zKeyKey name
[in]_s32ListIndexIndex of desired item in list / -1 for random
Returns
The value

◆ orxConfig_GetListU32()

orxDLLAPI orxU32 orxFASTCALL orxConfig_GetListU32 ( const orxSTRING _zKey,
orxS32 _s32ListIndex )
extern

Reads an unsigned integer value from config list

Parameters
[in]_zKeyKey name
[in]_s32ListIndexIndex of desired item in list / -1 for random
Returns
The value

◆ orxConfig_GetListU64()

orxDLLAPI orxU64 orxFASTCALL orxConfig_GetListU64 ( const orxSTRING _zKey,
orxS32 _s32ListIndex )
extern

Reads an unsigned integer value from config list

Parameters
[in]_zKeyKey name
[in]_s32ListIndexIndex of desired item in list / -1 for random
Returns
The value

◆ orxConfig_GetListVector()

orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetListVector ( const orxSTRING _zKey,
orxS32 _s32ListIndex,
orxVECTOR * _pvVector )
extern

Reads a vector value from config list

Parameters
[in]_zKeyKey name
[in]_s32ListIndexIndex of desired item in list / -1 for random
[out]_pvVectorStorage for vector value
Returns
The value

◆ orxConfig_GetMainFileName()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetMainFileName ( )
extern

Gets config main file name

Returns
Config main file name / orxSTRING_EMPTY

◆ orxConfig_GetOrigin()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetOrigin ( const orxSTRING _zSectionName)
extern

Gets section origin (ie. the file where it was defined for the first time or orxSTRING_EMPTY if not defined via a file)

Parameters
[in]_zSectionNameConcerned section name
Returns
orxSTRING if found, orxSTRING_EMPTY otherwise

◆ orxConfig_GetOriginID()

orxDLLAPI orxSTRINGID orxFASTCALL orxConfig_GetOriginID ( const orxSTRING _zSectionName)
extern

Gets section origin ID (ie. the file where it was defined for the first time or orxSTRING_EMPTY if not defined via a file)

Parameters
[in]_zSectionNameConcerned section name
Returns
String ID if found, orxSTRINGID_UNDEFINED otherwise

◆ orxConfig_GetParent()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetParent ( const orxSTRING _zSectionName)
extern

Gets a section's parent

Parameters
[in]_zSectionNameConcerned section
Returns
Section's parent name if set, orxSTRING_EMPTY if no parent has been forced or orxNULL otherwise

◆ orxConfig_GetParentDistance()

orxDLLAPI orxU32 orxFASTCALL orxConfig_GetParentDistance ( const orxSTRING _zSectionName,
const orxSTRING _zParentName )
extern

Gets parent distance, ie. how far up the ancestry of a given section is a parent (does not consider the default parent)

Parameters
[in]_zSectionNameConcerned section
[in]_zParentNameParent section name to check
Returns
1 for a direct parent, 2 for a grandparent, etc., and 0 if not found in the ancestry

◆ orxConfig_GetS32()

orxDLLAPI orxS32 orxFASTCALL orxConfig_GetS32 ( const orxSTRING _zKey)
extern

Reads a signed integer value from config (will take a random value if a list is provided for this key)

Parameters
[in]_zKeyKey name
Returns
The value

◆ orxConfig_GetS64()

orxDLLAPI orxS64 orxFASTCALL orxConfig_GetS64 ( const orxSTRING _zKey)
extern

Reads a signed integer value from config (will take a random value if a list is provided for this key)

Parameters
[in]_zKeyKey name
Returns
The value

◆ orxConfig_GetSection()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetSection ( orxU32 _u32SectionIndex)
extern

Gets section at the given index

Parameters
[in]_u32SectionIndexIndex of the desired section
Returns
orxSTRING if exist, orxSTRING_EMPTY otherwise

◆ orxConfig_GetSectionCount()

orxDLLAPI orxU32 orxFASTCALL orxConfig_GetSectionCount ( )
extern

Gets section count

Returns
Section count

◆ orxConfig_GetString()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetString ( const orxSTRING _zKey)
extern

Reads a string value from config (will take a random value if a list is provided for this key) Beware: result might not persist through any subsequent orxConfig_Get* calls

Parameters
[in]_zKeyKey name
Returns
The value

◆ orxConfig_GetU32()

orxDLLAPI orxU32 orxFASTCALL orxConfig_GetU32 ( const orxSTRING _zKey)
extern

Reads an unsigned integer value from config (will take a random value if a list is provided for this key)

Parameters
[in]_zKeyKey name
Returns
The value

◆ orxConfig_GetU64()

orxDLLAPI orxU64 orxFASTCALL orxConfig_GetU64 ( const orxSTRING _zKey)
extern

Reads an unsigned integer value from config (will take a random value if a list is provided for this key)

Parameters
[in]_zKeyKey name
Returns
The value

◆ orxConfig_GetValueSource()

orxDLLAPI const orxSTRING orxFASTCALL orxConfig_GetValueSource ( const orxSTRING _zKey)
extern

Gets a value's source section (ie. the section where the value is explicitly defined), only considering section inheritance, not local one

Parameters
[in]_zKeyKey name
Returns
Name of the section that explicitly contains the value, orxSTRING_EMPTY if not found

◆ orxConfig_GetVector()

orxDLLAPI orxVECTOR *orxFASTCALL orxConfig_GetVector ( const orxSTRING _zKey,
orxVECTOR * _pvVector )
extern

Reads a vector value from config (will take a random value if a list is provided for this key)

Parameters
[in]_zKeyKey name
[out]_pvVectorStorage for vector value
Returns
The value if valid, orxNULL otherwise

◆ orxConfig_HasSection()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasSection ( const orxSTRING _zSectionName)
extern

Has section for the given section name?

Parameters
[in]_zSectionNameSection name
Returns
orxTRUE / orxFALSE

◆ orxConfig_HasValue()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasValue ( const orxSTRING _zKey)
extern

Has specified value for the given key?

Parameters
[in]_zKeyKey name
Returns
orxTRUE / orxFALSE

◆ orxConfig_HasValueNoCheck()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_HasValueNoCheck ( const orxSTRING _zKey)
extern

Has specified value for the given key (no check for typos)?

Parameters
[in]_zKeyKey name
Returns
orxTRUE / orxFALSE

◆ orxConfig_Init()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Init ( )
extern

Initializes the Config Module

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_IsCommandValue()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsCommandValue ( const orxSTRING _zKey)
extern

Is this a command value? (ie. lazily evaluated command: %...)

Parameters
[in]_zKeyKey name
Returns
orxTRUE / orxFALSE

◆ orxConfig_IsDynamicValue()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsDynamicValue ( const orxSTRING _zKey)
extern

Is this value dynamic? (ie. random and/or a list or command)

Parameters
[in]_zKeyKey name
Returns
orxTRUE / orxFALSE

◆ orxConfig_IsInheritedValue()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsInheritedValue ( const orxSTRING _zKey)
extern

Is this value inherited from another one (either locally or at section level)?

Parameters
[in]_zKeyKey name
Returns
orxTRUE / orxFALSE

◆ orxConfig_IsList()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsList ( const orxSTRING _zKey)
extern

Is value a list for the given key?

Parameters
[in]_zKeyKey name
Returns
orxTRUE / orxFALSE

◆ orxConfig_IsLocallyInheritedValue()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsLocallyInheritedValue ( const orxSTRING _zKey)
extern

Is this value locally inherited from another one (ie. with a Value = ... syntax)?

Parameters
[in]_zKeyKey name
Returns
orxTRUE / orxFALSE

◆ orxConfig_IsRandomValue()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsRandomValue ( const orxSTRING _zKey)
extern

Is this value random? (ie. using '~' character, within or without a list)

Parameters
[in]_zKeyKey name
Returns
orxTRUE / orxFALSE

◆ orxConfig_IsTypoCheckEnabled()

orxDLLAPI orxBOOL orxFASTCALL orxConfig_IsTypoCheckEnabled ( )
extern

Is typo check enabled?

Returns
orxTRUE / orxFALSE

◆ orxConfig_Load()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Load ( const orxSTRING _zFileName)
extern

Loads config file from source

Parameters
[in]_zFileNameFile name
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_LoadFromMemory()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_LoadFromMemory ( orxCHAR * _acBuffer,
orxU32 _u32BufferSize )
extern

Loads config data from a memory buffer. NB: the buffer will be modified during processing!

Parameters
[in]_acBufferBuffer to process, will be modified during processing
[in]_u32BufferSizeSize of the buffer
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_MergeFiles()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_MergeFiles ( const orxSTRING _zDstFileName,
const orxSTRING * _azSrcFileName,
orxU32 _u32Number,
const orxSTRING _zEncryptionKey )
extern

Merges multiple files into a single one, with optional encryption

Parameters
[in]_zDstFileNameName of the destination file
[in]_azSrcFileNameList of the names of the source files
[in]_u32NumberNumber of source file names
[in]_zEncryptionKeyEncryption key to use when writing destination file, orxNULL for no encryption
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_PopSection()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PopSection ( )
extern

Pops last section from section stack

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_ProtectSection()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ProtectSection ( const orxSTRING _zSectionName,
orxBOOL _bProtect )
extern

Protects/unprotects a section from deletion (content might still be changed or deleted, but the section itself will resist delete/clear calls)

Parameters
[in]_zSectionNameSection name to protect
[in]_bProtectorxTRUE for protecting the section, orxFALSE to remove the protection
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_PushSection()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_PushSection ( const orxSTRING _zSectionName)
extern

Pushes a section (storing the current one on section stack)

Parameters
[in]_zSectionNameSection name to push
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_ReloadHistory()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_ReloadHistory ( )
extern

Reloads config files from history

Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_RenameSection()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_RenameSection ( const orxSTRING _zSectionName,
const orxSTRING _zNewSectionName )
extern

Renames a section

Parameters
[in]_zSectionNameSection to rename
[in]_zNewSectionNameNew name for the section
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_Save()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_Save ( const orxSTRING _zFileName,
orxBOOL _bUseEncryption,
const orxCONFIG_SAVE_FUNCTION _pfnSaveCallback )
extern

Writes config to given file. Will overwrite any existing file, including all comments.

Parameters
[in]_zFileNameFile name, if null or empty the default file name will be used
[in]_bUseEncryptionUse file encryption to make it human non-readable?
[in]_pfnSaveCallbackCallback used to filter sections/keys to save. If null, all sections/keys will be saved
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SelectSection()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SelectSection ( const orxSTRING _zSectionName)
extern

Selects current working section

Parameters
[in]_zSectionNameSection name to select
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetBaseName()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBaseName ( const orxSTRING _zBaseName)
extern

Sets config base name

Parameters
[in]_zBaseNameBase name used for default config file
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetBool()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBool ( const orxSTRING _zKey,
orxBOOL _bValue )
extern

Writes a boolean value to config

Parameters
[in]_zKeyKey name
[in]_bValueValue
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetBootstrap()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetBootstrap ( const orxCONFIG_BOOTSTRAP_FUNCTION _pfnBootstrap)
extern

Sets config bootstrap function: this function will get called when the config module is initialized, before any config file is loaded. The only available APIs from within the bootstrap function are those of orxConfig and its dependencies (orxMemory, orxString, orxFile, orxEvent, orxResource, ...)

Parameters
[in]_pfnBootstrapBootstrap function that will get called at module init, before loading any config file. If this function returns orxSTATUS_FAILURE, the default config file will be skipped, otherwise the regular load sequence will take place
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetDefaultParent()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetDefaultParent ( const orxSTRING _zSectionName)
extern

Sets default parent for all sections

Parameters
[in]_zSectionNameSection name that will be used as an implicit default parent section for all config sections, if orxNULL is provided, default parent will be removed
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetEncryptionKey()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetEncryptionKey ( const orxSTRING _zEncryptionKey)
extern

Sets encryption key

Parameters
[in]_zEncryptionKeyEncryption key to use, orxNULL to clear
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetFloat()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetFloat ( const orxSTRING _zKey,
orxFLOAT _fValue )
extern

Writes a float value to config

Parameters
[in]_zKeyKey name
[in]_fValueValue
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetListString()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetListString ( const orxSTRING _zKey,
const orxSTRING _azValue[],
orxU32 _u32Number )
extern

Writes a list of string values to config

Parameters
[in]_zKeyKey name
[in]_azValueValues
[in]_u32NumberNumber of values
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetOrigin()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetOrigin ( const orxSTRING _zSectionName,
const orxSTRING _zOrigin )
extern

Sets (overrides) section origin

Parameters
[in]_zSectionNameConcerned section name
[in]_zOriginOrigin name to set, orxNULL for none
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetParent()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetParent ( const orxSTRING _zSectionName,
const orxSTRING _zParentName )
extern

Sets a section's parent

Parameters
[in]_zSectionNameConcerned section, if the section doesn't exist, it will be created
[in]_zParentNameParent section's name, if the section doesn't exist, it will be created, if orxNULL is provided, the former parent will be erased, if orxSTRING_EMPTY is provided, "no default parent" will be enforced
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetS32()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS32 ( const orxSTRING _zKey,
orxS32 _s32Value )
extern

Writes a signed integer value to config

Parameters
[in]_zKeyKey name
[in]_s32ValueValue
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetS64()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetS64 ( const orxSTRING _zKey,
orxS64 _s64Value )
extern

Writes a signed integer value to config

Parameters
[in]_zKeyKey name
[in]_s64ValueValue
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetString()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetString ( const orxSTRING _zKey,
const orxSTRING _zValue )
extern

Writes a string value to config

Parameters
[in]_zKeyKey name
[in]_zValueValue
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetStringBlock()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetStringBlock ( const orxSTRING _zKey,
const orxSTRING _zValue )
extern

Writes a string value to config, in block mode

Parameters
[in]_zKeyKey name
[in]_zValueValue to write in block mode
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetU32()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU32 ( const orxSTRING _zKey,
orxU32 _u32Value )
extern

Writes an unsigned integer value to config

Parameters
[in]_zKeyKey name
[in]_u32ValueValue
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_SetU64()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetU64 ( const orxSTRING _zKey,
orxU64 _u64Value )
extern

Writes an unsigned integer value to config

Parameters
[in]_zKeyKey name
[in]_u64ValueValue
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

◆ orxConfig_Setup()

orxDLLAPI void orxFASTCALL orxConfig_Setup ( )
extern

Config module setup

◆ orxConfig_SetVector()

orxDLLAPI orxSTATUS orxFASTCALL orxConfig_SetVector ( const orxSTRING _zKey,
const orxVECTOR * _pvValue )
extern

Writes a vector value to config

Parameters
[in]_zKeyKey name
[in]_pvValueValue
Returns
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Generated for orx by doxygen 1.8.11