Tawara
0.1.0
|
The Seek element, which contains a single index point in the SeekHead element. More...
#include <tawara/seek_element.h>
Public Member Functions | |
SeekElement (ids::ID id, std::streampos offset) | |
Create a new Seek element. More... | |
virtual | ~SeekElement () |
Destructor. More... | |
ids::ID | indexed_id () const |
Get the ID that is indexed by this Seek element. More... | |
void | indexed_id (ids::ID id) |
Set the ID that is indexed. More... | |
std::streamsize | offset () const |
Get the offset of the indexed ID. More... | |
void | offset (std::streamsize offset) |
Set the offset of the indexed ID. More... | |
virtual std::streamsize | write_body (std::ostream &output) |
Element body writing. More... | |
![]() | |
MasterElement (uint32_t id, bool crc=false) | |
Create a new MasterElement. More... | |
virtual | ~MasterElement () |
Destructor. More... | |
![]() | |
Element (tawara::ids::ID id) | |
Create a new Element. More... | |
virtual | ~Element () |
Destructor. More... | |
uint32_t | id () const |
Get the element's ID. More... | |
std::streampos | offset () const |
Get the element's offset in the byte stream. More... | |
virtual std::streamsize | size () const |
Get the total size of the element. More... | |
virtual std::streamsize | write (std::ostream &output) |
Element writing. More... | |
virtual std::streamsize | read (std::istream &input) |
Element reading. More... | |
Protected Member Functions | |
virtual std::streamsize | body_size () const |
Get the size of the body of this element. More... | |
virtual std::streamsize | read_body (std::istream &input, std::streamsize size) |
Element body loading. More... | |
![]() | |
std::streamsize | write_id (std::ostream &output) |
Element ID writing. More... | |
virtual std::streamsize | write_size (std::ostream &output) |
Element size writing. More... | |
Protected Attributes | |
BinaryElement | indexed_id_ |
UIntElement | offset_ |
![]() | |
tawara::ids::ID | id_ |
std::streampos | offset_ |
The Seek element, which contains a single index point in the SeekHead element.
The SeekHead (Metaseek) element is used as an index into the file's data stream, giving the byte offsets of other level 1 elements. A Seek element is a single index entry in the Metaseek. It stores the element ID and the byte offset of the element.
Definition at line 62 of file seek_element.h.
tawara::SeekElement::SeekElement | ( | ids::ID | id, |
std::streampos | offset | ||
) |
Create a new Seek element.
[in] | id | The element ID to index. |
[in] | offset | The position in the bytestream from the start of the segment to the element's ID. 0 for the first element in the segment. |
|
inlinevirtual |
Destructor.
Definition at line 75 of file seek_element.h.
|
protectedvirtual |
Get the size of the body of this element.
Implements tawara::Element.
ids::ID tawara::SeekElement::indexed_id | ( | ) | const |
Get the ID that is indexed by this Seek element.
void tawara::SeekElement::indexed_id | ( | ids::ID | id | ) |
Set the ID that is indexed.
|
inline |
Get the offset of the indexed ID.
Definition at line 83 of file seek_element.h.
|
inline |
Set the offset of the indexed ID.
Definition at line 85 of file seek_element.h.
|
protectedvirtual |
Element body loading.
Implements tawara::Element.
|
virtual |
Element body writing.
Implements tawara::Element.
|
protected |
Definition at line 91 of file seek_element.h.
|
protected |
Definition at line 92 of file seek_element.h.