Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

audiere::File Class Reference

#include <audiere.h>

Inheritance diagram for audiere::File:

Inheritance graph
[legend]
Collaboration diagram for audiere::File:

Collaboration graph
[legend]
List of all members.

Public Types

enum  SeekMode { BEGIN, CURRENT, END }

Public Methods

virtual int ADR_CALL read (void *buffer, int size)=0
virtual bool ADR_CALL seek (int position, SeekMode mode)=0
virtual int ADR_CALL tell ()=0

Protected Methods

 ~File ()

Detailed Description

Represents a random-access file, usually stored on a disk. Files are always binary: that is, they do no end-of-line transformations. File objects are roughly analogous to ANSI C FILE* objects.

This interface is not synchronized.

Definition at line 167 of file audiere.h.


Member Enumeration Documentation

enum audiere::File::SeekMode
 

The different ways you can seek within a file.

Enumeration values:
BEGIN 
CURRENT 
END 

Definition at line 175 of file audiere.h.

Referenced by audiere::CFile::seek().


Constructor & Destructor Documentation

audiere::File::~File   [inline, protected]
 

Definition at line 169 of file audiere.h.


Member Function Documentation

virtual int ADR_CALL audiere::File::read void *    buffer,
int    size
[pure virtual]
 

Read size bytes from the file, storing them in buffer.

Parameters:
buffer  buffer to read into
size  number of bytes to read
Returns :
number of bytes successfully read

Implemented in audiere::CFile.

Referenced by audiere::WAVInputStream::initialize(), and audiere::MyFLACDecoder::read_callback().

virtual bool ADR_CALL audiere::File::seek int    position,
SeekMode    mode
[pure virtual]
 

Jump to a new position in the file, using the specified seek mode. Remember: if mode is END, the position must be negative, to seek backwards from the end of the file into its contents. If the seek fails, the current position is undefined.

Parameters:
position  position relative to the mode
mode  where to seek from in the file
Returns :
true on success, false otherwise

Implemented in audiere::CFile.

Referenced by audiere::GetFileLength(), and audiere::MyFLACDecoder::seek_callback().

virtual int ADR_CALL audiere::File::tell   [pure virtual]
 

Get current position within the file.

Returns :
current position

Implemented in audiere::CFile.

Referenced by audiere::MyFLACDecoder::eof_callback(), audiere::GetFileLength(), and audiere::MyFLACDecoder::tell_callback().


The documentation for this class was generated from the following file:
Generated on Sat Oct 12 01:43:59 2002 for audiere by doxygen1.2.17