| Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
Subclass of DataStream for handling data from files. More...
#include <DataStream.h>
Public Member Functions | |
| bool | eof () |
| Returns true if the buffer pointer has reached the end of the buffer. | |
| FileDataStream (const std::string &fileName) | |
| Wrap an existing file in a stream. | |
| u32 | read (void *buffer, u32 size, u32 count) |
| u32 | read (void *buffer, u32 size) |
| void | seek (u32 pos) |
| Repositions the internal read pointer to a specified byte. | |
| void | skip (s32 offset) |
| u32 | tell () const |
| Returns the current byte offset from beginning. | |
| ~FileDataStream () | |
Protected Attributes | |
| platform::File * | mFile |
Subclass of DataStream for handling data from files.
| resource::FileDataStream::FileDataStream | ( | const std::string & | fileName | ) |
Wrap an existing file in a stream.
References platform::FA_READ, engine::LogManager::getInstance(), engine::LL_ERROR, mFile, resource::DataStream::mSize, platform::File::opened(), and platform::File::size().
| resource::FileDataStream::~FileDataStream | ( | ) |
References mFile.
| bool resource::FileDataStream::eof | ( | ) | [virtual] |
Returns true if the buffer pointer has reached the end of the buffer.
Implements resource::DataStream.
References platform::File::eof(), and mFile.
Implements resource::DataStream.
References mFile, and platform::File::read().
Reads the data stream into a buffer.
| buffer,: | Pointer to buffer to read into |
| size,: | Number of bytes to read |
Implements resource::DataStream.
References mFile, and platform::File::read().
| void resource::FileDataStream::seek | ( | u32 | pos | ) | [virtual] |
Repositions the internal read pointer to a specified byte.
Implements resource::DataStream.
References mFile, and platform::File::seek().
| void resource::FileDataStream::skip | ( | s32 | offset | ) | [virtual] |
Moves the internal read pointer backwards or forwards by the number of bytes specified. The sign of the parameter determines the direction of the skip.
Implements resource::DataStream.
References mFile, and platform::File::seek().
| u32 resource::FileDataStream::tell | ( | ) | const [virtual] |
Returns the current byte offset from beginning.
Implements resource::DataStream.
References mFile, and platform::File::tell().
platform::File* resource::FileDataStream::mFile [protected] |
Referenced by eof(), FileDataStream(), read(), seek(), skip(), tell(), and ~FileDataStream().
|
The KG Game Engine
Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:09 by
Doxygen
(1.7.4)
|