Tide 0.1.0
|
The Seek element, which contains a single index point in the SeekHead element. More...
#include <tide/seek_element.h>
Public Member Functions | |
SeekElement (ids::ID id, std::streampos offset) | |
Create a new Seek element. | |
virtual | ~SeekElement () |
Destructor. | |
ids::ID | indexed_id () const |
Get the ID that is indexed by this Seek element. | |
void | indexed_id (ids::ID id) |
Set the ID that is indexed. | |
std::streamsize | offset () const |
Get the offset of the indexed ID. | |
void | offset (std::streamsize offset) |
Set the offset of the indexed ID. | |
virtual std::streamsize | write_body (std::ostream &output) |
Element body writing. | |
Protected Member Functions | |
virtual std::streamsize | body_size () const |
Get the size of the body of this element. | |
virtual std::streamsize | read_body (std::istream &input, std::streamsize size) |
Element body loading. | |
Protected Attributes | |
BinaryElement | indexed_id_ |
UIntElement | 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 51 of file seek_element.h.
tide::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. |
virtual tide::SeekElement::~SeekElement | ( | ) | [inline, virtual] |
Destructor.
Definition at line 64 of file seek_element.h.
virtual std::streamsize tide::SeekElement::body_size | ( | ) | const [protected, virtual] |
Get the size of the body of this element.
Implements tide::Element.
void tide::SeekElement::indexed_id | ( | ids::ID | id | ) |
Set the ID that is indexed.
ids::ID tide::SeekElement::indexed_id | ( | ) | const |
Get the ID that is indexed by this Seek element.
void tide::SeekElement::offset | ( | std::streamsize | offset | ) | [inline] |
Set the offset of the indexed ID.
Definition at line 74 of file seek_element.h.
std::streamsize tide::SeekElement::offset | ( | ) | const [inline] |
Get the offset of the indexed ID.
Reimplemented from tide::Element.
Definition at line 72 of file seek_element.h.
virtual std::streamsize tide::SeekElement::read_body | ( | std::istream & | input, |
std::streamsize | size | ||
) | [protected, virtual] |
Element body loading.
Implements tide::Element.
virtual std::streamsize tide::SeekElement::write_body | ( | std::ostream & | output | ) | [virtual] |
Element body writing.
Implements tide::Element.
BinaryElement tide::SeekElement::indexed_id_ [protected] |
Definition at line 80 of file seek_element.h.
UIntElement tide::SeekElement::offset_ [protected] |
Reimplemented from tide::Element.
Definition at line 81 of file seek_element.h.