dodo
0.0.1
A C++ library to create containerized Linux services
|
Go to the documentation of this file.
23 #ifndef common_puts_hpp
24 #define common_puts_hpp
123 Puts() {
ss_ << std::setprecision(3) << std::fixed; };
278 ss_ << std::scientific;
315 ss_ << std::setw( w.
w_ );
325 ss_ << std::setprecision( p.
p_ );
333 operator std::string()
const {
return ss_.str(); };
339 mutable std::stringstream
ss_;
const Puts & operator<<(float f) const
Append a float.
Put the stream in octal mode.
const Puts & operator<<(unsigned int i) const
Append an unsigned integer.
Set the precision for floating point fixed format.
Put the stream in hexadecimal mode.
const Puts & operator<<(void *p) const
Append a void*.
const Puts & operator<<(oct) const
Applies std::oct.
const Puts & operator<<(scientific) const
Applies std::scientific.
const Puts & operator<<(hex) const
Applies std::hex.
const Puts & operator<<(fixed) const
Applies std::fixed.
setw(int w)
Construct with width.
setprecision(int p)
Construct with precision.
Put the stream in floating point fixed-format mode.
Put the stream in floating point scientific-format mode.
const Puts & operator<<(setw w) const
Applies std::setw.
const Puts & operator<<(setprecision p) const
Applies std::setprecision.
const Puts & operator<<(char c) const
Append a char.
const Puts & operator<<(const std::string &s) const
Append a STL string.
const Puts & operator<<(Puts::endl) const
Appends std::endl.
Common and utility interfaces.
Puts()
Constructor inits to fixed format for double with precision 3.
const Puts & operator<<(const char *s) const
Append a C string.
Set the width of things to w characters.
const Puts & operator<<(unsigned long long l) const
Append an unsigned long long.
std::stringstream ss_
Use a stringstream internally.
const Puts & operator<<(unsigned long l) const
Append an unsigned long.
const Puts & operator<<(dec) const
Applies std::dec.
Helper class to write strings in stream format, eg.
Put the stream in decimal mode.
const Puts & operator<<(long l) const
Append a long.
const Puts & operator<<(int i) const
Append an integer.
const Puts & operator<<(std::thread::id id) const
Append a std::thread::id.
const Puts & operator<<(double d) const
Append a double.
const Puts & operator<<(long long l) const
Append a long long.