cgatools::util::InputStream Class Reference

A std::istream with good error messages. More...

#include <Streams.hpp>

List of all members.

Public Member Functions

 InputStream (const char *fn)
 InputStream (const std::string &fn)
void open (const std::string &fn)
void open (const char *fn)
void close ()

Static Public Member Functions

static boost::shared_ptr
< std::istream > 
openCompressedInputStreamByExtension (const std::string &fn)
 Returns a pointer to an InputStream or CompressedInputStream, depending on the file extension.
static bool getline (std::istream &in, std::string &line)
 Retrieves the line from the given input stream, and removes a carriage return from the end if there is one.

Detailed Description

A std::istream with good error messages.


Member Function Documentation

static bool cgatools::util::InputStream::getline ( std::istream &  in,
std::string &  line 
) [static]

Retrieves the line from the given input stream, and removes a carriage return from the end if there is one.

static boost::shared_ptr<std::istream> cgatools::util::InputStream::openCompressedInputStreamByExtension ( const std::string &  fn  )  [static]

Returns a pointer to an InputStream or CompressedInputStream, depending on the file extension.

File extensions supported:

  • .gz -> gzip format
  • .bz2 -> bzip2 format
  • other -> straight InputStream

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by  doxygen 1.6.2