ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
TFormat< TChar >::Hex Struct Reference

Description:

template<typename TChar>
struct alib::strings::TFormat< TChar >::Hex

Implements a temporary object which is appended to instances of type AString .

Appends an integral value in hexadecimal format.

See also
Class TNumberFormat for more information on formatting options for hexadecimal number output.

Definition at line 330 of file format.hpp.

#include <format.hpp>

Public Field Index:

TNumberFormat< TChar > * nf
 NumberFormat::Computational .
 
uint64_t theValue
 The value to write.
 
int theWidth
 

Public Method Index:

template<typename TIntegral >
 Hex (TIntegral value, int overrideWidth=0, TNumberFormat< TChar > *numberFormat=nullptr)
 
template<typename TIntegral >
 Hex (TIntegral value, TNumberFormat< TChar > *numberFormat)
 

Field Details:

◆ nf

template<typename TChar >
TNumberFormat<TChar>* nf

NumberFormat::Computational .

The number format to use. Defaults to nullptr which chooses

Definition at line 338 of file format.hpp.

◆ theValue

template<typename TChar >
uint64_t theValue

The value to write.

Definition at line 333 of file format.hpp.

◆ theWidth

template<typename TChar >
int theWidth

The minimum width of the number to write. Defaults to 0 which denotes to choose the value of field NumberFormat::HexFieldWidth .

Definition at line 334 of file format.hpp.

Constructor(s) / Destructor Details::

◆ Hex() [1/2]

template<typename TChar >
template<typename TIntegral >
Hex ( TIntegral value,
int overrideWidth = 0,
TNumberFormat< TChar > * numberFormat = nullptr )
inline

Constructor, taking the value and formatting parameters.

Template Parameters
TIntegralValue type which has to be statically castable to std::uint64_t.
Parameters
valueThe value to write.
overrideWidthDefaults to 0 which denotes to choose the value of field NumberFormat::HexFieldWidth .
numberFormatThe number format to use. Defaults to nullptr which chooses the static singleton found in NumberFormat::Computational .

Definition at line 354 of file format.hpp.

◆ Hex() [2/2]

template<typename TChar >
template<typename TIntegral >
Hex ( TIntegral value,
TNumberFormat< TChar > * numberFormat )
inline

Constructor, taking the value and a just an object of type NumberFormat.

Parameters
valueThe value to write.
numberFormatThe number format to use. Defaults to nullptr which chooses the static singleton found in NumberFormat::Computational .

Definition at line 370 of file format.hpp.


The documentation for this struct was generated from the following file: