33#ifndef _uhal_log_inserters_integer_hpp_ 
   34#define _uhal_log_inserters_integer_hpp_ 
   68  template< 
integer_base BASE = DefaultIntegerBase , 
integer_format FORMAT = DefaultIntegerFormat , u
int32_t WIDTH = 0 > 
struct IntFmt {};
 
   71  template< 
typename T , 
typename FORMAT >
 
   81  template< 
typename T >
 
   82  void sign_helper ( std::ostream& aStr, 
const T& aInt );
 
   86  void sign_helper ( std::ostream& aStr, 
const int8_t& aInt );
 
   90  void sign_helper ( std::ostream& aStr, 
const int16_t& aInt );
 
   94  void sign_helper ( std::ostream& aStr, 
const int32_t& aInt );
 
   98  void sign_helper ( std::ostream& aStr, 
const int64_t& aInt );
 
  102  template< 
typename T , 
typename FORMAT >
 
  116      void print ( std::ostream& aStr ) 
const;
 
  120  template< 
typename T , u
int32_t WIDTH >
 
  126      void print ( std::ostream& aStr ) 
const;
 
  129  template< 
typename T , u
int32_t WIDTH >
 
  135      void print ( std::ostream& aStr ) 
const;
 
  139  template< 
typename T , u
int32_t WIDTH >
 
  145      void print ( std::ostream& aStr ) 
const;
 
  148  template< 
typename T , u
int32_t WIDTH >
 
  154      void print ( std::ostream& aStr ) 
const;
 
  157  template< 
typename T , u
int32_t WIDTH >
 
  163      void print ( std::ostream& aStr ) 
const;
 
  166  template< 
typename T , u
int32_t WIDTH >
 
  172      void print ( std::ostream& aStr ) 
const;
 
  177  template< 
typename FORMAT >
 
  180  template< 
typename FORMAT >
 
  183  template< 
typename FORMAT >
 
  186  template< 
typename FORMAT >
 
  189  template< 
typename FORMAT >
 
  192  template< 
typename FORMAT >
 
  195  template< 
typename FORMAT >
 
  198  template< 
typename FORMAT >
 
  201#if __SIZEOF_LONG__ == 4 
  202  template< 
typename FORMAT >
 
  207  template< 
typename FORMAT > 
 
Forward declare an ultra-lightweight wrapper which does formatting of numbers only on demand.
 
void print(std::ostream &aStr) const
The function which formats the integer and appends it into the given stream.
 
_Integer(const T &aT)
Constructor.
 
_Integer< T, IntFmt<> > Integer(const T &aT)
Forward declare a function which creates an instance of the ultra-lightweight wrapper from an integer...
 
static const integer_base DefaultIntegerBase(dec)
Constant which is the default formatting option.
 
integer_format
Enumerated type specifying the formatting option.
 
@ variable
Variable width.
 
static const integer_format DefaultIntegerFormat(variable)
Constant which is the default formatting option.
 
void sign_helper(std::ostream &aStr, const T &aInt)
Helper function for adding the '+'/'-' sign.
 
integer_base
Enumerated type specifying the formatting option.
 
std::ostream & operator<<(std::ostream &aStr, const uhal::HttpResponseType &aHttpResponse)
 
Empty struct which acts as a dummy variable for passing the formatting information around.