Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Burger::SafePrint::ParamInfo_t Struct Reference

Container struct for SafePrint arguments. More...

Collaboration diagram for Burger::SafePrint::ParamInfo_t:

Classes

struct  FloatDigitInfo_t
 

Public Member Functions

eConversionCommand GetCommand (void) const noexcept
 Get the eConversionCommand.
 
void SetCommand (eConversionCommand uCommand) noexcept
 
eConversionSpecifier GetConversion (void) const noexcept
 Get the eConversionSpecifier.
 
void SetConversion (eConversionSpecifier uOutputConversion) noexcept
 
uint32_t GetConversionAsFlag (void) const noexcept
 Get the eConversionSpecifier as a shifted flag.
 
uint_t GetArgIndex (void) const noexcept
 Get the argument index.
 
void SetArgIndex (uint_t uArgIndex) noexcept
 Set the argument index.
 
uint_t GetWarnings (void) const noexcept
 Get the accumulated warnings.
 
void SetWarning (eWarningFlags uWarning) noexcept
 Accumulate a warning.
 
uint32_t GetFlags (void) const noexcept
 Get the accumulated eConversionFlags bits.
 
void SetFlags (uint32_t uFormatOptionFlags) noexcept
 
void SetFlag (eConversionFlags uFormatOptionFlags) noexcept
 
void ClearFlag (eConversionFlags uFormatOptionFlags) noexcept
 
uint_t IsFlagSet (eConversionFlags uFormatOptionFlags) const noexcept
 
void ClearFlags (void) noexcept
 Clear the eConversionFlags bits.
 
uint_t GetWidth (void) const noexcept
 Get the width of the output for the argument.
 
void SetWidth (uint_t uCharacterWidth) noexcept
 Set the width of the output for the argument.
 
uint_t GetPrecision (void) const noexcept
 Get the desired precision of the argument.
 
void SetPrecision (uint_t uPrecision) noexcept
 Set the width of the output for the argument.
 
uintptr_t GetFormattedLength (void) const noexcept
 Get the parsed length of the '%' command.
 
void SetFormattedLength (uintptr_t uFormattedLength) noexcept
 Get the parsed length of the '%' command.
 
uintptr_t GetOutputLength (void) const noexcept
 Get the length of the processed argument.
 
void SetOutputLength (uintptr_t uOutputLength) noexcept
 Set the length of the processed argument.
 
void SetFloatInfo (uint_t uIntSpecialDigits, uint_t uFracDigits, uint_t bSign, uint_t uDecimalPoint, uint_t uPadDigits, uint_t uExponentDigits) noexcept
 Set the parsed floating point information.
 
void GetFloatInfo (uint_t *pIntSpecialDigits, uint_t *pFracDigits, uint_t *pSign, uint_t *pDecimalPoint, uint_t *pPadDigits, uint_t *pExponentDigits) const noexcept
 Get the parsed floating point information.
 
void SetFloatAnalysisInfo (FPPrintInfo::eResult uFPInfoResult, uint_t uPadIntZeros, uint_t uPadFracZeros, uint_t uFirstNonZeroIntPos) noexcept
 Set the analyzed floating point information.
 
void GetFloatAnalysisInfo (FPPrintInfo::eResult *pFPInfoResult, uint_t *pPadIntZeros, uint_t *pPadFracZeros, uint_t *pFirstNonZeroIntPos) const noexcept
 Get the analyzed floating point information.
 
void SetFloatSpecialResult (FPPrintInfo::eResult uFPInfoResult, uint_t uIntSpecialDigits, uint_t uPadIntZeros, uint_t uIsNegative) noexcept
 Set the special floating point information for NAN or INF.
 
uint_t GetFloatSpecialChars (void) const noexcept
 Get the number of special character for a special floating point number.
 
uint_t GetFloatSpecialLeadingZeros (void) const noexcept
 Get the number leading zeros for a special floating point number.
 
uint_t GetFloatSpecialIsNegative (void) const noexcept
 Is the special floating pointer number negative?
 
uintptr_t PadFieldWidth (char *pOutBuffer) const noexcept
 Output padding for field width.
 
void GetFormattedOutputLength (const ArgumentType *pArg) noexcept
 Calculate the number of character that will be printed for this argument.
 
void CheckConversionFlags (void) noexcept
 Sanity check the conversion flags.
 
