Stream::InputFileStream Class Reference

#include <Streams.hpp>

Inheritance diagram for Stream::InputFileStream:

Stream::LineSplitStream< String > Stream::InputStream Stream::BaseStream List of all members.

Detailed Description

A File-based input stream.


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.


Member Typedef Documentation

typedef Strings::FastString Stream::InputFileStream::String [protected]

The string implementation we are using.


Constructor & Destructor Documentation

Stream::InputFileStream::InputFileStream ( const String name  ) 

The only allowed constructor.

Stream::InputFileStream::~InputFileStream (  ) 

The only allowed destructor.


Member Function Documentation

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]

This method returns true if the end of stream is reached.

Implements Stream::BaseStream.

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.

Returns:
the number of byte truly read (this method doesn't throw)

Implements Stream::InputStream.

template<class String>
virtual String Stream::LineSplitStream< String >::readNextLine (  )  const throw () [inline, virtual, inherited]

Read the next line.

Returns:
The String containing the next line (should end by
or
)

bool Stream::InputFileStream::setPosition ( const uint32 &  newPos  )  [virtual]

Try to seek to the given absolute position (return false if not supported).

Implements Stream::BaseStream.


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

(C) An X-Ryl669 project 2007

This document describes Unlimited Zooming Interface source code. UZI stands for Unlimited Zooming Interface, and source code license is