39 #if !defined(TAWARA_EBML_ELEMENT_H_)
40 #define TAWARA_EBML_ELEMENT_H_
85 unsigned int version()
const {
return ver_.value(); }
99 {
return max_id_length_.value(); }
102 { max_id_length_.value(max_id_length); }
109 {
return max_size_length_.value(); }
112 { max_size_length_.value(max_size_length); }
118 std::string
doc_type()
const {
return doc_type_.value(); }
120 void doc_type(std::string doc_type) { doc_type_.value(doc_type); }
125 unsigned int doc_version()
const {
return doc_type_ver_.value(); }
128 { doc_type_ver_.value(doc_version); }
135 {
return doc_type_read_ver_.value(); }
138 { doc_type_read_ver_.value(doc_read_version); }
141 virtual std::streamsize write_body(std::ostream& output);
160 virtual std::streamsize body_size()
const;
163 virtual std::streamsize read_body(std::istream& input,
164 std::streamsize
size);
167 void set_defaults_();
174 #endif // TAWARA_EBML_ELEMENT_H_
unsigned int read_version() const
Get the EBML read version.
UIntElement doc_type_ver_
Document type version.
virtual ~EBMLElement()
Destructor.
void doc_type(std::string doc_type)
Set the document type.
unsigned int doc_version() const
Get the document type version.
unsigned int version() const
Get the EBML version.
std::streamsize size(ID id)
Get the number of bytes required by an ID.
void doc_version(unsigned int doc_version)
Set the document type version.
UIntElement read_ver_
EBML minimum-version-to-read.
unsigned int max_id_length() const
Get the maximum ID length.
UIntElement ver_
EBML version.
The MasterElement interface.
UIntElement max_id_length_
Maximum ID length in bytes.
void max_id_length(unsigned int max_id_length)
Set the maximum ID length.
Unsigned integer primitive element.
String primitive element.
std::string doc_type() const
Get the document type.
UIntElement doc_type_read_ver_
Minimum document type version necessary to read.
UIntElement max_size_length_
Maximum size length in bytes.
unsigned int doc_read_version() const
Get the minimum document type version to read.
StringElement doc_type_
EBML document type.
void doc_read_version(unsigned int doc_read_version)
Set the minimum required document type version.
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.