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

cont_chunck Class Reference

memory based chunck More...

#include <chunck.h>

Inheritance diagram for cont_chunck:

Inheritance graph
[legend]
Collaboration diagram for cont_chunck:

Collaboration 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

 cont_chunck (char *data) throw (std::exception)
chunck::type get_type () const throw ()
 return the type of the chunck

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

chuncksub_block () throw (std::exception)
 extract a subchunck from the current read position

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

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

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

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

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

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

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

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

unsigned int get_dword () 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


Private Attributes

char * _data
chunck::type _type
unsigned int _size
unsigned int _cur_pos

Detailed Description

memory based chunck

This class is an implementation of chunck that handles a memory buffer.

Definition at line 100 of file chunck.h.


Member Typedef Documentation

typedef unsigned int chunck::type [inherited]
 

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::chunck_string(), get_strings(), get_type(), file_chunck::get_type(), imuse_channel::processBuffer(), saud_channel::processBuffer(), and sub_block().


Constructor & Destructor Documentation

cont_chunck::cont_chunck char *    data throw (std::exception)
 

Definition at line 208 of file chunck.cpp.

References from_big_endian().


Member Function Documentation

string chunck::chunck_string type    t [static, inherited]
 

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 chunck::type.

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

bool cont_chunck::eof   const throw () [virtual]
 

is the chunck completely read ?

Implements chunck.

Definition at line 238 of file chunck.cpp.

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

extract the byte at the current read position

Implements chunck.

Definition at line 280 of file chunck.cpp.

char cont_chunck::get_char   throw (std::exception) [virtual]
 

extract the character at the current read position

Implements chunck.

Definition at line 275 of file chunck.cpp.

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

extract the dword at the current read position

Implements chunck.

Definition at line 301 of file chunck.cpp.

short cont_chunck::get_short   throw (std::exception) [virtual]
 

extract the short at the current read position

Implements chunck.

Definition at line 287 of file chunck.cpp.

unsigned int cont_chunck::get_size   const throw () [virtual]
 

return the size of the chunck

Implements chunck.

Definition at line 228 of file chunck.cpp.

Referenced by sub_block().

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

return the type of the chunck

Implements chunck.

Definition at line 224 of file chunck.cpp.

References chunck::type.

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

extract the word at the current read position

Implements chunck.

Definition at line 294 of file chunck.cpp.

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

read some data for the current read position

Implements chunck.

Definition at line 268 of file chunck.cpp.

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

move the current read position inside the chunck

Implements chunck.

Definition at line 246 of file chunck.cpp.

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

extract a subchunck from the current read position

Implements chunck.

Definition at line 232 of file chunck.cpp.

References get_size(), and chunck::type.

unsigned int cont_chunck::tell   const throw () [virtual]
 

get the chunck current read position

Implements chunck.

Definition at line 242 of file chunck.cpp.


Member Data Documentation

unsigned int cont_chunck::_cur_pos [private]
 

Definition at line 105 of file chunck.h.

char* cont_chunck::_data [private]
 

Definition at line 102 of file chunck.h.

unsigned int cont_chunck::_size [private]
 

Definition at line 104 of file chunck.h.

chunck::type cont_chunck::_type [private]
 

Definition at line 103 of file chunck.h.


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