Tawara  0.1.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tawara::SeekElement Class Reference

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

#include <tawara/seek_element.h>

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

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...
 
- Public Member Functions inherited from tawara::MasterElement
 MasterElement (uint32_t id, bool crc=false)
 Create a new MasterElement. More...
 
virtual ~MasterElement ()
 Destructor. More...
 
- Public Member Functions inherited from tawara::Element
 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...
 
- Protected Member Functions inherited from tawara::Element
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_
 
- Protected Attributes inherited from tawara::Element
tawara::ids::ID id_
 
std::streampos 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 62 of file seek_element.h.

Constructor & Destructor Documentation

tawara::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 tawara::SeekElement::~SeekElement ( )
inlinevirtual

Destructor.

Definition at line 75 of file seek_element.h.

Member Function Documentation

virtual std::streamsize tawara::SeekElement::body_size ( ) const
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.

std::streamsize tawara::SeekElement::offset ( ) const
inline

Get the offset of the indexed ID.

Definition at line 83 of file seek_element.h.

void tawara::SeekElement::offset ( std::streamsize  offset)
inline

Set the offset of the indexed ID.

Definition at line 85 of file seek_element.h.

virtual std::streamsize tawara::SeekElement::read_body ( std::istream &  input,
std::streamsize  size 
)
protectedvirtual

Element body loading.

Implements tawara::Element.

virtual std::streamsize tawara::SeekElement::write_body ( std::ostream &  output)
virtual

Element body writing.

Implements tawara::Element.

Member Data Documentation

BinaryElement tawara::SeekElement::indexed_id_
protected

Definition at line 91 of file seek_element.h.

UIntElement tawara::SeekElement::offset_
protected

Definition at line 92 of file seek_element.h.


The documentation for this class was generated from the following file: