|
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.
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. |
Success | P6R::eOk | |
Failure | P6R::eNotInitialized | A successful call to initialize was not made before this call. |
P6R::eInvalidArg | One of the parameters is NULL. |