void CheckConversionForWarnings (const ArgumentType *pArg) noexcept
 Sanity check the conversion modifier flags.
 
eError StoreOffNumericValue (eParseStage uStage, uint32_t uCurrentNumValue) noexcept
 Store the precision or width value.
 
uintptr_t FormatInteger (char *pOutBuffer, const ArgumentType *pArg) const noexcept
 Outputs an integer value.
 
uintptr_t FormatHexOrOctal (char *pOutBuffer, const ArgumentType *pArg) const noexcept
 Outputs an integral value as octal or hex digits.
 
uintptr_t FormatPointer (char *pOutBuffer, const ArgumentType *pArg) const noexcept
 Outputs an pointer as a hex address value.
 
uintptr_t FormatChar (char *pOutBuffer, const ArgumentType *pArg) const noexcept
 Outputs a character value.
 
uintptr_t FormatTextString (char *pOutBuffer, const ArgumentType *pArg) const noexcept
 Outputs a text string.
 
uintptr_t FormatBool (char *pOutBuffer, const ArgumentType *pArg) const noexcept
 Outputs a boolean values value as "true"/"false".
 
uintptr_t FormatBinary (char *pOutBuffer, const ArgumentType *pArg) const noexcept
 Output a data value as a binary bit pattern, MSB to LSB.
 
uintptr_t FormatSpecialReal (char *pOutBuffer, FPPrintInfo::eResult uSpecialResult) const noexcept
 Print NaN's and Infinity.
 
uintptr_t FormatReal (char *pOutBuffer, const ArgumentType *pArg) const noexcept
 Outputs a floating point value.
 

Public Attributes

union { 
 
   const char *   m_pText 
 Pointer to text if "C" string. More...
 
   FloatDigitInfo_t   m_FloatInfo 
 Info on the formatted float. More...
 
};  
 

Private Attributes

uint8_t m_uCommand
 eConversionCommand micro command (copy memory, format argument)
 
uint8_t m_uOutputConversion
 eConversionSpecifier output type of the argument
 
uint8_t m_uArgIndex
 Source Argument Index.
 
