#include <Streams.hpp>
Inheritance diagram for Stream::InputFileStream:
Public Member Functions | |
virtual uint32 | currentPosition () const |
This method returns the position of the next byte that could be read from this stream. | |
virtual bool | endReached () const |
This method returns true if the end of stream is reached. | |
virtual uint32 | fullSize () const |
This method returns the stream length in byte, if known If the length is equal or higher than 2^32 - 1, the returned value is 0xfffffffe. | |
virtual bool | goForward (const uint32 &skipAmount) |
Move the stream position forward of the given amount This should give the same results as setPosition(currentPosition() + value), but implementation can be faster for non-seek-able stream. | |
InputFileStream (const String &name) | |
The only allowed constructor. | |
virtual uint32 | read (void *const buffer, const uint32 &size) const throw () |
Try to read the given amount of data to the specified buffer. | |
virtual String | readNextLine () const throw () |
Read the next line. | |
virtual bool | setPosition (const uint32 &newPos) |
Try to seek to the given absolute position (return false if not supported). | |
~InputFileStream () | |
The only allowed destructor. | |
Protected Types | |
typedef Strings::FastString | String |
The string implementation we are using. |
typedef Strings::FastString Stream::InputFileStream::String [protected] |
The string implementation we are using.
Stream::InputFileStream::InputFileStream | ( | const String & | name | ) |
The only allowed constructor.
Stream::InputFileStream::~InputFileStream | ( | ) |
The only allowed destructor.
uint32 Stream::InputFileStream::currentPosition | ( | ) | const [virtual] |
This method returns the position of the next byte that could be read from this stream.
Implements Stream::BaseStream.
bool Stream::InputFileStream::endReached | ( | ) | const [virtual] |
uint32 Stream::InputFileStream::fullSize | ( | ) | const [virtual] |
This method returns the stream length in byte, if known If the length is equal or higher than 2^32 - 1, the returned value is 0xfffffffe.
Implements Stream::BaseStream.
bool Stream::InputFileStream::goForward | ( | const uint32 & | skipAmount | ) | [virtual] |
Move the stream position forward of the given amount This should give the same results as setPosition(currentPosition() + value), but implementation can be faster for non-seek-able stream.
Implements Stream::BaseStream.
uint32 Stream::InputFileStream::read | ( | void *const | buffer, | |
const uint32 & | size | |||
) | const throw () [virtual] |
Try to read the given amount of data to the specified buffer.
Implements Stream::InputStream.
virtual String Stream::LineSplitStream< String >::readNextLine | ( | ) | const throw () [inline, virtual, inherited] |
Read the next line.
bool Stream::InputFileStream::setPosition | ( | const uint32 & | newPos | ) | [virtual] |
Try to seek to the given absolute position (return false if not supported).
Implements Stream::BaseStream.