Data Fields | |
ESR_ReturnCode(* | getProperty )(struct ESR_SessionType_t *self, const LCHAR *name, void **value, VariableTypes type) |
ESR_ReturnCode(* | getPropertyType )(struct ESR_SessionType_t *self, const LCHAR *name, VariableTypes *type) |
ESR_ReturnCode(* | getInt )(struct ESR_SessionType_t *self, const LCHAR *name, int *value) |
ESR_ReturnCode(* | getUint16_t )(struct ESR_SessionType_t *self, const LCHAR *name, asr_uint16_t *value) |
ESR_ReturnCode(* | getSize_t )(struct ESR_SessionType_t *self, const LCHAR *name, size_t *value) |
ESR_ReturnCode(* | getFloat )(struct ESR_SessionType_t *self, const LCHAR *name, float *value) |
ESR_ReturnCode(* | getBool )(struct ESR_SessionType_t *self, const LCHAR *name, ESR_BOOL *value) |
ESR_ReturnCode(* | getLCHAR )(struct ESR_SessionType_t *self, const LCHAR *name, LCHAR *value, size_t *len) |
ESR_ReturnCode(* | contains )(struct ESR_SessionType_t *self, const LCHAR *name, ESR_BOOL *exists) |
ESR_ReturnCode(* | setProperty )(struct ESR_SessionType_t *self, const LCHAR *name, void *value, VariableTypes type) |
ESR_ReturnCode(* | setInt )(struct ESR_SessionType_t *self, const LCHAR *name, int value) |
ESR_ReturnCode(* | setUint16_t )(struct ESR_SessionType_t *self, const LCHAR *name, asr_uint16_t value) |
ESR_ReturnCode(* | setSize_t )(struct ESR_SessionType_t *self, const LCHAR *name, size_t value) |
ESR_ReturnCode(* | setFloat )(struct ESR_SessionType_t *self, const LCHAR *name, float value) |
ESR_ReturnCode(* | setBool )(struct ESR_SessionType_t *self, const LCHAR *name, ESR_BOOL value) |
ESR_ReturnCode(* | setLCHAR )(struct ESR_SessionType_t *self, const LCHAR *name, LCHAR *value) |
ESR_ReturnCode(* | setIntIfEmpty )(struct ESR_SessionType_t *self, const LCHAR *name, int value) |
ESR_ReturnCode(* | setUint16_tIfEmpty )(struct ESR_SessionType_t *self, const LCHAR *name, asr_uint16_t value) |
ESR_ReturnCode(* | setSize_tIfEmpty )(struct ESR_SessionType_t *self, const LCHAR *name, size_t value) |
ESR_ReturnCode(* | setFloatIfEmpty )(struct ESR_SessionType_t *self, const LCHAR *name, float value) |
ESR_ReturnCode(* | setBoolIfEmpty )(struct ESR_SessionType_t *self, const LCHAR *name, ESR_BOOL value) |
ESR_ReturnCode(* | setLCHARIfEmpty )(struct ESR_SessionType_t *self, const LCHAR *name, LCHAR *value) |
ESR_ReturnCode(* | removeProperty )(struct ESR_SessionType_t *self, const LCHAR *name) |
ESR_ReturnCode(* | removeAndFreeProperty )(struct ESR_SessionType_t *self, const LCHAR *name) |
ESR_ReturnCode(* | importCommandLine )(struct ESR_SessionType_t *self, int argc, char *argv[]) |
ESR_ReturnCode(* | getSize )(struct ESR_SessionType_t *self, size_t *size) |
ESR_ReturnCode(* | getKeyAtIndex )(struct ESR_SessionType_t *self, size_t index, LCHAR **key) |
ESR_ReturnCode(* | convertToInt )(struct ESR_SessionType_t *self, const LCHAR *key) |
ESR_ReturnCode(* | convertToUint16_t )(struct ESR_SessionType_t *self, const LCHAR *key) |
ESR_ReturnCode(* | convertToSize_t )(struct ESR_SessionType_t *self, const LCHAR *key) |
ESR_ReturnCode(* | convertToFloat )(struct ESR_SessionType_t *self, const LCHAR *key) |
ESR_ReturnCode(* | convertToBool )(struct ESR_SessionType_t *self, const LCHAR *key) |
ESR_ReturnCode(* | destroy )(struct ESR_SessionType_t *self) |
ESR_ReturnCode(* | importParFile )(struct ESR_SessionType_t *self, const LCHAR *filename) |
ESR_ReturnCode(* | importArgFile )(struct ESR_SessionType_t *self, const LCHAR *filename) |
ESR_ReturnCode(* | addListener )(struct ESR_SessionType_t *self, ESR_SessionTypeListenerPair *listener) |
ESR_ReturnCode(* | removeListener )(struct ESR_SessionType_t *self, ESR_SessionTypeListenerPair *listener) |
void * | data |
ESR_ReturnCode(* ESR_SessionType::getProperty)(struct ESR_SessionType_t *self, const LCHAR *name, void **value, VariableTypes type) |
Returns session property value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value | |
type | Expected variable type (for strong-typing purposes) |
ESR_ReturnCode(* ESR_SessionType::getPropertyType)(struct ESR_SessionType_t *self, const LCHAR *name, VariableTypes *type) |
Returns the type of a property value.
self | ESR_SessionType handle | |
name | Property name | |
type | [out] Value type |
ESR_ReturnCode(* ESR_SessionType::getInt)(struct ESR_SessionType_t *self, const LCHAR *name, int *value) |
Returns copy of session property value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::getUint16_t)(struct ESR_SessionType_t *self, const LCHAR *name, asr_uint16_t *value) |
Returns copy of session property value.
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::getSize_t)(struct ESR_SessionType_t *self, const LCHAR *name, size_t *value) |
Returns copy of session property value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_INVALID_RESULT_TYPE if the property is not a size_t
ESR_ReturnCode(* ESR_SessionType::getFloat)(struct ESR_SessionType_t *self, const LCHAR *name, float *value) |
Returns copy of session property value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::getBool)(struct ESR_SessionType_t *self, const LCHAR *name, ESR_BOOL *value) |
Returns copy of session property value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::getLCHAR)(struct ESR_SessionType_t *self, const LCHAR *name, LCHAR *value, size_t *len) |
Returns copy of session property value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value | |
len | Size of value argument. If the return code is ESR_BUFFER_OVERFLOW, the required length is returned in this variable. |
ESR_ReturnCode(* ESR_SessionType::contains)(struct ESR_SessionType_t *self, const LCHAR *name, ESR_BOOL *exists) |
Indicates if key exists in the session.
self | ESR_SessionType handle | |
name | Property name | |
exists | True if key exists, false otherwise |
ESR_ReturnCode(* ESR_SessionType::setProperty)(struct ESR_SessionType_t *self, const LCHAR *name, void *value, VariableTypes type) |
Sets session property value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value | |
type | Type of value being set |
ESR_ReturnCode(* ESR_SessionType::setInt)(struct ESR_SessionType_t *self, const LCHAR *name, int value) |
Sets session property value, storing a copy of the value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::setUint16_t)(struct ESR_SessionType_t *self, 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_SessionType::setSize_t)(struct ESR_SessionType_t *self, const LCHAR *name, size_t value) |
Sets session property value, storing a copy of the value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::setFloat)(struct ESR_SessionType_t *self, const LCHAR *name, float value) |
Sets session property value, storing a copy of the value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::setBool)(struct ESR_SessionType_t *self, const LCHAR *name, ESR_BOOL value) |
Sets session property value, storing a copy of the value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::setLCHAR)(struct ESR_SessionType_t *self, const LCHAR *name, LCHAR *value) |
Sets session property value, storing a copy of the value.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::setIntIfEmpty)(struct ESR_SessionType_t *self, 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.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::setUint16_tIfEmpty)(struct ESR_SessionType_t *self, 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_SessionType::setSize_tIfEmpty)(struct ESR_SessionType_t *self, 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.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::setFloatIfEmpty)(struct ESR_SessionType_t *self, 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.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::setBoolIfEmpty)(struct ESR_SessionType_t *self, 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.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::setLCHARIfEmpty)(struct ESR_SessionType_t *self, 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.
self | ESR_SessionType handle | |
name | Property name | |
value | Property value |
ESR_ReturnCode(* ESR_SessionType::removeProperty)(struct ESR_SessionType_t *self, const LCHAR *name) |
Removes property from session.
self | ESR_SessionType handle | |
name | Property name |
ESR_ReturnCode(* ESR_SessionType::removeAndFreeProperty)(struct ESR_SessionType_t *self, const LCHAR *name) |
Removes and deallocates property from session.
self | ESR_SessionType handle | |
name | Property name |
ESR_ReturnCode(* ESR_SessionType::importCommandLine)(struct ESR_SessionType_t *self, 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.
self | ESR_SessionType handle | |
argc | Number of arguments | |
argv | Argument values |
ESR_ReturnCode(* ESR_SessionType::getSize)(struct ESR_SessionType_t *self, size_t *size) |
Returns the number of elements in the session.
self | ESR_SessionType handle | |
size | [out] Session size |
ESR_ReturnCode(* ESR_SessionType::getKeyAtIndex)(struct ESR_SessionType_t *self, size_t index, LCHAR **key) |
Returns the key associated with the specified index.
self | ESR_SessionType handle | |
index | Element index | |
key | [out] Key name |
ESR_ReturnCode(* ESR_SessionType::convertToInt)(struct ESR_SessionType_t *self, const LCHAR *key) |
Convert the specified argument to int.
self | ESR_SessionType handle | |
key | Property name |
ESR_ReturnCode(* ESR_SessionType::convertToUint16_t)(struct ESR_SessionType_t *self, const LCHAR *key) |
Convert the specified argument to asr_uint16_t.
self | ESR_SessionType handle | |
key | Property name |
ESR_ReturnCode(* ESR_SessionType::convertToSize_t)(struct ESR_SessionType_t *self, const LCHAR *key) |
Convert the specified argument to size_t.
self | ESR_SessionType handle | |
key | Property name |
ESR_ReturnCode(* ESR_SessionType::convertToFloat)(struct ESR_SessionType_t *self, const LCHAR *key) |
Convert the specified argument to float.
self | ESR_SessionType handle | |
key | Property name |
ESR_ReturnCode(* ESR_SessionType::convertToBool)(struct ESR_SessionType_t *self, const LCHAR *key) |
Convert the specified argument to bool.
self | ESR_SessionType handle | |
key | Property name |
ESR_ReturnCode(* ESR_SessionType::destroy)(struct ESR_SessionType_t *self) |
Destroys the Session.
self | ESR_SessionType handle |
ESR_ReturnCode(* ESR_SessionType::importParFile)(struct ESR_SessionType_t *self, const LCHAR *filename) |
Import PAR file into session.
self | ESR_SessionType handle | |
file | File to read session from |
ESR_ReturnCode(* ESR_SessionType::importArgFile)(struct ESR_SessionType_t *self, const LCHAR *filename) |
Import ARG file into session.
self | ESR_SessionType handle | |
file | File to read arguments from |
ESR_ReturnCode(* ESR_SessionType::addListener)(struct ESR_SessionType_t *self, ESR_SessionTypeListenerPair *listener) |
Adds an event-listener.
self | ESR_SessionType handle | |
listener | The event-listener to add |
ESR_ReturnCode(* ESR_SessionType::removeListener)(struct ESR_SessionType_t *self, ESR_SessionTypeListenerPair *listener) |
Removes an event-listener.
self | ESR_SessionType handle | |
listener | The event-listener to remove |
void* ESR_SessionType::data |
Pointer to session data.