|
μHAL (v2.7.9)
Part of the IPbus software repository
|
Go to the documentation of this file.
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 >
_Integer(const T &aT)
Constructor.
std::ostream & operator<<(std::ostream &aStr, const uhal::HttpResponseType &aHttpResponse)
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.
static const integer_base DefaultIntegerBase(dec)
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.
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.
@ variable
Variable width.
integer_format
Enumerated type specifying the 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...