struct to hold the results of parsing. More...
Public Member Functions | |
intptr_t | ErrorHandler (const char *pFormatString, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept |
Error handler. | |
uintptr_t | FormatArgument (char *pOutputBuffer, uintptr_t uOutputBufferSize, const ParamInfo_t *pParamInfo, const ArgumentType *pArgument) noexcept |
Output argument text. | |
uintptr_t | GenerateFormatOutputToBuffer (char *pOutputBuffer, uintptr_t uOutputBufferSize, uintptr_t uArgCount, const ArgumentType **ppArgs, uintptr_t uParamInfoCount, const ParamInfo_t *pParamInfos) noexcept |
Output formatted text. | |
uint_t | WriteBufferToFile (FILE *fp, const char *pBuffer, uintptr_t uBufferSize, uintptr_t uCharsSoFar) noexcept |
Write data to ANSI FILE record. | |
uintptr_t | GenerateFormattedOutputToFile (FILE *fp, uintptr_t uArgCount, const ArgumentType **ppArgs, uintptr_t uParamInfoCount, const ParamInfo_t *pParamInfos) noexcept |
Output formatted text to a file. | |
uint_t | FormatPreProcess (eParseOptions uOptions, const char *pFormat, uintptr_t uFormatLength, uintptr_t uArgCount, const ArgumentType **ppArgs, uintptr_t uParamInfoCount, ParamInfo_t *pParamInfos) noexcept |
Analyzes a format string, and creates a list of output commands that would created the output using it. | |
Public Attributes | |
uintptr_t | m_uNumOutputCommands |
Number of output commands created. | |
uintptr_t | m_uFormattedOutputLength |
Size of formatted output (no trailing null) in bytes. | |
uintptr_t | m_uErrorFormatSequencePos |
Position of sequence that contains error. | |
uintptr_t | m_uErrorCharPos |
Position of character that triggered error. | |
eError | m_uPhaseResults |
Results of the parsing or output phase. | |
struct to hold the results of parsing.
struct to hold the results of the parsing phase and output phases of a formatted output operation
|
noexcept |
Error handler.
Your opportunity to do additional error handling and reporting. The format string and parameters that were passed in are provided to this function so that detailed information on exactly what the error was
pFormatString | Pointer to the original format string |
uArgCount | Count of arguments in array |
ppArgs | Array of parsed arguments |
|
noexcept |
Output argument text.
Given an argument, the output buffer is sanity checked and then the argument is converted to text and stored in the output buffer.
pOutputBuffer | Pointer to the output buffer |
uOutputBufferSize | Number of bytes in the output buffer |
pParamInfo | Pointer to the structure with the information on how to print out the argument |
pArgument | Pointer to the structure with the argument data |
|
noexcept |
Analyzes a format string, and creates a list of output commands that would created the output using it.
Output commands indicated either a section of text to literally* copy, or an argument to evaluate and convert (format).
Arguments and their corresponding conversion sequences are checked for syntactic errors and type compatibility
It can optionally suppress all argument checking - useful for quick error checking externally supplied format strings at load time
Returns results in ProcessResults_t :
uOptions | |
pFormat | |
uFormatLength | |
uArgCount | Number of available arguments |
ppArgs | Pointer to the array of pointers to arguments |
uParamInfoCount | Number of parameter commands to process |
pParamInfos | Pointer to an array of parameter commands |
|
noexcept |
Output formatted text.
Given a format string and a list of processed arguments, output the final string into the output buffer. If there are issues with the output or if the buffer is exhausted, parsing terminates.
pOutputBuffer | Pointer to the output buffer |
uOutputBufferSize | Number of bytes in the output buffer |
uArgCount | Number of available arguments |
ppArgs | Pointer to the array of pointers to arguments |
uParamInfoCount | Number of parameter commands to process |
pParamInfos | Pointer to an array of parameter commands |
|
noexcept |
Output formatted text to a file.
Given a format string and a list of processed arguments, output the final string into a FILE. If there are issues with the output or if the buffer is exhausted, parsing terminates.
fp | Pointer to the FILE |
uArgCount | Number of available arguments |
ppArgs | Pointer to the array of pointers to arguments |
uParamInfoCount | Number of parameter commands to process |
pParamInfos | Pointer to an array of parameter commands |
|
noexcept |
Write data to ANSI FILE record.
Write a data buffer to a FILE
fp | Pointer to the FILE record |
pBuffer | Pointer to the buffer to write to the FILE |
uBufferSize | Number of bytes in the buffer to write |
uCharsSoFar | Number of bytes written so far (Needed for error updating) |
uintptr_t Burger::SafePrint::ProcessResults_t::m_uErrorCharPos |
Position of character that triggered error.
uintptr_t Burger::SafePrint::ProcessResults_t::m_uErrorFormatSequencePos |
Position of sequence that contains error.
uintptr_t Burger::SafePrint::ProcessResults_t::m_uFormattedOutputLength |
Size of formatted output (no trailing null) in bytes.
uintptr_t Burger::SafePrint::ProcessResults_t::m_uNumOutputCommands |
Number of output commands created.
eError Burger::SafePrint::ProcessResults_t::m_uPhaseResults |
Results of the parsing or output phase.