#include <chunck.h>
Inheritance diagram for cont_chunck:
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 | |
chunck * | sub_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 |
This class is an implementation of chunck that handles a memory buffer.
Definition at line 100 of file chunck.h.
|
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(). |
|
Definition at line 208 of file chunck.cpp. References from_big_endian(). |
|
convert a type to a string Utility function that convert a type to a 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(). |
|
is the chunck completely read ?
Implements chunck. Definition at line 238 of file chunck.cpp. |
|
extract the byte at the current read position
Implements chunck. Definition at line 280 of file chunck.cpp. |
|
extract the character at the current read position
Implements chunck. Definition at line 275 of file chunck.cpp. |
|
extract the dword at the current read position
Implements chunck. Definition at line 301 of file chunck.cpp. |
|
extract the short at the current read position
Implements chunck. Definition at line 287 of file chunck.cpp. |
|
return the size of the chunck
Implements chunck. Definition at line 228 of file chunck.cpp. Referenced by sub_block(). |
|
return the type of the chunck
Implements chunck. Definition at line 224 of file chunck.cpp. References chunck::type. |
|
extract the word at the current read position
Implements chunck. Definition at line 294 of file chunck.cpp. |
|
read some data for the current read position
Implements chunck. Definition at line 268 of file chunck.cpp. |
|
move the current read position inside the chunck
Implements chunck. Definition at line 246 of file chunck.cpp. |
|
extract a subchunck from the current read position
Implements chunck. Definition at line 232 of file chunck.cpp. References get_size(), and chunck::type. |
|
get the chunck current read position
Implements chunck. Definition at line 242 of file chunck.cpp. |
|
|
|
|
|
|
|
|