#include <mrpt/utils/CFileGZInputStream.h>
Public Member Functions | |
CFileGZInputStream () | |
Constructor without open. | |
CFileGZInputStream (const std::string &fileName) | |
Constructor and open. | |
virtual | ~CFileGZInputStream () |
Destructor. | |
bool | open (const std::string &fileName) |
Opens the file for read. | |
void | close () |
Closes the file. | |
bool | fileOpenCorrectly () |
Says if file was open successfully or not. | |
bool | checkEOF () |
Will be true if EOF has been already reached. | |
size_t | getTotalBytesCount () |
Method for getting the total number of compressed bytes in the file. | |
size_t | getPosition () |
Method for getting the current cursor position in the compressed, where 0 is the first byte and TotalBytesCount-1 the last one. | |
size_t | Seek (long Offset, CStream::TSeekOrigin Origin=sFromBeginning) |
This method is not implemented in this class. | |
Protected Member Functions | |
size_t | Read (void *Buffer, size_t Count) |
Method responsible for reading from the stream. | |
size_t | Write (const void *Buffer, size_t Count) |
Method responsible for writing to the stream. | |
Private Attributes | |
void * | m_f |
size_t | m_file_size |
Compressed file size. |
If the file is not a .gz file, it silently reads data from the file. This class requires compiling MRPT with wxWidgets. If wxWidgets is not available then the class is actually mapped to the standard CFileInputStream
Definition at line 49 of file CFileGZInputStream.h.
mrpt::utils::CFileGZInputStream::CFileGZInputStream | ( | ) |
Constructor without open.
mrpt::utils::CFileGZInputStream::CFileGZInputStream | ( | const std::string & | fileName | ) |
Constructor and open.
fileName | The file to be open in this stream |
std::exception | If there's an error opening the file. |
virtual mrpt::utils::CFileGZInputStream::~CFileGZInputStream | ( | ) | [virtual] |
Destructor.
bool mrpt::utils::CFileGZInputStream::checkEOF | ( | ) |
Will be true if EOF has been already reached.
void mrpt::utils::CFileGZInputStream::close | ( | ) |
Closes the file.
bool mrpt::utils::CFileGZInputStream::fileOpenCorrectly | ( | ) |
Says if file was open successfully or not.
size_t mrpt::utils::CFileGZInputStream::getPosition | ( | ) | [virtual] |
Method for getting the current cursor position in the compressed, where 0 is the first byte and TotalBytesCount-1 the last one.
Implements mrpt::utils::CStream.
size_t mrpt::utils::CFileGZInputStream::getTotalBytesCount | ( | ) | [virtual] |
Method for getting the total number of compressed bytes in the file.
Implements mrpt::utils::CStream.
bool mrpt::utils::CFileGZInputStream::open | ( | const std::string & | fileName | ) |
Opens the file for read.
fileName | The file to be open in this stream |
size_t mrpt::utils::CFileGZInputStream::Read | ( | void * | Buffer, | |
size_t | Count | |||
) | [protected, virtual] |
size_t mrpt::utils::CFileGZInputStream::Seek | ( | long | Offset, | |
CStream::TSeekOrigin | Origin = sFromBeginning | |||
) | [inline, virtual] |
This method is not implemented in this class.
Implements mrpt::utils::CStream.
Definition at line 108 of file CFileGZInputStream.h.
References THROW_EXCEPTION.
size_t mrpt::utils::CFileGZInputStream::Write | ( | const void * | Buffer, | |
size_t | Count | |||
) | [protected, virtual] |
Method responsible for writing to the stream.
Write attempts to write up to Count bytes to Buffer, and returns the number of bytes actually written.
Implements mrpt::utils::CStream.
void* mrpt::utils::CFileGZInputStream::m_f [private] |
Definition at line 64 of file CFileGZInputStream.h.
size_t mrpt::utils::CFileGZInputStream::m_file_size [private] |
Page generated by Doxygen 1.5.9 for MRPT 0.6.5 SVN: at Sun Aug 2 11:39:56 CDT 2009 |