Cambridge SMT System
|
Wrapper stream class that writes to pipes, text files or gzipped files. More...
#include <szfstream.hpp>
Public Types | |
typedef std::basic_ostream< char, std::char_traits< char > > | CoutType |
typedef CoutType &(* | StandardEndLine) (CoutType &) |
Public Member Functions | |
oszfstream (const std::string &filename, bool append=false) | |
Constructor. More... | |
oszfstream (const std::stringstream &ss) | |
Constructor. More... | |
std::ostream * | getStream () |
Returns internal stream. More... | |
void | open (const std::stringstream &ss) |
void | open (const std::string &filename) |
Opens a [file]. More... | |
~oszfstream () | |
Destructor. Closes the file. More... | |
bool | is_open () |
Checks whether the file is open. More... | |
void | close () |
Closes the file. More... | |
oszfstream & | operator<< (StandardEndLine manip) |
Makes endl understandable when streaming towards this class. More... | |
template<typename T > | |
oszfstream & | operator<< (const T &stff) |
Templated operator << for streaming into filestream_. More... | |
Wrapper stream class that writes to pipes, text files or gzipped files.
Definition at line 200 of file szfstream.hpp.
typedef std::basic_ostream<char, std::char_traits<char> > ucam::util::oszfstream::CoutType |
Definition at line 337 of file szfstream.hpp.
Definition at line 340 of file szfstream.hpp.
|
inline |
Constructor.
Definition at line 223 of file szfstream.hpp.
|
inline |
Constructor.
Definition at line 235 of file szfstream.hpp.
|
inline |
Destructor. Closes the file.
Definition at line 313 of file szfstream.hpp.
|
inline |
Closes the file.
Definition at line 323 of file szfstream.hpp.
|
inline |
Returns internal stream.
Definition at line 241 of file szfstream.hpp.
|
inline |
Checks whether the file is open.
Definition at line 318 of file szfstream.hpp.
|
inline |
Definition at line 245 of file szfstream.hpp.
|
inline |
Opens a [file].
filename | [file], which could be - for a pipe. If it ends in .gz then it will compress. |
Definition at line 255 of file szfstream.hpp.
|
inline |
Makes endl understandable when streaming towards this class.
Definition at line 343 of file szfstream.hpp.
|
inline |
Templated operator << for streaming into filestream_.
Definition at line 350 of file szfstream.hpp.