Rosetta Utilities  2014.35
Public Member Functions | Private Attributes | List of all members
utility::io::ocstream Class Reference

ocstream: Output channel stream wrapper class More...

#include <ocstream.hh>

Public Member Functions

 ocstream (std::ostream &o_stream_a)
 Constructor. More...
 
virtual ~ocstream ()
 Destructor. More...
 
 operator bool () const
 bool conversion More...
 
 operator std::ostream const & () const
 Stream conversion. More...
 
 operator std::ostream & ()
 Stream conversion. More...
 
template<typename T >
ocstreamoperator<< (T const &t)
 Stream output: override to preserve type of return value. More...
 
ocstreamoperator<< (manipulator m)
 Stream manipulator output. More...
 
ocstreamput (char const c)
 Write a char. More...
 
ocstreamwrite (char const *str, std::streamsize const count)
 Write a string. More...
 
ocstreamwrite (std::string const &str, std::streamsize const count)
 Write a string. More...
 
ocstreamflush ()
 Flush the stream. More...
 
void clear ()
 Clear the stream. More...
 
std::ostream const & operator() () const
 Stream access. More...
 
std::ostream & operator() ()
 Stream access. More...
 
std::ostream const & stream () const
 Stream access. More...
 
std::ostream & stream ()
 Stream access. More...
 
std::streambuf * rdbuf () const
 Pointer to the stream buffer. More...
 
bool good () const
 Good? More...
 
bool eof () const
 End of file? More...
 
bool fail () const
 Fail? More...
 
bool bad () const
 Bad? More...
 
bool compressed () const
 Compressed? More...
 
bool uncompressed () const
 Uncompressed? More...
 
bool gzipped () const
 gzipped? More...
 
- Public Member Functions inherited from utility::io::orstream
virtual ~orstream ()
 Destructor. More...
 
template<typename T >
orstreamoperator<< (T const &t)
 Stream output. More...
 

Private Attributes

std::ostream & o_stream_
 Output stream reference. More...
 

Additional Inherited Members

- Protected Types inherited from utility::io::orstream
typedef std::ostream &(* manipulator )(std::ostream &)
 
- Protected Member Functions inherited from utility::io::orstream
 orstream ()
 Default constructor. More...
 

Detailed Description

ocstream: Output channel stream wrapper class

Constructor & Destructor Documentation

utility::io::ocstream::ocstream ( std::ostream &  o_stream_a)
inline

Constructor.

virtual utility::io::ocstream::~ocstream ( )
inlinevirtual

Destructor.

Member Function Documentation

bool utility::io::ocstream::bad ( ) const
inlinevirtual

Bad?

Implements utility::io::orstream.

References o_stream_.

void utility::io::ocstream::clear ( )
inlinevirtual

Clear the stream.

Implements utility::io::orstream.

References o_stream_.

bool utility::io::ocstream::compressed ( ) const
inlinevirtual

Compressed?

Implements utility::io::orstream.

bool utility::io::ocstream::eof ( ) const
inlinevirtual

End of file?

Implements utility::io::orstream.

References o_stream_.

bool utility::io::ocstream::fail ( ) const
inlinevirtual

Fail?

Implements utility::io::orstream.

References o_stream_.

ocstream& utility::io::ocstream::flush ( )
inlinevirtual
bool utility::io::ocstream::good ( ) const
inlinevirtual

Good?

Implements utility::io::orstream.

References o_stream_.

bool utility::io::ocstream::gzipped ( ) const
inlinevirtual

gzipped?

Implements utility::io::orstream.

utility::io::ocstream::operator bool ( ) const
inlinevirtual

bool conversion

Implements utility::io::orstream.

References o_stream_.

utility::io::ocstream::operator std::ostream & ( )
inlinevirtual

Stream conversion.

Implements utility::io::orstream.

References o_stream_.

utility::io::ocstream::operator std::ostream const & ( ) const
inlinevirtual

Stream conversion.

Implements utility::io::orstream.

References o_stream_.

std::ostream const& utility::io::ocstream::operator() ( ) const
inlinevirtual

Stream access.

Implements utility::io::orstream.

References o_stream_.

std::ostream& utility::io::ocstream::operator() ( )
inlinevirtual

Stream access.

Implements utility::io::orstream.

References o_stream_.

template<typename T >
ocstream& utility::io::ocstream::operator<< ( T const &  t)
inline

Stream output: override to preserve type of return value.

References o_stream_, and basic::options::OptionKeys::in::file::t.

ocstream& utility::io::ocstream::operator<< ( manipulator  m)
inlinevirtual

Stream manipulator output.

Implements utility::io::orstream.

References o_stream_.

ocstream& utility::io::ocstream::put ( char const  c)
inlinevirtual

Write a char.

Implements utility::io::orstream.

References o_stream_.

std::streambuf* utility::io::ocstream::rdbuf ( ) const
inlinevirtual

Pointer to the stream buffer.

Implements utility::io::orstream.

References o_stream_.

Referenced by utility::file::gunzip(), and utility::file::gzip().

std::ostream const& utility::io::ocstream::stream ( ) const
inlinevirtual

Stream access.

Implements utility::io::orstream.

References o_stream_.

std::ostream& utility::io::ocstream::stream ( )
inlinevirtual

Stream access.

Implements utility::io::orstream.

References o_stream_.

bool utility::io::ocstream::uncompressed ( ) const
inlinevirtual

Uncompressed?

Implements utility::io::orstream.

ocstream& utility::io::ocstream::write ( char const *  str,
std::streamsize const  count 
)
inlinevirtual

Write a string.

Implements utility::io::orstream.

References o_stream_.

ocstream& utility::io::ocstream::write ( std::string const &  str,
std::streamsize const  count 
)
inlinevirtual

Write a string.

Implements utility::io::orstream.

References o_stream_.

Member Data Documentation

std::ostream& utility::io::ocstream::o_stream_
private

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