ESR_SessionSingleton Struct Reference
[ESR_Session API functions]


Detailed Description

Hashmap with helper functions for adding primitives and add-if-empty.

Data Fields

ESR_ReturnCode(* getProperty )(const LCHAR *name, void **value, VariableTypes type)
ESR_ReturnCode(* getPropertyType )(const LCHAR *name, VariableTypes *type)
ESR_ReturnCode(* getInt )(const LCHAR *name, int *value)
ESR_ReturnCode(* getUint16_t )(const LCHAR *name, asr_uint16_t *value)
ESR_ReturnCode(* getSize_t )(const LCHAR *name, size_t *value)
ESR_ReturnCode(* getFloat )(const LCHAR *name, float *value)
ESR_ReturnCode(* getBool )(const LCHAR *name, ESR_BOOL *value)
ESR_ReturnCode(* getLCHAR )(const LCHAR *name, LCHAR *value, size_t *len)
ESR_ReturnCode(* contains )(const LCHAR *name, ESR_BOOL *exists)
ESR_ReturnCode(* setProperty )(const LCHAR *name, void *value, VariableTypes type)
ESR_ReturnCode(* setInt )(const LCHAR *name, int value)
ESR_ReturnCode(* setUint16_t )(const LCHAR *name, asr_uint16_t value)
ESR_ReturnCode(* setSize_t )(const LCHAR *name, size_t value)
ESR_ReturnCode(* setFloat )(const LCHAR *name, float value)
ESR_ReturnCode(* setBool )(const LCHAR *name, ESR_BOOL value)
ESR_ReturnCode(* setLCHAR )(const LCHAR *name, LCHAR *value)
ESR_ReturnCode(* setIntIfEmpty )(const LCHAR *name, int value)
ESR_ReturnCode(* setUint16_tIfEmpty )(const LCHAR *name, asr_uint16_t value)
ESR_ReturnCode(* setSize_tIfEmpty )(const LCHAR *name, size_t value)
ESR_ReturnCode(* setFloatIfEmpty )(const LCHAR *name, float value)
ESR_ReturnCode(* setBoolIfEmpty )(const LCHAR *name, ESR_BOOL value)
ESR_ReturnCode(* setLCHARIfEmpty )(const LCHAR *name, LCHAR *value)
ESR_ReturnCode(* removeProperty )(const LCHAR *name)
ESR_ReturnCode(* removeAndFreeProperty )(const LCHAR *name)
ESR_ReturnCode(* importCommandLine )(int argc, char *argv[])
ESR_ReturnCode(* getSize )(size_t *size)
ESR_ReturnCode(* getKeyAtIndex )(size_t index, LCHAR **key)
ESR_ReturnCode(* convertToInt )(const LCHAR *key)
ESR_ReturnCode(* convertToUint16_t )(const LCHAR *key)
ESR_ReturnCode(* convertToSize_t )(const LCHAR *key)
ESR_ReturnCode(* convertToFloat )(const LCHAR *key)
ESR_ReturnCode(* convertToBool )(const LCHAR *key)
ESR_ReturnCode(* destroy )(void)
ESR_ReturnCode(* importParFile )(const LCHAR *filename)
ESR_ReturnCode(* importArgFile )(const LCHAR *filename)
void * data

Field Documentation

ESR_ReturnCode(* ESR_SessionSingleton::getProperty)(const LCHAR *name, void **value, VariableTypes type)

Returns session property value.

Parameters:
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.

Parameters:
name Property name
type [out] Value type

ESR_ReturnCode(* ESR_SessionSingleton::getInt)(const LCHAR *name, int *value)

Returns copy of session property value.

Parameters:
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.

Parameters:
name Property name
value Property value

ESR_ReturnCode(* ESR_SessionSingleton::getSize_t)(const LCHAR *name, size_t *value)

Returns copy of session property value.

Parameters:
name Property name
value Property value

ESR_ReturnCode(* ESR_SessionSingleton::getFloat)(const LCHAR *name, float *value)

Returns copy of session property value.

Parameters:
name Property name
value Property value

ESR_ReturnCode(* ESR_SessionSingleton::getBool)(const LCHAR *name, ESR_BOOL *value)

Returns copy of session property value.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
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.

Parameters:
name Property name
value Property value

ESR_ReturnCode(* ESR_SessionSingleton::removeProperty)(const LCHAR *name)

Removes property from session.

Parameters:
name Property name

ESR_ReturnCode(* ESR_SessionSingleton::removeAndFreeProperty)(const LCHAR *name)

Removes and deallocates property from session.

Parameters:
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.

Parameters:
argc Number of arguments
argv Argument values

ESR_ReturnCode(* ESR_SessionSingleton::getSize)(size_t *size)

Returns the number of elements in the session.

Parameters:
size [out] Session size

ESR_ReturnCode(* ESR_SessionSingleton::getKeyAtIndex)(size_t index, LCHAR **key)

Returns the key associated with the specified index.

Parameters:
index Element index
key [out] Key name

ESR_ReturnCode(* ESR_SessionSingleton::convertToInt)(const LCHAR *key)

Convert the specified argument to int.

Parameters:
key Property name

ESR_ReturnCode(* ESR_SessionSingleton::convertToUint16_t)(const LCHAR *key)

Convert the specified argument to asr_uint16_t.

Parameters:
key Property name

ESR_ReturnCode(* ESR_SessionSingleton::convertToSize_t)(const LCHAR *key)

Convert the specified argument to size_t.

Parameters:
key Property name

ESR_ReturnCode(* ESR_SessionSingleton::convertToFloat)(const LCHAR *key)

Convert the specified argument to float.

Parameters:
key Property name

ESR_ReturnCode(* ESR_SessionSingleton::convertToBool)(const LCHAR *key)

Convert the specified argument to bool.

Parameters:
key Property name

ESR_ReturnCode(* ESR_SessionSingleton::destroy)(void)

Destroys the system session.

ESR_ReturnCode(* ESR_SessionSingleton::importParFile)(const LCHAR *filename)

Import PAR file into session.

Parameters:
file File to read session from

ESR_ReturnCode(* ESR_SessionSingleton::importArgFile)(const LCHAR *filename)

Import ARG file into session.

Parameters:
file File to read arguments from

void* ESR_SessionSingleton::data

Pointer to session data.


Generated on Thu May 1 15:37:27 2008 for SREC by  doxygen 1.5.3