Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
virtual P6R::P6ERR P6R::p6IWConfigTokens::addToken ( const P6WCHAR pToken,
const P6WCHAR pValue 
)
pure virtual

Define what replacement strings shall be used to replace a token found in a "string" type configuration item.

The format of a configuration file is 'key=value'. The 'value' can be composed of a string with one or more replacement tokens (e.g., HostDomain=www.${HOST}.com). The replacement token (here the '${HOST}') will be replaced by the value that it is defined in the pValue parameter. If the token already exists, its old value is over written with its new value.

Note, that the value passed in for the pToken parameter is wrapped by the characters '${}'. So for example if 'Host' is passed in for pToken, this function converts it into '${Host}'. Then '${Host}' should be placed in the configuration file. Each time '${Host}' is found it will be replaced with the value given in the pValue parameter.

This token wrapping is done for the following reasons: (a) allows unwrapped tokens, e.g., 'Host', to appear in a configuration file without being replaced, and (b) to visual indicate all tokens that will be expanded when the config file is loaded.

Parameters
pToken[ in ] String appearing in the value of a key - value pair in a configuration file.
pValue[ in ] String to replace the token when the configuration item is read via the p6IWConfig interface.
Returns
SuccessP6R::eOk 
FailureP6R::eNotInitializedA successful call to initialize was not made before this call.
P6R::eInvalidArgOne of the parameters is NULL.