34 #ifndef _log_inserters_integer_hpp_ 35 #define _log_inserters_integer_hpp_ 77 template<
integer_base BASE = DefaultIntegerBase ,
integer_format FORMAT = DefaultIntegerFormat , u
int32_t WIDTH = 0 >
struct IntFmt {};
82 template<
typename T ,
typename FORMAT >
98 template<
typename T >
99 void sign_helper ( std::ostream& aStr,
const T& aInt );
105 void sign_helper ( std::ostream& aStr,
const int8_t& aInt );
110 void sign_helper ( std::ostream& aStr,
const int16_t& aInt );
115 void sign_helper ( std::ostream& aStr,
const int32_t& aInt );
120 void sign_helper ( std::ostream& aStr,
const int64_t& aInt );
126 template<
typename T ,
typename FORMAT >
140 void print ( std::ostream& aStr )
const;
144 template<
typename T , u
int32_t WIDTH >
150 void print ( std::ostream& aStr )
const;
153 template<
typename T , u
int32_t WIDTH >
159 void print ( std::ostream& aStr )
const;
163 template<
typename T , u
int32_t WIDTH >
169 void print ( std::ostream& aStr )
const;
172 template<
typename T , u
int32_t WIDTH >
178 void print ( std::ostream& aStr )
const;
181 template<
typename T , u
int32_t WIDTH >
187 void print ( std::ostream& aStr )
const;
190 template<
typename T , u
int32_t WIDTH >
196 void print ( std::ostream& aStr )
const;
201 template<
typename FORMAT >
202 std::ostream& operator<< ( std::ostream& aStr , const uhal::_Integer< uint8_t , FORMAT >& aInt );
204 template<
typename FORMAT >
205 std::ostream& operator<< ( std::ostream& aStr , const uhal::_Integer< int8_t , FORMAT >& aInt );
207 template<
typename FORMAT >
208 std::ostream& operator<< ( std::ostream& aStr , const uhal::_Integer< uint16_t , FORMAT >& aInt );
210 template<
typename FORMAT >
211 std::ostream& operator<< ( std::ostream& aStr , const uhal::_Integer< int16_t , FORMAT >& aInt );
213 template<
typename FORMAT >
214 std::ostream& operator<< ( std::ostream& aStr , const uhal::_Integer< uint32_t , FORMAT >& aInt );
216 template<
typename FORMAT >
217 std::ostream& operator<< ( std::ostream& aStr , const uhal::_Integer< int32_t , FORMAT >& aInt );
219 template<
typename FORMAT >
220 std::ostream& operator<< ( std::ostream& aStr , const uhal::_Integer< uint64_t , FORMAT >& aInt );
222 template<
typename FORMAT >
223 std::ostream& operator<< ( std::ostream& aStr , const uhal::_Integer< int64_t , FORMAT >& aInt );
226 template<
typename FORMAT >
227 std::ostream& operator<< ( std::ostream& aStr , const uhal::_Integer< size_t , FORMAT >& aInt );
Forward declare an ultra-lightweight wrapper which does formatting of numbers only on demand...
static const integer_format DefaultIntegerFormat(variable)
Constant which is the default formatting option.
integer_base
Enumerated type specifying the formatting option.
Empty struct which acts as a dummy variable for passing the formatting information around...
integer_format
Enumerated type specifying the formatting option.
void print(std::ostream &aStr, const tm *aTm, const uint32_t &aUsec)
Format a time element for for sending to the log.
void sign_helper(std::ostream &aStr, const T &aInt)
Helper function for adding the '+'/'-' sign.
static const integer_base DefaultIntegerBase(dec)
Constant which is the default formatting option.
_Integer< T, IntFmt<> > Integer(const T &aT)
Forward declare a function which creates an instance of the ultra-lightweight wrapper from an integer...