Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
Public Member Functions | Protected Attributes
resource::FileDataStream Class Reference

Subclass of DataStream for handling data from files. More...

#include <DataStream.h>

Inheritance diagram for resource::FileDataStream:
resource::DataStream

List of all members.

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::FilemFile

Detailed Description

Subclass of DataStream for handling data from files.


Constructor & Destructor Documentation

resource::FileDataStream::FileDataStream ( const std::string &  fileName)
resource::FileDataStream::~FileDataStream ( )

References mFile.


Member Function Documentation

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.

u32 resource::FileDataStream::read ( void *  buffer,
u32  size,
u32  count 
) [virtual]

Implements resource::DataStream.

References mFile, and platform::File::read().

u32 resource::FileDataStream::read ( void *  buffer,
u32  size 
) [virtual]

Reads the data stream into a buffer.

Parameters:
buffer,:Pointer to buffer to read into
size,:Number of bytes to read
Returns:
The number of bytes actually 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().


Member Data Documentation


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

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:09 by Doxygen (1.7.4)