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

chunck Class Reference

Interface for chunck handling. More...

#include <chunck.h>

Inheritance diagram for chunck:

Inheritance graph
[legend]
List of all members.

Public Types

typedef unsigned int type
 type of a chunck (i.e. The first 4byte field of the chunck structure).


Public Methods

virtual ~chunck () throw ()
virtual type get_type () const=0 throw ()
 return the type of the chunck

virtual unsigned int get_size () const=0 throw ()
 return the size of the chunck

virtual chunck * sub_block ()=0 throw (std::exception)
 extract a subchunck from the current read position

virtual bool eof () const=0 throw ()
 is the chunck completely read ?

virtual unsigned int tell () const=0 throw ()
 get the chunck current read position

virtual bool seek (int delta, std::ios::seekdir dir=std::ios::cur)=0 throw (std::exception)
 move the current read position inside the chunck

virtual bool read (void *buffer, unsigned int size)=0 throw (std::exception)
 read some data for the current read position

virtual char get_char ()=0 throw (std::exception)
 extract the character at the current read position

virtual unsigned char get_byte ()=0 throw (std::exception)
 extract the byte at the current read position

virtual short get_short ()=0 throw (std::exception)
 extract the short at the current read position

virtual unsigned short get_word ()=0 throw (std::exception)
 extract the word at the current read position

virtual unsigned int get_dword ()=0 throw (std::exception)
 extract the dword at the current read position


Static Public Methods

std::string chunck_string (type t)
 convert a type to a string


Detailed Description

Interface for chunck handling.

This class is an interface for reading from a chunck.

Todo:
handle big endian system.

Definition at line 36 of file chunck.h.


Member Typedef Documentation

typedef unsigned int chunck::type
 

type of a chunck (i.e. The first 4byte field of the chunck structure).

Definition at line 39 of file chunck.h.

Referenced by imuse_channel::append_data(), saud_channel::append_data(), player::checkBlock(), chunck_string(), get_strings(), cont_chunck::get_type(), file_chunck::get_type(), imuse_channel::processBuffer(), saud_channel::processBuffer(), and cont_chunck::sub_block().


Constructor & Destructor Documentation

virtual chunck::~chunck   throw () [inline, virtual]
 

Definition at line 38 of file chunck.h.


Member Function Documentation

string chunck::chunck_string type    t [static]
 

convert a type to a string

Utility function that convert a type to a string.

Parameters:
t  the type to convert to a string
Returns:
the converted string

Definition at line 56 of file chunck.cpp.

References type.

Referenced by player::handleFrame(), imuse_channel::handleMap(), imuse_channel::processBuffer(), and saud_channel::processBuffer().

virtual bool chunck::eof   const throw () [pure virtual]
 

is the chunck completely read ?

Implemented in file_chunck, and cont_chunck.

Referenced by imuse_channel::handleMap(), and codec37_decoder::proc1().

virtual unsigned char chunck::get_byte   throw (std::exception) [pure virtual]
 

extract the byte at the current read position

Implemented in file_chunck, and cont_chunck.

Referenced by codec37_decoder::proc1(), codec37_decoder::proc2(), codec37_decoder::proc3_with_fdfe(), codec37_decoder::proc3_without_fdfe(), and codec37_decoder::proc4().

virtual char chunck::get_char   throw (std::exception) [pure virtual]
 

extract the character at the current read position

Implemented in file_chunck, and cont_chunck.

Referenced by codec37_decoder::proc2().

virtual unsigned int chunck::get_dword   throw (std::exception) [pure virtual]
 

extract the dword at the current read position

Implemented in file_chunck, and cont_chunck.

Referenced by imuse_channel::handleFormat(), imuse_channel::handleRegion(), imuse_channel::handleStop(), and imuse_channel::handleText().

virtual short chunck::get_short   throw (std::exception) [pure virtual]
 

extract the short at the current read position

Implemented in file_chunck, and cont_chunck.

virtual unsigned int chunck::get_size   const throw () [pure virtual]
 

return the size of the chunck

Implemented in file_chunck, and cont_chunck.

Referenced by player::checkBlock(), imuse_channel::handleFormat(), player::handleFrame(), imuse_channel::handleMap(), imuse_channel::handleRegion(), imuse_channel::handleStop(), imuse_channel::handleText(), and player::play().

virtual type chunck::get_type   const throw () [pure virtual]
 

return the type of the chunck

Implemented in file_chunck, and cont_chunck.

Referenced by player::checkBlock(), player::handleFrame(), imuse_channel::handleMap(), and player::play().

virtual unsigned short chunck::get_word   throw (std::exception) [pure virtual]
 

extract the word at the current read position

Implemented in file_chunck, and cont_chunck.

virtual bool chunck::read void *    buffer,
unsigned int    size
throw (std::exception) [pure virtual]
 

read some data for the current read position

Implemented in file_chunck, and cont_chunck.

Referenced by imuse_channel::handleText().

virtual bool chunck::seek int    delta,
std::ios::seekdir    dir = std::ios::cur
throw (std::exception) [pure virtual]
 

move the current read position inside the chunck

Implemented in file_chunck, and cont_chunck.

Referenced by imuse_channel::handleFormat(), and imuse_channel::handleRegion().

virtual chunck* chunck::sub_block   throw (std::exception) [pure virtual]
 

extract a subchunck from the current read position

Implemented in file_chunck, and cont_chunck.

Referenced by imuse_channel::handleMap().

virtual unsigned int chunck::tell   const throw () [pure virtual]
 

get the chunck current read position

Implemented in file_chunck, and cont_chunck.

Referenced by codec37_decoder::proc2().


The documentation for this class was generated from the following files:
Generated on Fri Aug 9 22:54:30 2002 for san_player by doxygen1.2.16