Go to the documentation of this file.
20 #ifndef LIBMESH_OSTREAM_PROXY_H
21 #define LIBMESH_OSTREAM_PROXY_H
41 template <
typename charT=
char,
typename traits=std::
char_traits<
charT>>
49 typedef std::basic_ostream<charT,traits>
streamT;
116 (*_target) << in;
return *
this;
123 (*_target) << in;
return *
this;
130 (*_target) << in;
return *
this;
137 (*_target) << in;
return *
this;
158 std::ios_base::fmtflags
flags ( )
const
164 std::ios_base::fmtflags
flags ( std::ios_base::fmtflags fmtfl )
165 {
return _target->flags(fmtfl); }
170 std::ios_base::fmtflags
setf ( std::ios_base::fmtflags fmtfl )
171 {
return _target->setf(fmtfl); }
176 std::ios_base::fmtflags
setf ( std::ios_base::fmtflags fmtfl,
177 std::ios_base::fmtflags mask )
178 {
return _target->setf(fmtfl, mask); }
183 void unsetf ( std::ios_base::fmtflags mask )
190 {
return _target->precision(); }
196 {
return _target->precision(prec); }
241 #endif // LIBMESH_OSTREAM_PROXY_H
std::ios_base::fmtflags setf(std::ios_base::fmtflags fmtfl)
Set the associated flags.
BasicOStreamProxy(streamT &target)
Default constructor.
void unsetf(std::ios_base::fmtflags mask)
Clear the associated flags.
streambufT * rdbuf() const
Get the associated stream buffer.
The libMesh namespace provides an interface to certain functionality in the library.
~BasicOStreamProxy()
Default destructor.
std::ios_base::fmtflags setf(std::ios_base::fmtflags fmtfl, std::ios_base::fmtflags mask)
Set the associated flags.
BasicOStreamProxy(BasicOStreamProxy &old)
Shallow copy constructor.
std::streamsize precision(std::streamsize prec)
Set the associated write precision.
BasicOStreamProxy & operator=(streamT &target)
Reset the internal target to a new target output stream.
BasicOStreamProxy & flush()
Flush the associated stream buffer.
std::ios_base::fmtflags flags() const
Get the associated format flags.
BasicOStreamProxy OStreamProxy
streamT * _target
The pointer to the "real" ostream we send everything to.
streamT * get()
Rather than implement every ostream/ios/ios_base function, we'll be lazy and make esoteric uses go th...
BasicOStreamProxy & operator<<(const T &in)
Redirect any output to the target.
std::ios_base::fmtflags flags(std::ios_base::fmtflags fmtfl)
Set/get the associated format flags.
std::streampos tellp()
Returns the position of the character in the current stream.
This class is intended to be reseatable like a pointer-to-ostream for flexibility,...
const streamT * get() const
Rather than implement every ostream/ios/ios_base function, we'll be lazy and make esoteric uses go th...
std::basic_ostream< charT, traits > streamT
This class is going to be used to proxy for ostream, but other character and traits types are possibl...
void reset(streamT &target)
Reset the proxy to point to a different target.
streambufT * rdbuf(streambufT *sb)
Set the associated stream buffer.
std::streamsize precision() const
Get the associated write precision.
std::basic_streambuf< charT, traits > streambufT
This class is going to be used to proxy for ostream, but other character and traits types are possibl...