CatapultServer  v0.5.0.1 (Elephant)
catapult::utils::IntegralHexFormatterGuard< N > Class Template Reference
Inheritance diagram for catapult::utils::IntegralHexFormatterGuard< N >:
Collaboration diagram for catapult::utils::IntegralHexFormatterGuard< N >:

Public Member Functions

 IntegralHexFormatterGuard (std::ostream &out)
 Creates a formatter guard around out. More...
 
template<typename T >
void output (T value)
 Outputs value to the underlying stream. More...
 
- Public Member Functions inherited from catapult::utils::StreamFormatGuard
 StreamFormatGuard (std::ostream &out, std::ios_base::fmtflags flags, char fill)
 Creates a guard around out that sets format flags and character fill. More...
 
 ~StreamFormatGuard ()
 Destroys the guard and restores original stream formatting settings. More...
 
- Public Member Functions inherited from catapult::utils::NonCopyable
constexpr NonCopyable ()=default
 Default constructor. More...
 
 ~NonCopyable ()=default
 Default destructor. More...
 
 NonCopyable (const NonCopyable &)=delete
 Disabled copy constructor. More...
 
NonCopyableoperator= (const NonCopyable &)=delete
 Disabled assignment operator. More...
 

Static Private Member Functions

template<typename T >
static void OutputValue (std::ostream &out, T value, int size)
 
template<typename T >
static void Output (std::ostream &out, const T &value)
 

Private Attributes

std::ostream & m_out
 

Detailed Description

template<size_t N>
class catapult::utils::IntegralHexFormatterGuard< N >

RAII class that configures a stream to print out integral hex numbers.

Note
stream width is not sticky so it doesn't need to be saved / restored even though it is modified.

Constructor & Destructor Documentation

◆ IntegralHexFormatterGuard()

template<size_t N>
catapult::utils::IntegralHexFormatterGuard< N >::IntegralHexFormatterGuard ( std::ostream &  out)
inlineexplicit

Creates a formatter guard around out.

Member Function Documentation

◆ Output()

template<size_t N>
template<typename T >
static void catapult::utils::IntegralHexFormatterGuard< N >::Output ( std::ostream &  out,
const T &  value 
)
inlinestaticprivate
Here is the call graph for this function:
Here is the caller graph for this function:

◆ output()

template<size_t N>
template<typename T >
void catapult::utils::IntegralHexFormatterGuard< N >::output ( value)
inline

Outputs value to the underlying stream.

Here is the call graph for this function:

◆ OutputValue()

template<size_t N>
template<typename T >
static void catapult::utils::IntegralHexFormatterGuard< N >::OutputValue ( std::ostream &  out,
value,
int  size 
)
inlinestaticprivate
Here is the caller graph for this function:

Member Data Documentation

◆ m_out

template<size_t N>
std::ostream& catapult::utils::IntegralHexFormatterGuard< N >::m_out
private

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