Tide 0.1.0
|
The EBML Header element. More...
#include <tide/ebml_element.h>
Public Member Functions | |
EBMLElement (std::string const &doc_type="tide") | |
Create a new Element. | |
virtual | ~EBMLElement () |
Destructor. | |
unsigned int | version () const |
Get the EBML version. | |
unsigned int | read_version () const |
Get the EBML read version. | |
unsigned int | max_id_length () const |
Get the maximum ID length. | |
void | max_id_length (unsigned int max_id_length) |
Set the maximum ID length. | |
unsigned int | max_size_length () const |
Get the maximum size length. | |
void | max_size_length (unsigned int max_size_length) |
Set the maximum size length. | |
std::string | doc_type () const |
Get the document type. | |
void | doc_type (std::string doc_type) |
Set the document type. | |
unsigned int | doc_version () const |
Get the document type version. | |
void | doc_version (unsigned int doc_version) |
Set the document type version. | |
unsigned int | doc_read_version () const |
Get the minimum document type version to read. | |
void | doc_read_version (unsigned int doc_read_version) |
Set the minimum required document type version. | |
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. | |
void | set_defaults_ () |
Sets all child elements to their default values. | |
Protected Attributes | |
UIntElement | ver_ |
EBML version. | |
UIntElement | read_ver_ |
EBML minimum-version-to-read. | |
UIntElement | max_id_length_ |
Maximum ID length in bytes. | |
UIntElement | max_size_length_ |
Maximum size length in bytes. | |
StringElement | doc_type_ |
EBML document type. | |
UIntElement | doc_type_ver_ |
Document type version. | |
UIntElement | doc_type_read_ver_ |
Minimum document type version necessary to read. |
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 52 of file ebml_element.h.
tide::EBMLElement::EBMLElement | ( | std::string const & | doc_type = "tide" | ) |
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. |
virtual tide::EBMLElement::~EBMLElement | ( | ) | [inline, virtual] |
Destructor.
Definition at line 66 of file ebml_element.h.
virtual std::streamsize tide::EBMLElement::body_size | ( | ) | const [protected, virtual] |
Get the size of the body of this element.
Implements tide::Element.
unsigned int tide::EBMLElement::doc_read_version | ( | ) | const [inline] |
Get the minimum document type version to read.
This is the minimum document type version that must be readable for a Tide parser to read this file.
Definition at line 123 of file ebml_element.h.
void tide::EBMLElement::doc_read_version | ( | unsigned int | doc_read_version | ) | [inline] |
Set the minimum required document type version.
Definition at line 126 of file ebml_element.h.
std::string tide::EBMLElement::doc_type | ( | ) | const [inline] |
Get the document type.
The document type is the type of EBML document that is read or written.
Definition at line 107 of file ebml_element.h.
void tide::EBMLElement::doc_type | ( | std::string | doc_type | ) | [inline] |
Set the document type.
Definition at line 109 of file ebml_element.h.
unsigned int tide::EBMLElement::doc_version | ( | ) | const [inline] |
Get the document type version.
This is the version of the document type contained in the file.
Definition at line 114 of file ebml_element.h.
void tide::EBMLElement::doc_version | ( | unsigned int | doc_version | ) | [inline] |
Set the document type version.
Definition at line 116 of file ebml_element.h.
void tide::EBMLElement::max_id_length | ( | unsigned int | max_id_length | ) | [inline] |
Set the maximum ID length.
Definition at line 90 of file ebml_element.h.
unsigned int tide::EBMLElement::max_id_length | ( | ) | const [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 87 of file ebml_element.h.
unsigned int tide::EBMLElement::max_size_length | ( | ) | const [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 97 of file ebml_element.h.
void tide::EBMLElement::max_size_length | ( | unsigned int | max_size_length | ) | [inline] |
Set the maximum size length.
Definition at line 100 of file ebml_element.h.
virtual std::streamsize tide::EBMLElement::read_body | ( | std::istream & | input, |
std::streamsize | size | ||
) | [protected, virtual] |
Element body loading.
Implements tide::Element.
unsigned int tide::EBMLElement::read_version | ( | ) | const [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 Tide EBML parser, and read from the file.
Definition at line 81 of file ebml_element.h.
void tide::EBMLElement::set_defaults_ | ( | ) | [protected] |
Sets all child elements to their default values.
unsigned int tide::EBMLElement::version | ( | ) | const [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 Tide EBML parser, and read from the file.
Definition at line 74 of file ebml_element.h.
virtual std::streamsize tide::EBMLElement::write_body | ( | std::ostream & | output | ) | [virtual] |
Element body writing.
Implements tide::Element.
StringElement tide::EBMLElement::doc_type_ [protected] |
EBML document type.
Definition at line 142 of file ebml_element.h.
UIntElement tide::EBMLElement::doc_type_read_ver_ [protected] |
Minimum document type version necessary to read.
Definition at line 146 of file ebml_element.h.
UIntElement tide::EBMLElement::doc_type_ver_ [protected] |
Document type version.
Definition at line 144 of file ebml_element.h.
UIntElement tide::EBMLElement::max_id_length_ [protected] |
Maximum ID length in bytes.
Definition at line 138 of file ebml_element.h.
UIntElement tide::EBMLElement::max_size_length_ [protected] |
Maximum size length in bytes.
Definition at line 140 of file ebml_element.h.
UIntElement tide::EBMLElement::read_ver_ [protected] |
EBML minimum-version-to-read.
Definition at line 136 of file ebml_element.h.
UIntElement tide::EBMLElement::ver_ [protected] |
EBML version.
Definition at line 134 of file ebml_element.h.