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

icstream: Input channel stream wrapper class More...

#include <icstream.hh>

Public Member Functions

 icstream (std::istream &i_stream_a)
 Constructor. More...
 
virtual ~icstream ()
 Destructor. More...
 
 operator bool () const
 bool conversion More...
 
 operator std::istream const & () const
 Stream conversion. More...
 
 operator std::istream & ()
 Stream conversion. More...
 
template<typename T >
icstreamoperator>> (T &t)
 Stream input: Override to preserve type of return value. More...
 
std::istream & operator>> (std_manipulator m)
 Stream manipulator input. More...
 
void seek_beg ()
 Seek to the beginning. More...
 
int get ()
 Get the next character. More...
 
icstreamget (char &c)
 Get the next character. More...
 
icstreamget (char *str, std::streamsize const count)
 Get the next specified number of characters. More...
 
icstreamget (char *str, std::streamsize const count, char const delim)
 Get the next specified number of characters. More...
 
icstreamget (std::string &str, std::streamsize const count)
 Get the next specified number of characters. More...
 
icstreamget (std::string &str, std::streamsize const count, char const delim)
 Get the next specified number of characters. More...
 
icstreamgetline (char *line, std::streamsize const count)
 Get the rest of the line. More...
 
icstreamgetline (char *line, std::streamsize const count, char const delim)
 Get the rest of the line. More...
 
icstreamgetline (std::string &line)
 Get the rest of the line. More...
 
icstreamgetline (std::string &line, char const delim)
 Get the rest of the line. More...
 
icstreamread (char *str, std::streamsize const count)
 Read the next specified number of characters. More...
 
icstreamread (std::string &str, std::streamsize const count)
 Read the next specified number of characters. More...
 
std::streamsize readsome (char *str, std::streamsize const count)
 Read the next available specified number of characters. More...
 
std::streamsize readsome (std::string &str, std::streamsize const count)
 Read the next available specified number of characters. More...
 
icstreamignore ()
 Skip over the next character. More...
 
icstreamignore (std::streamsize const count)
 Skip over the next specified number of characters. More...
 
icstreamignore (std::streamsize const count, char const delim)
 Skip over the next specified number of characters. More...
 
int peek ()
 Returns the next character without extracting it. More...
 
icstreamunget ()
 Put the last character read back into the stream. More...
 
icstreamputback (char c)
 Put the last character read back into the stream and check that passed character is correct. More...
 
void clear ()
 Clear the stream. More...
 
std::istream const & operator() () const
 Stream access. More...
 
std::istream & operator() ()
 Stream access. More...
 
std::istream const & stream () const
 Stream access. More...
 
std::istream & 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::irstream
virtual ~irstream ()
 Destructor. More...
 
template<typename T >
irstreamoperator>> (T &t)
 Stream input. More...
 

Private Attributes

std::istream & i_stream_
 Input stream reference. More...
 

Additional Inherited Members

- Protected Types inherited from utility::io::irstream
typedef std::istream &(* std_manipulator )(std::istream &)
 
- Protected Member Functions inherited from utility::io::irstream
 irstream ()
 Default constructor. More...
 

Detailed Description

icstream: Input channel stream wrapper class

Constructor & Destructor Documentation

utility::io::icstream::icstream ( std::istream &  i_stream_a)
inline

Constructor.

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

Destructor.

Member Function Documentation

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

Bad?

Implements utility::io::irstream.

References i_stream_.

void utility::io::icstream::clear ( )
inlinevirtual
bool utility::io::icstream::compressed ( ) const
inlinevirtual

Compressed?

Implements utility::io::irstream.

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

End of file?

Implements utility::io::irstream.

References i_stream_.

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

Fail?

Implements utility::io::irstream.

References i_stream_.

int utility::io::icstream::get ( )
inlinevirtual

Get the next character.

Implements utility::io::irstream.

References stream().

icstream& utility::io::icstream::get ( char &  c)
inlinevirtual

Get the next character.

Implements utility::io::irstream.

References stream().

icstream& utility::io::icstream::get ( char *  str,
std::streamsize const  count 
)
inlinevirtual

Get the next specified number of characters.

Implements utility::io::irstream.

References stream().

icstream& utility::io::icstream::get ( char *  str,
std::streamsize const  count,
char const  delim 
)
inlinevirtual

Get the next specified number of characters.

Implements utility::io::irstream.

References stream().

icstream& utility::io::icstream::get ( std::string &  str,
std::streamsize const  count 
)
inlinevirtual

Get the next specified number of characters.

Implements utility::io::irstream.

References basic::options::OptionKeys::cp::cp, and stream().

