Tide 0.1.0
Public Member Functions | Protected Member Functions | Protected Attributes

tide::SeekElement Class Reference

The Seek element, which contains a single index point in the SeekHead element. More...

#include <tide/seek_element.h>

Inheritance diagram for tide::SeekElement:
Inheritance graph
[legend]
Collaboration diagram for tide::SeekElement:
Collaboration graph
[legend]

List of all members.

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_

Detailed Description

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.


Constructor & Destructor Documentation

tide::SeekElement::SeekElement ( ids::ID  id,
std::streampos  offset 
)

Create a new Seek element.

Parameters:
[in]idThe element ID to index.
[in]offsetThe 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.


Member Function Documentation

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.


Member Data Documentation

Definition at line 80 of file seek_element.h.

Reimplemented from tide::Element.

Definition at line 81 of file seek_element.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines