argagg
 All Classes Namespaces Files Functions Variables Macros Pages
Public Member Functions | Public Attributes | List of all members
argagg::fmt_ostream Struct Reference

A convenience output stream that will accumulate what is streamed to it and then, on destruction, format the accumulated string using the fmt program (via the argagg::fmt_string() function) to the provided std::ostream. More...

#include <argagg.hpp>

Inheritance diagram for argagg::fmt_ostream:
std::ostringstream std::basic_ostringstream< char > std::basic_ostream< char > std::basic_ios< char > std::ios_base

Public Member Functions

 fmt_ostream (std::ostream &output)
 Construct to output to the provided output stream when this object is destroyed. More...
 
 ~fmt_ostream ()
 Special destructor that will format the accumulated string using fmt (via the argagg::fmt_string() function) and stream it to the std::ostream stored. More...
 
- Public Member Functions inherited from std::ostringstream
seekp (T...args)
 
setstate (T...args)
 
getloc (T...args)
 
precision (T...args)
 
flags (T...args)
 
str (T...args)
 
widen (T...args)
 
fill (T...args)
 
setf (T...args)
 
good (T...args)
 
copyfmt (T...args)
 
tellp (T...args)
 
sync_with_stdio (T...args)
 
ostringstream (T...args)
 
xalloc (T...args)
 
exceptions (T...args)
 
iword (T...args)
 
operator<< (T...args)
 
narrow (T...args)
 
operator bool (T...args)
 
operator! (T...args)
 
write (T...args)
 
unsetf (T...args)
 
width (T...args)
 
rdstate (T...args)
 
tie (T...args)
 
move (T...args)
 
eof (T...args)
 
register_callback (T...args)
 
pword (T...args)
 
flush (T...args)
 
set_rdbuf (T...args)
 
fail (T...args)
 
operator= (T...args)
 
swap (T...args)
 
rdbuf (T...args)
 
imbue (T...args)
 
bad (T...args)
 
clear (T...args)
 
put (T...args)
 
init (T...args)
 
- Public Member Functions inherited from std::basic_ostringstream< char >
seekp (T...args)
 
setstate (T...args)
 
getloc (T...args)
 
precision (T...args)
 
flags (T...args)
 
str (T...args)
 
widen (T...args)
 
fill (T...args)
 
setf (T...args)
 
good (T...args)
 
copyfmt (T...args)
 
tellp (T...args)
 
sync_with_stdio (T...args)
 
xalloc (T...args)
 
exceptions (T...args)
 
iword (T...args)
 
operator<< (T...args)
 
narrow (T...args)
 
operator bool (T...args)
 
operator! (T...args)
 
write (T...args)
 
unsetf (T...args)
 
width (T...args)
 
rdstate (T...args)
 
tie (T...args)
 
move (T...args)
 
eof (T...args)
 
register_callback (T...args)
 
pword (T...args)
 
flush (T...args)
 
set_rdbuf (T...args)
 
fail (T...args)
 
operator= (T...args)
 
swap (T...args)
 
rdbuf (T...args)
 
imbue (T...args)
 
basic_ostringstream (T...args)
 
bad (T...args)
 
clear (T...args)
 
put (T...args)
 
init (T...args)
 
- Public Member Functions inherited from std::basic_ostream< char >
seekp (T...args)
 
setstate (T...args)
 
getloc (T...args)
 
precision (T...args)
 
flags (T...args)
 
widen (T...args)
 
fill (T...args)
 
setf (T...args)
 
operator bool (T...args)
 
copyfmt (T...args)
 
tellp (T...args)
 
sync_with_stdio (T...args)
 
xalloc (T...args)
 
exceptions (T...args)
 
iword (T...args)
 
rdbuf (T...args)
 
operator<< (T...args)
 
narrow (T...args)
 
good (T...args)
 
operator! (T...args)
 
write (T...args)
 
unsetf (T...args)
 
width (T...args)
 
rdstate (T...args)
 
tie (T...args)
 
move (T...args)
 
eof (T...args)
 
register_callback (T...args)
 
pword (T...args)
 
swap (T...args)
 
flush (T...args)
 
set_rdbuf (T...args)
 
fail (T...args)
 
basic_ostream (T...args)
 
~basic_ostream (T...args)
 
imbue (T...args)
 
bad (T...args)
 
clear (T...args)
 
put (T...args)
 
init (T...args)
 
- Public Member Functions inherited from std::basic_ios< char >
setf (T...args)
 
getloc (T...args)
 
precision (T...args)
 
imbue (T...args)
 
flags (T...args)
 
operator! (T...args)
 
widen (T...args)
 
width (T...args)
 
narrow (T...args)
 
basic_ios (T...args)
 
unsetf (T...args)
 
~basic_ios (T...args)
 
rdstate (T...args)
 
operator bool (T...args)
 
setstate (T...args)
 
tie (T...args)
 
eof (T...args)
 
register_callback (T...args)
 
pword (T...args)
 
good (T...args)
 
copyfmt (T...args)
 
set_rdbuf (T...args)
 
sync_with_stdio (T...args)
 
move (T...args)
 
rdbuf (T...args)
 
fail (T...args)
 
fill (T...args)
 
swap (T...args)
 
xalloc (T...args)
 
bad (T...args)
 
clear (T...args)
 
exceptions (T...args)
 
iword (T...args)
 
init (T...args)
 
- Public Member Functions inherited from std::ios_base
register_callback (T...args)
 
pword (T...args)
 
unsetf (T...args)
 
getloc (T...args)
 
sync_with_stdio (T...args)
 
precision (T...args)
 
xalloc (T...args)
 
flags (T...args)
 
setf (T...args)
 
imbue (T...args)
 
width (T...args)
 
ios_base (T...args)
 
~ios_base (T...args)
 
iword (T...args)
 

Public Attributes

std::ostreamoutput
 Reference to the final output stream that the formatted string will be streamed to. More...
 

Detailed Description

A convenience output stream that will accumulate what is streamed to it and then, on destruction, format the accumulated string using the fmt program (via the argagg::fmt_string() function) to the provided std::ostream.

Example use:

* {
* f << "Usage: " << really_long_string << std::endl;
* } // on destruction here the formatted string will be streamed to std::cerr
*
Note
This only has formatting behavior if the __unix__ preprocessor definition is defined since formatting relies on the POSIX API for forking, executing a process, and reading/writing to/from file descriptors. If that preprocessor definition is not defined then this class has the same overall behavior except the output string is not formatted (basically streams whatever the accumulated string is). See arggg::fmt_string().

Definition at line 591 of file argagg.hpp.

Constructor & Destructor Documentation

argagg::fmt_ostream::fmt_ostream ( std::ostream output)
inline

Construct to output to the provided output stream when this object is destroyed.

Definition at line 1441 of file argagg.hpp.

argagg::fmt_ostream::~fmt_ostream ( )
inline

Special destructor that will format the accumulated string using fmt (via the argagg::fmt_string() function) and stream it to the std::ostream stored.

Definition at line 1448 of file argagg.hpp.

Member Data Documentation

std::ostream& argagg::fmt_ostream::output

Reference to the final output stream that the formatted string will be streamed to.

Definition at line 598 of file argagg.hpp.


The documentation for this struct was generated from the following file: