chsvlib
chsv helper source code

◆ PFNGET_TAG_DESCRIPTION_PROCA

typedef char*(* PFNGET_TAG_DESCRIPTION_PROCA) (const char *lpszTag, std::uintptr_t nUserParam, int nCallCounter)

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]lpszTagis 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]nUserParamis a parameter passed by a user during his call to the formatting function.
[in]nCallCounteris 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 AllocateAndFormatStringByTagsA 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
AllocateAndFormatStringByTagsA;
AllocateAndFormatStringByTagsVA.