Implements a temporary object which is appended to instances of type AString.
Appends an integral value in hexadecimal format.
TChar | The 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) | |
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.
uint64_t alib::strings::THex< TChar >::theValue |
The value to write.
Definition at line 319 of file format.inl.
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.
|
inline |
Constructor, taking the value and formatting parameters.
TIntegral | Value type which has to be statically castable to std::uint64_t . |
value | The value to write. |
overrideWidth | Defaults to 0 which denotes to choose the value of field NumberFormat::HexFieldWidth. |
numberFormat | The number format to use. Defaults to nullptr which chooses the static singleton found in NumberFormat::Computational. |
Definition at line 338 of file format.inl.
|
inline |
Constructor, taking the value and a just an object of type NumberFormat.
value | The value to write. |
numberFormat | The number format to use. Defaults to nullptr which chooses the static singleton found in NumberFormat::Computational. |
Definition at line 350 of file format.inl.