uint8_t m_uWarnings
 eWarningFlags Accumulated warnings found (Bits are OR'd together)
 
uint32_t m_uFormatOptionFlags
 eConversionFlags Output Formatting Flags
 
uint16_t m_uCharacterWidth
 Number of characters to print.
 
uint16_t m_uPrecision
 Number of characters of numeric precision.
 
uint16_t m_uFormattedLength
 Length of the section of formatted output in bytes.
 
uint16_t m_uOutputLength
 Total Length (actual or estimated) of output (formatted + padding) in bytes.
 

Detailed Description

Container struct for SafePrint arguments.


Describes a single conversion to be done It can represent a block of literal text to be copied or it can describe and argument to be converted

An array of ParamInfo_t objects is built during the parsing phase from the format string (with optional arguments) and contains the decoded and validated copy and formatted conversion commands that use the actual argument values to determine things like how many characters are outputted

Note
This is a structure, as such, it's the application's responsibility to zero out this structure on instantiation manually. Generally, this is created as an array, so it's encouraged to call MemoryClear(void *,uintptr_t) on the entire array on creation.

Member Function Documentation

◆ CheckConversionFlags()

void BURGER_API Burger::SafePrint::ParamInfo_t::CheckConversionFlags ( void )
noexcept

Sanity check the conversion flags.


Checks the flags specified in a given conversion for validity. Compiler specific variations can be allowed here

Warnings are set if issues were detected and corrected.

◆ CheckConversionForWarnings()

void BURGER_API Burger::SafePrint::ParamInfo_t::CheckConversionForWarnings ( const ArgumentType * pArg)
noexcept

Sanity check the conversion modifier flags.


Checks the flags specified in a given conversion modifier for validity. Compiler specific variations can be allowed here

Warnings are set if issues were detected and corrected.

◆ ClearFlag()

void Burger::SafePrint::ParamInfo_t::ClearFlag ( eConversionFlags uFormatOptionFlags)
inlinenoexcept

Clear the specific flag stored in the structure.

\sa ClearFlags(void), IsFlagSet(eConversionFlags) const, GetFlags(void)

const, SetFlags(uint32_t), or SetFlag(eConversionFlags)

◆ ClearFlags()

void Burger::SafePrint::ParamInfo_t::ClearFlags ( void )
inlinenoexcept

◆ FormatBinary()

uintptr_t BURGER_API Burger::SafePrint::ParamInfo_t::FormatBinary ( char * pOutBuffer,
const ArgumentType * pArg ) const
noexcept

Output a data value as a binary bit pattern, MSB to LSB.


Relevant flags and inputs:

  • Width value - if width > output length, fill with spaces
  • Left Justify flag - obvious flag is obvious
  • Comma flag - inserts spaces between each nibbles worth of digits
  • Alternative form - display bits LSB to MSB
Parameters
pOutBufferPointer to the buffer to store the printed string
pArgPointer to the argument value
Returns
Number of characters printed

◆ FormatBool()

uintptr_t BURGER_API Burger::SafePrint::ParamInfo_t::FormatBool ( char * pOutBuffer,
const ArgumentType * pArg ) const
noexcept

Outputs a boolean values value as "true"/"false".


Relevant flags and inputs:

  • Width value - if width > output length, fill with spaces
  • Left Justify flag - obvious flag is obvious
  • DisplayUpperCase - modifies textual output
Parameters
pOutBufferPointer to the buffer to store the printed string
pArgPointer to the argument value
Returns
Number of characters printed

◆ FormatChar()

uintptr_t BURGER_API Burger::SafePrint::ParamInfo_t::FormatChar ( char * pOutBuffer,
const ArgumentType * pArg ) const
noexcept

Outputs a character value.


Relevant flags and inputs:

  • Left Justify flag - left justifies the output in the field
  • Width value - if width > output length, fill with spaces or zeros
  • Left Justify flag - obvious flag is obvious
Parameters
pOutBufferPointer to the buffer to store the printed string
pArgPointer to the argument value
Returns
Number of characters printed

◆ FormatHexOrOctal()

uintptr_t BURGER_API Burger::SafePrint::ParamInfo_t::FormatHexOrOctal ( char * pOutBuffer,
const ArgumentType * pArg ) const
noexcept

Outputs an integral value as octal or hex digits.


Outputs an integral value as octal or hex digits also handles pointer conversion

Relevant flags and inputs:

  • Width value - if width > output length, fill with spaces
  • Left Justify flag - Left justifies the output
  • Left Pad Zeros - fills zeros in front of the number
  • Comma flag - insert commas? in front of every group of 3 digits
  • AddBasePrefix - inserts base prefix in front of output
Parameters
pOutBufferPointer to the buffer to store the printed string
pArgPointer to the argument value
Returns
Number of characters printed

◆ FormatInteger()

uintptr_t BURGER_API Burger::SafePrint::ParamInfo_t::FormatInteger ( char * pOutBuffer,
const ArgumentType * pArg ) const
noexcept

Outputs an integer value.


Relevant flags and inputs:

  • Width value - if width > output length, fill with spaces
  • Left Justify flag - Left justifies the output
  • Display sign - forces a sign to be displayed
  • Blank sign - displays a blank in front of a positive number
  • Left Pad Zeros - fills zeros in front of the number
  • Comma flag - insert commas in front of every group of 3 digits

Caveats:

  • Left Justify overrides padding with zeros
  • Comma Flag overrides padding with zeros
  • Display Sign overrides Blank Sign

Composes numeric text from right to left (Except for padding)

Parameters
pOutBufferPointer to the buffer to store the printed string
pArgPointer to the argument value
Returns
Number of characters printed

◆ FormatPointer()

uintptr_t BURGER_API Burger::SafePrint::ParamInfo_t::FormatPointer ( char * pOutBuffer,
const ArgumentType * pArg ) const
noexcept

Outputs an pointer as a hex address value.


Relevant flags and inputs:

  • Width value - if width > output length, fill with spaces
  • Left Justify flag - Left justifies the output
  • DisplayUpperCase - modifies textual output
Parameters
pOutBufferPointer to the buffer to store the printed string
pArgPointer to the argument value
Returns
Number of characters printed

◆ FormatReal()

uintptr_t BURGER_API Burger::SafePrint::ParamInfo_t::FormatReal ( char * pOutBuffer,
const ArgumentType * pArg ) const
noexcept

Outputs a floating point value.


Relevant flags and inputs:

  • Width value - if width > output length, fill with spaces
  • Precision Value - minimum number of characters/digits to emit
  • Left Justify flag - Left justifies the output
  • Display sign - forces a sign to be displayed
  • Blank sign - displays a blank in front of a positive number
  • Left Pad Zeros - fills zeros in front of the number
  • Comma flag - insert commas in front of every group of 3 digits

Caveats:

  • Left Justify overrides padding with zeros
  • Comma Flag overrides padding with zeros
Parameters
pOutBufferPointer to the buffer to store the printed string
pArgPointer to the argument value
Returns
Number of characters printed

◆ FormatSpecialReal()

uintptr_t BURGER_API Burger::SafePrint::ParamInfo_t::FormatSpecialReal ( char * pOutBuffer,
FPPrintInfo::eResult uSpecialResult ) const
noexcept

Print NaN's and Infinity.


Helper function to write out the text for special floating point values: NaN's and Infinity

Parameters
pOutBufferPointer to the buffer to store the printed string
uSpecialResultSpecial floating point number to print
Returns
Number of characters printed

◆ FormatTextString()

uintptr_t BURGER_API Burger::SafePrint::ParamInfo_t::FormatTextString ( char * pOutBuffer,
const ArgumentType * pArg ) const
noexcept

Outputs a text string.


Relevant flags and inputs:

  • Width value - if width > output length, fill with spaces
  • Left Justify flag - Left justifies the output
Parameters
pOutBufferPointer to the buffer to store the printed string
pArgPointer to the argument value
Returns
Number of characters printed

◆ GetArgIndex()

uint_t Burger::SafePrint::ParamInfo_t::GetArgIndex ( void ) const
inlinenoexcept

Get the argument index.


This structure stores this as a byte for compactness, this accessor enforces type safety

\return The index into the argument array this structure refers to
\sa SetArgIndex(uint_t)

◆ GetCommand()

eConversionCommand Burger::SafePrint::ParamInfo_t::GetCommand ( void ) const
inlinenoexcept

Get the eConversionCommand.


const

This structure stores this as a byte for compactness, this accessor enforces

type safety

\return The stored \ref eConversionCommand
\sa SetCommand(eConversionCommand)

◆ GetConversion()

eConversionSpecifier Burger::SafePrint::ParamInfo_t::GetConversion ( void ) const
inlinenoexcept

Get the eConversionSpecifier.


const

This structure stores this as a byte for compactness, this accessor enforces

type safety

\return The stored \ref eConversionSpecifier
\sa SetConversion(eConversionSpecifier) or GetConversionAsFlag(void) const

◆ GetConversionAsFlag()

uint32_t Burger::SafePrint::ParamInfo_t::GetConversionAsFlag ( void ) const
inlinenoexcept

Get the eConversionSpecifier as a shifted flag.


Get the value of 1 << eConversionSpecifier

Returns
The value of 1<< eConversionSpecifier
See also
SetConversion(eConversionSpecifier) or GetConversion(void) const

◆ GetFlags()

uint32_t Burger::SafePrint::ParamInfo_t::GetFlags ( void ) const
inlinenoexcept

Get the accumulated eConversionFlags bits.


The individual bits are defined in eConversionFlags .

Returns
All of the active conversion flags
See also
SetFlags(uint32_t), SetFlag(eConversionFlags), or IsFlagSet(eConversionFlags) const

◆ GetFloatAnalysisInfo()

void BURGER_API Burger::SafePrint::ParamInfo_t::GetFloatAnalysisInfo ( FPPrintInfo::eResult * pFPInfoResult,
uint_t * pPadIntZeros,
uint_t * pPadFracZeros,
uint_t * pFirstNonZeroIntPos ) const
noexcept

Get the analyzed floating point information.


This structure stores these variables in a compact fashion, this accessor enforces type safety

Parameters
pFPInfoResultPointer to the type of floating point number detected
pPadIntZerosPointer to the number of characters to pad on the integer
pPadFracZerosPointer to the number of character to pad on the fraction
pFirstNonZeroIntPosPointer to the position of the first non-zero digit in the integer
See also
SetFloatAnalysisInfo(FPPrintInfo::eResult,uint_t,uint_t,uint_t)

◆ GetFloatInfo()

void BURGER_API Burger::SafePrint::ParamInfo_t::GetFloatInfo ( uint_t * pIntSpecialDigits,
uint_t * pFracDigits,
uint_t * pSign,
uint_t * pDecimalPoint,
uint_t * pPadDigits,
uint_t * pExponentDigits ) const
noexcept

Get the parsed floating point information.


This structure stores these variables in a compact fashion, this accessor enforces type safety

Parameters
pIntSpecialDigitsPointer to store the number of digits to the left of the decimal point
pFracDigitsPointer to store the Number of digits to the right of the decimal point
pSignPointer to store TRUE or FALSE if a sign flag should be displayed
pDecimalPointPointer to store TRUE or FALSE if a decimal point should be displayed
pPadDigitsPointer to store the number of digits to pad
pExponentDigitsPointer to store the number of exponent digits
See also
SetFloatInfo(uint_t,uint_t,uint_t,uint_t,uint_t,uint_t)

◆ GetFloatSpecialChars()

uint_t Burger::SafePrint::ParamInfo_t::GetFloatSpecialChars ( void ) const
inlinenoexcept

Get the number of special character for a special floating point number.


Returns
The number of bytes the special string will occupy
See also
SetFloatSpecialResult(FPPrintInfo::eResult,uint_t,uint_t,uint_t)

◆ GetFloatSpecialIsNegative()

uint_t Burger::SafePrint::ParamInfo_t::GetFloatSpecialIsNegative ( void ) const
inlinenoexcept

Is the special floating pointer number negative?


const

Returns
TRUE if negative, FALSE if not.
See also
SetFloatSpecialResult(FPPrintInfo::eResult,uint_t,uint_t,uint_t)

◆ GetFloatSpecialLeadingZeros()

uint_t Burger::SafePrint::ParamInfo_t::GetFloatSpecialLeadingZeros ( void ) const
inlinenoexcept

Get the number leading zeros for a special floating point number.


const

Returns
The number of leading zeros
See also
SetFloatSpecialResult(FPPrintInfo::eResult,uint_t,uint_t,uint_t)

◆ GetFormattedLength()

uintptr_t Burger::SafePrint::ParamInfo_t::GetFormattedLength ( void ) const
inlinenoexcept

Get the parsed length of the '%' command.


This structure stores this as a uint16_t for compactness, this accessor enforces type safety

Returns
The number of bytes in the parsed "C" string this format code occupies
See also
SetFormattedLength(uintptr_t)

◆ GetFormattedOutputLength()

void BURGER_API Burger::SafePrint::ParamInfo_t::GetFormattedOutputLength ( const ArgumentType * pArg)
noexcept

Calculate the number of character that will be printed for this argument.


Gets the actual # of characters that will be output given the argument passed in and the format options

Parameters
pArgPointer to a ArgumentType to check

◆ GetOutputLength()

uintptr_t Burger::SafePrint::ParamInfo_t::GetOutputLength ( void ) const
inlinenoexcept

Get the length of the processed argument.


This structure stores this as a uint16_t for compactness, this accessor enforces type safety

Returns
The number of bytes the printed argument will occupy
See also
SetOutputLength(uintptr_t)

◆ GetPrecision()

uint_t Burger::SafePrint::ParamInfo_t::GetPrecision ( void ) const
inlinenoexcept

Get the desired precision of the argument.


This structure stores this as a uint16_t for compactness, this accessor enforces type safety

\return The precision requested for the argument
\sa SetPrecision(uint_t)

◆ GetWarnings()

uint_t Burger::SafePrint::ParamInfo_t::GetWarnings ( void ) const
inlinenoexcept

Get the accumulated warnings.


This structure stores this as a byte for compactness, this accessor enforces type safety

\return The accumulated warning bits
\sa SetWarning(eWarningFlags)

◆ GetWidth()

uint_t Burger::SafePrint::ParamInfo_t::GetWidth ( void ) const
inlinenoexcept

Get the width of the output for the argument.


This structure stores this as a uint16_t for compactness, this accessor enforces type safety

\return The width override parsed in the "C" string
\sa SetWidth(uint_t)

◆ IsFlagSet()

uint_t Burger::SafePrint::ParamInfo_t::IsFlagSet ( eConversionFlags uFormatOptionFlags) const
inlinenoexcept

Test if the specific flag is set and return \ref TRUE if so, otherwise

return FALSE.

\param uFormatOptionFlags The single type safe flag to test against
\return \ref TRUE if set, \ref FALSE if not.
\sa SetFlag(eConversionFlags), GetFlags(void) const, SetFlags(uint32_t), or

ClearFlag(eConversionFlags)

◆ PadFieldWidth()

uintptr_t BURGER_API Burger::SafePrint::ParamInfo_t::PadFieldWidth ( char * pOutBuffer) const
noexcept

Output padding for field width.


Handles the case when a field width is specified and and it's wider than the formatted argument output. Fills in the remainder of the field with the pad character and handles any justification

Parameters
pOutBufferPointer to the output buffer
Returns
Number of bytes that was added via padding

◆ SetArgIndex()

void Burger::SafePrint::ParamInfo_t::SetArgIndex ( uint_t uArgIndex)
inlinenoexcept

Set the argument index.


This structure stores this as a byte for compactness, this accessor enforces type safety

\param uArgIndex The new index into the argument array this structure refers

to

See also
GetArgIndex(void) const

◆ SetCommand()

void Burger::SafePrint::ParamInfo_t::SetCommand ( eConversionCommand uCommand)
inlinenoexcept

This structure stores this as a byte for compactness, this accessor enforces

type safety

\param uCommand The \ref eConversionCommand to store in the structure
\sa GetCommand(void) const

◆ SetConversion()

void Burger::SafePrint::ParamInfo_t::SetConversion ( eConversionSpecifier uOutputConversion)
inlinenoexcept

This structure stores this as a byte for compactness, this accessor enforces

type safety

\param uOutputConversion The \ref eConversionSpecifier to store in the

structure

See also
GetConversion(void) const or GetConversionAsFlag(void) const

◆ SetFlag()

void Burger::SafePrint::ParamInfo_t::SetFlag ( eConversionFlags uFormatOptionFlags)
inlinenoexcept

Or the specific flag into the flags.

\param uFormatOptionFlags The single type safe flag to accumulate into the

structure

See also
IsFlagSet(eConversionFlags) const, GetFlags(void) const, SetFlags(uint32_t), or ClearFlag(eConversionFlags)

◆ SetFlags()

void Burger::SafePrint::ParamInfo_t::SetFlags ( uint32_t uFormatOptionFlags)
inlinenoexcept

The individual bits are defined in \ref eConversionFlags.

\param uFormatOptionFlags All of the \ref eConversionFlags to store in the

structure

See also
GetFlags(void) const, SetFlag(eConversionFlags), or ClearFlag(eConversionFlags)

◆ SetFloatAnalysisInfo()

void BURGER_API Burger::SafePrint::ParamInfo_t::SetFloatAnalysisInfo ( FPPrintInfo::eResult uFPInfoResult,
uint_t uPadIntZeros,
uint_t uPadFracZeros,
uint_t uFirstNonZeroIntPos )
noexcept

Set the analyzed floating point information.


This structure stores these variables in a compact fashion, this accessor enforces type safety

Parameters
uFPInfoResultType of floating point number detected
uPadIntZerosNumber of characters to pad on the integer
uPadFracZerosNumber of character to pad on the fraction
uFirstNonZeroIntPosPosition of the first non-zero digit in the integer
See also
GetFloatAnalysisInfo(FPPrintInfo::eResult *,uint_t *,uint_t *,uint_t *) const

◆ SetFloatInfo()

void BURGER_API Burger::SafePrint::ParamInfo_t::SetFloatInfo ( uint_t uIntSpecialDigits,
uint_t uFracDigits,
uint_t bSign,
uint_t uDecimalPoint,
uint_t uPadDigits,
uint_t uExponentDigits )
noexcept

Set the parsed floating point information.


This structure stores these variables in a compact fashion, this accessor enforces type safety

\param uIntSpecialDigits Number of digits to the left of the decimal point
\param uFracDigits Number of digits to the right of the decimal point
\param bSign \ref TRUE if a sign flag should be displayed
\param uDecimalPoint \ref TRUE if a decimal point should be displayed
\param uPadDigits Number of digits to pad
\param uExponentDigits Number of exponent digits

\sa GetFloatInfo(uint_t *,uint_t *,uint_t *,uint_t *,uint_t *,uint_t *)

const

◆ SetFloatSpecialResult()

void BURGER_API Burger::SafePrint::ParamInfo_t::SetFloatSpecialResult ( FPPrintInfo::eResult uFPInfoResult,
uint_t uIntSpecialDigits,
uint_t uPadIntZeros,
uint_t uIsNegative )
noexcept

Set the special floating point information for NAN or INF.


This structure stores these variables in a compact fashion, this accessor enforces type safety

Parameters
uFPInfoResultType of floating point number detected
uIntSpecialDigitsNumber of characters in the string
uPadIntZerosNumber of characters to pad on the integer
uIsNegativeSet to non-zero if negative
See also
SetFloatAnalysisInfo(FPPrintInfo::eResult,uint_t,uint_t,uint_t)

◆ SetFormattedLength()

void Burger::SafePrint::ParamInfo_t::SetFormattedLength ( uintptr_t uFormattedLength)
inlinenoexcept

Get the parsed length of the '%' command.


This structure stores this as a uint16_t for compactness, this accessor enforces type safety

Parameters
uFormattedLengthThe new number of bytes in the parsed "C" string this format code occupies
See also
GetFormattedLength(void) const

◆ SetOutputLength()

void Burger::SafePrint::ParamInfo_t::SetOutputLength ( uintptr_t uOutputLength)
inlinenoexcept

Set the length of the processed argument.


This structure stores this as a uint16_t for compactness, this accessor enforces type safety

Parameters
uOutputLengthThe new number of bytes the printed argument will occupy
See also
GetOutputLength(void) const

◆ SetPrecision()

void Burger::SafePrint::ParamInfo_t::SetPrecision ( uint_t uPrecision)
inlinenoexcept

Set the width of the output for the argument.


This structure stores this as a uint16_t for compactness, this accessor enforces type safety

Parameters
uPrecisionThe new precision requested for the argument
See also
GetPrecision(void) const

◆ SetWarning()

void Burger::SafePrint::ParamInfo_t::SetWarning ( eWarningFlags uWarning)
inlinenoexcept

Accumulate a warning.


Take the warning flag and OR it into the existing warning state. This function does not clear any previous bits.

This structure stores this as a byte for compactness, this accessor enforces

type safety.

\param uWarning The warning bit to set in the \ref m_uWarnings member

variable

See also
GetWarnings(void) const

◆ SetWidth()

void Burger::SafePrint::ParamInfo_t::SetWidth ( uint_t uCharacterWidth)
inlinenoexcept

Set the width of the output for the argument.


This structure stores this as a uint16_t for compactness, this accessor enforces type safety

\param uCharacterWidth The new width of the output for the argument
\sa GetWidth(void) const

◆ StoreOffNumericValue()

Burger::eError BURGER_API Burger::SafePrint::ParamInfo_t::StoreOffNumericValue ( eParseStage uStage,
uint32_t uCurrentNumValue )
noexcept

Store the precision or width value.


When a precision or width value is parsed, store it in the appropriate variable in the structure

Parameters
uStageParsing stage to determine if parsing precision or width
uCurrentNumValueValue to store
Returns
Error code if the value is out of bounds.

Member Data Documentation

◆ [union]

◆ m_FloatInfo

FloatDigitInfo_t Burger::SafePrint::ParamInfo_t::m_FloatInfo

Info on the formatted float.

◆ m_pText

const char* Burger::SafePrint::ParamInfo_t::m_pText

Pointer to text if "C" string.

◆ m_uArgIndex

uint8_t Burger::SafePrint::ParamInfo_t::m_uArgIndex
private

Source Argument Index.

◆ m_uCharacterWidth

uint16_t Burger::SafePrint::ParamInfo_t::m_uCharacterWidth
private

Number of characters to print.

◆ m_uCommand

uint8_t Burger::SafePrint::ParamInfo_t::m_uCommand
private

eConversionCommand micro command (copy memory, format argument)

◆ m_uFormatOptionFlags

uint32_t Burger::SafePrint::ParamInfo_t::m_uFormatOptionFlags
private

eConversionFlags Output Formatting Flags

◆ m_uFormattedLength

uint16_t Burger::SafePrint::ParamInfo_t::m_uFormattedLength
private

Length of the section of formatted output in bytes.

◆ m_uOutputConversion

uint8_t Burger::SafePrint::ParamInfo_t::m_uOutputConversion
private

eConversionSpecifier output type of the argument

◆ m_uOutputLength

uint16_t Burger::SafePrint::ParamInfo_t::m_uOutputLength
private

Total Length (actual or estimated) of output (formatted + padding) in bytes.

◆ m_uPrecision

uint16_t Burger::SafePrint::ParamInfo_t::m_uPrecision
private

Number of characters of numeric precision.

◆ m_uWarnings

uint8_t Burger::SafePrint::ParamInfo_t::m_uWarnings
private

eWarningFlags Accumulated warnings found (Bits are OR'd together)