sg_gzifstream Class Reference

An envelope class for gzifstream. More...

#include <sgstream.hxx>

Inheritance diagram for sg_gzifstream:
gzifstream_base

List of all members.

Public Member Functions

 sg_gzifstream ()
 Default constructor.
 sg_gzifstream (const std::string &name, ios_openmode io_mode=ios_in|ios_binary)
 Constructor that attempt to open a file with and without ".gz" extension.
 sg_gzifstream (int fd, ios_openmode io_mode=ios_in|ios_binary)
 Constructor that attaches itself to an existing file descriptor.
void open (const std::string &name, ios_openmode io_mode=ios_in|ios_binary)
 Attempt to open a file with and without ".gz" extension.
void attach (int fd, ios_openmode io_mode=ios_in|ios_binary)
 Attach to an existing file descriptor.
void close ()
 Close the stream.
bool is_open ()

Related Functions

(Note that these are not member functions.)



std::istream & skipeol (std::istream &in)
std::istream & skipws (std::istream &in)
std::istream & skipcomment (std::istream &in)

Detailed Description

An envelope class for gzifstream.

Definition at line 45 of file sgstream.hxx.


Constructor & Destructor Documentation

sg_gzifstream::sg_gzifstream ( const std::string &  name,
ios_openmode  io_mode = ios_in|ios_binary 
)

Constructor that attempt to open a file with and without ".gz" extension.

Parameters:
name name of file
io_mode file open mode(s) "or'd" together
sg_gzifstream::sg_gzifstream ( int  fd,
ios_openmode  io_mode = ios_in|ios_binary 
)

Constructor that attaches itself to an existing file descriptor.

Parameters:
fd file descriptor
io_mode file open mode(s) "or'd" together

Definition at line 52 of file sgstream.cxx.


Member Function Documentation

void sg_gzifstream::attach ( int  fd,
ios_openmode  io_mode = ios_in|ios_binary 
)

Attach to an existing file descriptor.

Parameters:
fd file descriptor
io_mode file open mode(s) "or'd" together

Definition at line 91 of file sgstream.cxx.

bool sg_gzifstream::is_open (  )  [inline]
Returns:
true if the file is successfully opened, false otherwise.

Definition at line 88 of file sgstream.hxx.

void sg_gzifstream::open ( const std::string &  name,
ios_openmode  io_mode = ios_in|ios_binary 
)

Attempt to open a file with and without ".gz" extension.

Parameters:
name name of file
io_mode file open mode(s) "or'd" together

Friends And Related Function Documentation

std::istream & skipcomment ( std::istream &  in  )  [related]

An istream manipulator that skips comments and white space. Ignores comments that start with '#'.

Parameters:
in input stream
std::istream & skipeol ( std::istream &  in  )  [related]

An istream manipulator that skips to end of line.

Parameters:
in input stream
std::istream & skipws ( std::istream &  in  )  [related]

An istream manipulator that skips over white space.

Parameters:
in input stream

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

Generated on 23 Feb 2010 for SimGear by  doxygen 1.6.1