#include <chunck.h>
Inheritance diagram for file_chunck:
Public Types | |
typedef unsigned int | type |
type of a chunck (i.e. The first 4byte field of the chunck structure). | |
Public Methods | |
file_chunck (const std::string &fname) throw (std::exception) | |
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 | |
Protected Methods | |
file_chunck () throw () | |
Private Attributes | |
file_ptr * | _data |
type | _type |
unsigned int | _size |
unsigned int | _offset |
unsigned int | _cur_pos |
This class is an implementation of chunck that handles file.
Definition at line 71 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(), cont_chunck::get_type(), get_type(), imuse_channel::processBuffer(), saud_channel::processBuffer(), and cont_chunck::sub_block(). |
|
Definition at line 67 of file chunck.cpp. |
|
Definition at line 73 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 116 of file chunck.cpp. Referenced by player::play(). |
|
extract the byte at the current read position
Implements chunck. Definition at line 163 of file chunck.cpp. |
|
extract the character at the current read position
Implements chunck. Definition at line 154 of file chunck.cpp. |
|
extract the dword at the current read position
Implements chunck. Definition at line 190 of file chunck.cpp. |
|
extract the short at the current read position
Implements chunck. Definition at line 172 of file chunck.cpp. |
|
return the size of the chunck
Implements chunck. Definition at line 96 of file chunck.cpp. Referenced by sub_block(). |
|
return the type of the chunck
Implements chunck. Definition at line 92 of file chunck.cpp. References chunck::type. |
|
extract the word at the current read position
Implements chunck. Definition at line 181 of file chunck.cpp. |
|
read some data for the current read position
Implements chunck. Definition at line 146 of file chunck.cpp. |
|
move the current read position inside the chunck
Implements chunck. Definition at line 124 of file chunck.cpp. |
|
extract a subchunck from the current read position
Implements chunck. Definition at line 100 of file chunck.cpp. References _cur_pos, _data, _offset, _size, _type, from_big_endian(), get_size(), and file_ptr::seek(). Referenced by player::play(). |
|
get the chunck current read position
Implements chunck. Definition at line 120 of file chunck.cpp. |
|
Definition at line 77 of file chunck.h. Referenced by sub_block(). |
|
Definition at line 73 of file chunck.h. Referenced by sub_block(). |
|
Definition at line 76 of file chunck.h. Referenced by sub_block(). |
|
Definition at line 75 of file chunck.h. Referenced by sub_block(). |
|
Definition at line 74 of file chunck.h. Referenced by sub_block(). |