Tawara
0.1.0
|
The EBML Header element. More...
#include <tawara/ebml_element.h>
Public Member Functions | |
EBMLElement (std::string const &doc_type="tawara") | |
Create a new Element. More... | |
virtual | ~EBMLElement () |
Destructor. More... | |
unsigned int | version () const |
Get the EBML version. More... | |
unsigned int | read_version () const |
Get the EBML read version. More... | |
unsigned int | max_id_length () const |
Get the maximum ID length. More... | |
void | max_id_length (unsigned int max_id_length) |
Set the maximum ID length. More... | |
unsigned int | max_size_length () const |
Get the maximum size length. More... | |
void | max_size_length (unsigned int max_size_length) |
Set the maximum size length. More... | |
std::string | doc_type () const |
Get the document type. More... | |
void | doc_type (std::string doc_type) |
Set the document type. More... | |
unsigned int | doc_version () const |
Get the document type version. More... | |
void | doc_version (unsigned int doc_version) |
Set the document type version. More... | |
unsigned int | doc_read_version () const |
Get the minimum document type version to read. More... | |
void | doc_read_version (unsigned int doc_read_version) |
Set the minimum required document type version. 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... | |
void | set_defaults_ () |
Sets all child elements to their default values. 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 | |
UIntElement | ver_ |
EBML version. More... | |
UIntElement | read_ver_ |
EBML minimum-version-to-read. More... | |
UIntElement | max_id_length_ |
Maximum ID length in bytes. More... | |
UIntElement | max_size_length_ |
Maximum size length in bytes. More... | |
StringElement | doc_type_ |
EBML document type. More... | |
UIntElement | doc_type_ver_ |
Document type version. More... | |
UIntElement | doc_type_read_ver_ |
Minimum document type version necessary to read. More... | |
![]() | |
tawara::ids::ID | id_ |
std::streampos | offset_ |
The EBML Header element.
This is the Header element as defined in the EBML RFC draft. It is required to be the first element in an EBML document.
The header defines various meta-data about the EBML document to follow.
Definition at line 63 of file ebml_element.h.
tawara::EBMLElement::EBMLElement | ( | std::string const & | doc_type = "tawara" | ) |
Create a new Element.
[in] | doc_type | The DocType that will be created. When reading, if it is blank, it will be populated. If it is not blank, then the value in the file will be checked against the value specified here and IncorrectDocType will be thrown if they do not match. |
|
inlinevirtual |
Destructor.
Definition at line 77 of file ebml_element.h.
|
protectedvirtual |
Get the size of the body of this element.
Implements tawara::Element.
|
inline |
Get the minimum document type version to read.
This is the minimum document type version that must be readable for a Tawara parser to read this file.
Definition at line 134 of file ebml_element.h.
|
inline |
Set the minimum required document type version.
Definition at line 137 of file ebml_element.h.
|
inline |
Get the document type.
The document type is the type of EBML document that is read or written.
Definition at line 118 of file ebml_element.h.
|
inline |
Set the document type.
Definition at line 120 of file ebml_element.h.
|
inline |
Get the document type version.
This is the version of the document type contained in the file.
Definition at line 125 of file ebml_element.h.
|
inline |
Set the document type version.
Definition at line 127 of file ebml_element.h.
|
inline |
Get the maximum ID length.
This is the maximum length of IDs that can be used in a file with this header.
Definition at line 98 of file ebml_element.h.
|
inline |
Set the maximum ID length.
Definition at line 101 of file ebml_element.h.
|
inline |
Get the maximum size length.
This is the maximum number of bytes that can be used for an element size in a file with this header.
Definition at line 108 of file ebml_element.h.
|
inline |
Set the maximum size length.
Definition at line 111 of file ebml_element.h.
|
protectedvirtual |
Element body loading.
Implements tawara::Element.
|
inline |
Get the EBML read version.
This property gives the minimum EBML parser version necessary to read the file. It is set internally by the Tawara EBML parser, and read from the file.
Definition at line 92 of file ebml_element.h.
|
protected |
Sets all child elements to their default values.
|
inline |
Get the EBML version.
The EBML version is the version of the parser used to create the file. It is set internally by the Tawara EBML parser, and read from the file.
Definition at line 85 of file ebml_element.h.
|
virtual |
Element body writing.
Implements tawara::Element.
|
protected |
EBML document type.
Definition at line 153 of file ebml_element.h.
|
protected |
Minimum document type version necessary to read.
Definition at line 157 of file ebml_element.h.
|
protected |
Document type version.
Definition at line 155 of file ebml_element.h.
|
protected |
Maximum ID length in bytes.
Definition at line 149 of file ebml_element.h.
|
protected |
Maximum size length in bytes.
Definition at line 151 of file ebml_element.h.
|
protected |
EBML minimum-version-to-read.
Definition at line 147 of file ebml_element.h.
|
protected |
EBML version.
Definition at line 145 of file ebml_element.h.