icstream& utility::io::icstream::get ( std::string &  str,
std::streamsize const  count,
char const  delim 
)
inlinevirtual

Get the next specified number of characters.

Implements utility::io::irstream.

References basic::options::OptionKeys::cp::cp, and stream().

icstream& utility::io::icstream::getline ( char *  line,
std::streamsize const  count 
)
inlinevirtual

Get the rest of the line.

Implements utility::io::irstream.

References stream().

icstream& utility::io::icstream::getline ( char *  line,
std::streamsize const  count,
char const  delim 
)
inlinevirtual

Get the rest of the line.

Implements utility::io::irstream.

References stream().

icstream& utility::io::icstream::getline ( std::string &  line)
inlinevirtual

Get the rest of the line.

Implements utility::io::irstream.

References utility::io::getline(), and stream().

icstream& utility::io::icstream::getline ( std::string &  line,
char const  delim 
)
inlinevirtual

Get the rest of the line.

Implements utility::io::irstream.

References utility::io::getline(), and stream().

bool utility::io::icstream::good ( ) const
inlinevirtual

Good?

Implements utility::io::irstream.

References i_stream_.

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

gzipped?

Implements utility::io::irstream.

icstream& utility::io::icstream::ignore ( )
inlinevirtual

Skip over the next character.

Implements utility::io::irstream.

References stream().

icstream& utility::io::icstream::ignore ( std::streamsize const  count)
inlinevirtual

Skip over the next specified number of characters.

Implements utility::io::irstream.

References stream().

icstream& utility::io::icstream::ignore ( std::streamsize const  count,
char const  delim 
)
inlinevirtual

Skip over the next specified number of characters.

Implements utility::io::irstream.

References stream().

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

bool conversion

Implements utility::io::irstream.

References i_stream_.

utility::io::icstream::operator std::istream & ( )
inlinevirtual

Stream conversion.

Implements utility::io::irstream.

References i_stream_.

utility::io::icstream::operator std::istream const & ( ) const
inlinevirtual

Stream conversion.

Implements utility::io::irstream.

References i_stream_.

std::istream const& utility::io::icstream::operator() ( ) const
inlinevirtual

Stream access.

Implements utility::io::irstream.

References i_stream_.

std::istream& utility::io::icstream::operator() ( )
inlinevirtual

Stream access.

Implements utility::io::irstream.

References i_stream_.

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

Stream input: Override to preserve type of return value.

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

std::istream& utility::io::icstream::operator>> ( std_manipulator  m)
inlinevirtual

Stream manipulator input.

Implements utility::io::irstream.

int utility::io::icstream::peek ( )
inlinevirtual

Returns the next character without extracting it.

Implements utility::io::irstream.

References stream().

icstream& utility::io::icstream::putback ( char  c)
inlinevirtual

Put the last character read back into the stream and check that passed character is correct.

Implements utility::io::irstream.

References stream().

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

Pointer to the stream buffer.

Implements utility::io::irstream.

References i_stream_.

icstream& utility::io::icstream::read ( char *  str,
std::streamsize const  count 
)
inlinevirtual

Read the next specified number of characters.

Implements utility::io::irstream.

References stream().

icstream& utility::io::icstream::read ( std::string &  str,
std::streamsize const  count 
)
inlinevirtual

Read the next specified number of characters.

Implements utility::io::irstream.

References basic::options::OptionKeys::cp::cp, and stream().

std::streamsize utility::io::icstream::readsome ( char *  str,
std::streamsize const  count 
)
inlinevirtual

Read the next available specified number of characters.

Implements utility::io::irstream.

References stream().

std::streamsize utility::io::icstream::readsome ( std::string &  str,
std::streamsize const  count 
)
inlinevirtual

Read the next available specified number of characters.

Implements utility::io::irstream.

References basic::options::OptionKeys::cp::cp, and stream().

void utility::io::icstream::seek_beg ( )
inlinevirtual

Seek to the beginning.

Implements utility::io::irstream.

References stream().

std::istream const& utility::io::icstream::stream ( ) const
inlinevirtual

Stream access.

Implements utility::io::irstream.

References i_stream_.

Referenced by get(), getline(), ignore(), peek(), putback(), read(), readsome(), seek_beg(), and unget().

std::istream& utility::io::icstream::stream ( )
inlinevirtual

Stream access.

Implements utility::io::irstream.

References i_stream_.

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

Uncompressed?

Implements utility::io::irstream.

icstream& utility::io::icstream::unget ( )
inlinevirtual

Put the last character read back into the stream.

Implements utility::io::irstream.

References stream().

Member Data Documentation

std::istream& utility::io::icstream::i_stream_
private

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