A type of a pointer to a callback function used by the allocation functions initializing strings by formats specified using sets of tags. The function is used as an associator between a tag and the appropriate output value.
- Parameters
-
[in] | lpszTag | is a pointer to a string with a tag which occurrences in the input of formatting functions are to be replaced by a value returned by the callback. |
[in] | nUserParam | is a parameter passed by a user during his call to the formatting function. |
[in] | nCallCounter | is an integer specifying a number of times the callback function was called for the current tag before the current call. I.e. its value will be zero for the first call, one for the second, etc. See the descriptions of the formatting functions like AllocateAndFormatStringByTagsW for explanation about the counter and definitions of deterministic and non-deterministic association of the tag. |
- Returns
- On success the function must return a string associated with the tag. On failure the function must return NULL. In this case the formatting function would also fail without setting its own error code.
- Warning
- The returned string must be allocated using one of the allocation functions of the Chusov::Memory or Chusov::String namespace.
- See also
- AllocateAndFormatStringByTagsW;
AllocateAndFormatStringByTagsVW.