ESR_ReturnCode(* ESR_SessionSingleton::getProperty)(const LCHAR *name, void **value, VariableTypes type) |
Returns session property value.
name | Property name | |
value | Property value | |
type | Expected variable type (for strong-typing purposes) |
ESR_ReturnCode(* ESR_SessionSingleton::getPropertyType)(const LCHAR *name, VariableTypes *type) |
Returns the type of a property value.
name | Property name | |
type | [out] Value type |
ESR_ReturnCode(* ESR_SessionSingleton::getInt)(const LCHAR *name, int *value) |
Returns copy of session property value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::getUint16_t)(const LCHAR *name, asr_uint16_t *value) |
Returns copy of session property value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::getSize_t)(const LCHAR *name, size_t *value) |
Returns copy of session property value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::getFloat)(const LCHAR *name, float *value) |
Returns copy of session property value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::getBool)(const LCHAR *name, ESR_BOOL *value) |
Returns copy of session property value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::getLCHAR)(const LCHAR *name, LCHAR *value, size_t *len) |
Returns copy of session property value.
name | Property name | |
value | Property value | |
len | Length of value argument. If the return code is ESR_BUFFER_OVERFLOW, the required length is returned in this variable. |
ESR_ReturnCode(* ESR_SessionSingleton::contains)(const LCHAR *name, ESR_BOOL *exists) |
Indicates if key exists in the session.
name | Property name | |
exists | True if key exists, false otherwise |
ESR_ReturnCode(* ESR_SessionSingleton::setProperty)(const LCHAR *name, void *value, VariableTypes type) |
Sets session property value.
name | Property name | |
value | Property value | |
type | Type of value being set |
ESR_ReturnCode(* ESR_SessionSingleton::setInt)(const LCHAR *name, int value) |
Sets session property value, storing a copy of the value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setUint16_t)(const LCHAR *name, asr_uint16_t value) |
Sets session property value, storing a copy of the value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setSize_t)(const LCHAR *name, size_t value) |
Sets session property value, storing a copy of the value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setFloat)(const LCHAR *name, float value) |
Sets session property value, storing a copy of the value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setBool)(const LCHAR *name, ESR_BOOL value) |
Sets session property value, storing a copy of the value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setLCHAR)(const LCHAR *name, LCHAR *value) |
Sets session property value, storing a copy of the value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setIntIfEmpty)(const LCHAR *name, int value) |
If the key does not exist in the session, calls SessionSetInt().
This helper function aids implementation of "default values", overwriting session values only if they have not been set already.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setUint16_tIfEmpty)(const LCHAR *name, asr_uint16_t value) |
If the key does not exist in the session, calls SessionSetUint16_t().
This helper function aids implementation of "default values", overwriting session values only if they have not been set already.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setSize_tIfEmpty)(const LCHAR *name, size_t value) |
If the key does not exist in the session, calls SessionSetSize_t().
This helper function aids implementation of "default values", overwriting session values only if they have not been set already.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setFloatIfEmpty)(const LCHAR *name, float value) |
If the key does not exist in the session, calls SessionSetFloat().
This helper function aids implementation of "default values", overwriting session values only if they have not been set already.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setBoolIfEmpty)(const LCHAR *name, ESR_BOOL value) |
If the key does not exist in the session, calls SessionSetBool().
This helper function aids implementation of "default values", overwriting session values only if they have not been set already.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::setLCHARIfEmpty)(const LCHAR *name, LCHAR *value) |
If the key does not exist in the session, calls SessionSetLCHAR().
This helper function aids implementation of "default values", overwriting session values only if they have not been set already.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionSingleton::removeProperty)(const LCHAR *name) |
Removes property from session.
name | Property name |
ESR_ReturnCode(* ESR_SessionSingleton::removeAndFreeProperty)(const LCHAR *name) |
Removes and deallocates property from session.
name | Property name |
ESR_ReturnCode(* ESR_SessionSingleton::importCommandLine)(int argc, char *argv[]) |
Imports commandline arguments into the system session.
Keys are imported as "cmdline.[name]" where [name] is the name of the command-line argument Values are set in char* format.
For example, given the argument "-timer=5", the following key will be added to the session: ["cmdline.timer", "5"]
Validation is left up to the application.
If the session contains a key that is clobbered by the parser, the old [key, value] pair will be deallocated. For example, if the session contained ["cmdline.timer", "value"] before the aforementioned example occured, then the old [key, value] pair will be allocated by the parser.
argc | Number of arguments | |
argv | Argument values |
ESR_ReturnCode(* ESR_SessionSingleton::getSize)(size_t *size) |
Returns the number of elements in the session.
size | [out] Session size |
ESR_ReturnCode(* ESR_SessionSingleton::getKeyAtIndex)(size_t index, LCHAR **key) |
Returns the key associated with the specified index.
index | Element index | |
key | [out] Key name |
ESR_ReturnCode(* ESR_SessionSingleton::convertToInt)(const LCHAR *key) |
Convert the specified argument to int.
key | Property name |
ESR_ReturnCode(* ESR_SessionSingleton::convertToUint16_t)(const LCHAR *key) |
Convert the specified argument to asr_uint16_t.
key | Property name |
ESR_ReturnCode(* ESR_SessionSingleton::convertToSize_t)(const LCHAR *key) |
Convert the specified argument to size_t.
key | Property name |
ESR_ReturnCode(* ESR_SessionSingleton::convertToFloat)(const LCHAR *key) |
Convert the specified argument to float.
key | Property name |
ESR_ReturnCode(* ESR_SessionSingleton::convertToBool)(const LCHAR *key) |
Convert the specified argument to bool.
key | Property name |
Destroys the system session.
ESR_ReturnCode(* ESR_SessionSingleton::importParFile)(const LCHAR *filename) |
Import PAR file into session.
file | File to read session from |
ESR_ReturnCode(* ESR_SessionSingleton::importArgFile)(const LCHAR *filename) |
Import ARG file into session.
file | File to read arguments from |
Pointer to session data.