My Project  + 80db3
Classes | Namespaces | Functions | Variables
output.hpp File Reference

Output utility functions. More...

#include <ostream>
#include <string>
#include <boost/cstdint.hpp>
#include <boost/range/size.hpp>
#include "util/console.hpp"
Include dependency graph for output.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  quoted
 
struct  if_not_empty
 
struct  detail::if_not< T >
 
struct  detail::print_hex< T >
 
struct  detail::print_hex_string
 
struct  detail::print_bytes< T >
 

Namespaces

 detail
 

Functions

std::ostream & operator<< (std::ostream &os, const quoted &q)
 
std::ostream & operator<< (std::ostream &os, const if_not_empty &s)
 
template<class T >
std::ostream & detail::operator<< (std::ostream &os, const if_not< T > &s)
 
template<class T >
detail::if_not< T > if_not_equal (const std::string &name, T value, T excluded)
 
template<class T >
detail::if_not< T > if_not_zero (const std::string &name, T value)
 
template<class T >
std::ostream & detail::operator<< (std::ostream &os, const print_hex< T > &s)
 
std::ostream & detail::operator<< (std::ostream &os, const print_hex_string &s)
 
template<class T >
detail::print_hex< T > print_hex (T value)
 
detail::print_hex_string print_hex (const char *data, size_t size)
 
detail::print_hex_string print_hex (const std::string &data)
 
template<class T >
std::ostream & detail::operator<< (std::ostream &os, const print_bytes< T > &s)
 
template<class T >
detail::print_bytes< T > print_bytes (T value, int precision=3)
 

Variables

const char *const byte_size_units []
 

Detailed Description

Output utility functions.

Definition in file output.hpp.

Function Documentation

◆ operator<<() [1/2]

std::ostream& operator<< ( std::ostream &  os,
const quoted q 
)
inline

Definition at line 45 of file output.hpp.

◆ operator<<() [2/2]

std::ostream& operator<< ( std::ostream &  os,
const if_not_empty s 
)
inline

Definition at line 72 of file output.hpp.

◆ if_not_equal()

template<class T >
detail::if_not<T> if_not_equal ( const std::string &  name,
value,
excluded 
)

Definition at line 112 of file output.hpp.

◆ if_not_zero()

template<class T >
detail::if_not<T> if_not_zero ( const std::string &  name,
value 
)

Definition at line 117 of file output.hpp.

Here is the caller graph for this function:

◆ print_hex() [1/3]

template<class T >
detail::print_hex<T> print_hex ( value)

Definition at line 173 of file output.hpp.

Here is the caller graph for this function:

◆ print_hex() [2/3]

detail::print_hex_string print_hex ( const char *  data,
size_t  size 
)
inline

Definition at line 177 of file output.hpp.

◆ print_hex() [3/3]

detail::print_hex_string print_hex ( const std::string &  data)
inline

Definition at line 181 of file output.hpp.

Here is the call graph for this function:

◆ print_bytes()

template<class T >
detail::print_bytes<T> print_bytes ( value,
int  precision = 3 
)

Definition at line 240 of file output.hpp.

Here is the caller graph for this function:

Variable Documentation

◆ byte_size_units

const char* const byte_size_units[]
Initial value:
= {
"B",
"KiB",
"MiB",
"GiB",
"TiB",
"PiB",
"EiB",
"ZiB",
"YiB",
}

Definition at line 185 of file output.hpp.