Public Types | Public Member Functions

xl7::io::IRom Class Reference

#include <IRom.h>

Inheritance diagram for xl7::io::IRom:
xl7::io::IFile xl7::io::Resource xl7::io::RIFF xl7::io::File xl7::io::PacketFile xl7::io::VirtualFile

List of all members.

Public Types

enum  SeekFlags { begin = 0, current = 1, end = 2 }

Public Member Functions

 IRom (void)
virtual ~IRom (void)
virtual bool IsOpen () const =0
virtual unsigned GetSize () const =0
virtual unsigned GetPointer () const =0
virtual unsigned SetPointer (unsigned pointer)=0
virtual bool Open ()=0
virtual bool Close ()=0
virtual unsigned Read (void *buffer, unsigned bytes)=0
virtual unsigned Seek (signed bytes, const SeekFlags from=current)=0

Detailed Description

The interface to read data from files in the file system or virtual files in memory.


Member Enumeration Documentation

Enumerator:
begin 
current 
end 

Constructor & Destructor Documentation

xl7::io::IRom::IRom ( void   )  [inline]

Default constructor.

virtual xl7::io::IRom::~IRom ( void   )  [inline, virtual]

Destructor.


Member Function Documentation

virtual bool xl7::io::IRom::Close (  )  [pure virtual]
virtual unsigned xl7::io::IRom::GetPointer (  )  const [pure virtual]

Returns the current byte position to read or write data.

Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.

virtual unsigned xl7::io::IRom::GetSize (  )  const [pure virtual]

Returns the size of the file, in bytes.

Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.

virtual bool xl7::io::IRom::IsOpen (  )  const [pure virtual]

Checks whether the file is open and can be read.

Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.

virtual bool xl7::io::IRom::Open (  )  [pure virtual]

Opens the file for reading data.

Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.

virtual unsigned xl7::io::IRom::Read ( void *  buffer,
unsigned  bytes 
) [pure virtual]

Reads data from the file and returns the number of bytes read.

Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.

virtual unsigned xl7::io::IRom::Seek ( signed  bytes,
const SeekFlags  from = current 
) [pure virtual]

Resets the current byte position to read or write data by moving the pointer by the specified bytes. The function returns the new position.

Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.

virtual unsigned xl7::io::IRom::SetPointer ( unsigned  pointer  )  [pure virtual]

Resets the current byte position to read or write data. The function returns the new position.

Implemented in xl7::io::File, xl7::io::PacketFile, xl7::io::Resource, xl7::io::RIFF, and xl7::io::VirtualFile.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines