ALib C++ Library
Library Version: 2510 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
alib::strings::THex< TChar > Struct Template Reference

Description:

template<typename TChar>
struct alib::strings::THex< TChar >

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.
Template Parameters
TCharThe character type of the AString that instances can be "applied" to.

Definition at line 317 of file format.inl.

Public Field Index:

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

Public Method Index:

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

Field Details:

◆ nf

template<typename TChar>
TNumberFormat<TChar>* alib::strings::THex< TChar >::nf

The number format to use. Defaults to nullptr which chooses TNumberFormat::Computational.

Definition at line 324 of file format.inl.

◆ theValue

template<typename TChar>
uint64_t alib::strings::THex< TChar >::theValue

The value to write.

Definition at line 319 of file format.inl.

◆ theWidth

template<typename TChar>
int alib::strings::THex< TChar >::theWidth

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

Definition at line 320 of file format.inl.

Constructor(s) / Destructor Details:

◆ THex() [1/2]

template<typename TChar>
template<typename TIntegral>
alib::strings::THex< TChar >::THex ( 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 338 of file format.inl.

◆ THex() [2/2]

template<typename TChar>
template<typename TIntegral>
alib::strings::THex< TChar >::THex ( 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 350 of file format.inl.


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