|
libebml_ng
|
Abstract base class for EBML Element Type objects. More...
#include <ebmlElementType.h>
Public Member Functions | |||||||||||
| ebmlElementType (const char *ebmlID, const std::wstring &name) | |||||||||||
| Constructor taking an EBML ID as a VINT string and an element name. More... | |||||||||||
| ebmlElementType (const char *ebmlID, const std::wstring &name, const seekHelper_t *seekHelper) | |||||||||||
| ebmlElementType (ebmlID_t ebmlID, const std::wstring &name) | |||||||||||
| Constructor taking an EBML ID as an unsigned integer and an element name. More... | |||||||||||
| ebmlElementType (ebmlID_t ebmlID, const std::wstring &name, const seekHelper_t *seekHelper) | |||||||||||
| ebml::ptr< ebmlElement > | operator() () const | ||||||||||
| Factory operator to create a default EBML element instance. More... | |||||||||||
| seekMapBase * | initSeekMap () const | ||||||||||
| seekData_t * | makeSeekData (const parseString &) const | ||||||||||
| seekData_t * | makeSeekData (const parseString &, const ebmlMasterElement_wp &) const | ||||||||||
| seekData_t * | makeSeekData (const parseString &, ebmlMasterElement_wp &&) const | ||||||||||
| seekData_t * | makeSeekData (const parseFile &) const | ||||||||||
| seekData_t * | makeSeekData (const parseFile &, const ebmlMasterElement_wp &) const | ||||||||||
| seekData_t * | makeSeekData (const parseFile &, ebmlMasterElement_wp &&) const | ||||||||||
| template<typename T = ebmlElementType> | |||||||||||
| T & | as () | ||||||||||
| template<typename T = ebmlElementType> | |||||||||||
| T & | as () const | ||||||||||
| virtual std::wstring | minirepr () const | ||||||||||
| std::wstring | repr () const | ||||||||||
Decode Functions | |||||||||||
Decode functions for various input types.
| |||||||||||
| ebml::ptr< ebmlElement > | decode (const parseString &) const | ||||||||||
Decode element from ebml::parseString instance. More... | |||||||||||
| ebml::ptr< ebmlElement > | decode (const parseFile &) const | ||||||||||
Decode and create a new EBML element instance from ebml::parseFile instance. More... | |||||||||||
| ebml::ptr< ebmlElement > | decode (const char *, size_t) const | ||||||||||
| Decode and create a new EBML element instance from a raw data buffer. More... | |||||||||||
| ebml::ptr< ebmlElement > | decode (const std::string &) const | ||||||||||
Decode and create a new EBML element instance from a std::string instance. More... | |||||||||||
| ebml::ptr< ebmlElement > | decode (ioBase &) const | ||||||||||
Decode and create a new EBML element instance from ebml::ioBase instance at the current file position. More... | |||||||||||
| ebml::ptr< ebmlElement > | decode (ioBase &, off_t &) const | ||||||||||
Decode and create a new EBML element instance from ebml::ioBase instance with a specified offset. More... | |||||||||||
| ebml::ptr< ebmlElement > | decode (ioBase &, off_t, off_t &) const | ||||||||||
Decode from ebml::ioBase instance with a specified offset and store the end offset. More... | |||||||||||
| ebml::ptr< const ebmlElement > | cdecode (const parseString &) const | ||||||||||
| ebml::ptr< const ebmlElement > | cdecode (const parseFile &) const | ||||||||||
| ebml::ptr< const ebmlElement > | cdecode (const char *, size_t) const | ||||||||||
| ebml::ptr< const ebmlElement > | cdecode (const std::string &) const | ||||||||||
| ebml::ptr< const ebmlElement > | cdecode (ioBase &) const | ||||||||||
| ebml::ptr< const ebmlElement > | cdecode (ioBase &, off_t &offset) const | ||||||||||
| ebml::ptr< const ebmlElement > | cdecode (ioBase &, off_t offset, off_t &end) const | ||||||||||
Public Attributes | |
| ebmlID_t | ebmlID |
| EBML ID associated with this element type. More... | |
| std::wstring | name |
| Name (as a wide string) of the element type. More... | |
| const seekHelper_t * | _seekHelper = &seekHelper |
Protected Member Functions | |||
| virtual ebmlElement * | _new () const =0 | ||
| Create a default instance of an EBML element. More... | |||
Decode Functions (virtual) | |||
These functions perform the decoding assuming preliminary EBML ID checks have passed.
| |||
| virtual ebmlElement * | _decode_v (const parseString &) const =0 | ||
| virtual ebmlElement * | _decode_v (const parseFile &) const =0 | ||
| virtual ebmlElement * | _cdecode_v (const parseString &) const =0 | ||
| virtual ebmlElement * | _cdecode_v (const parseFile &) const =0 | ||
Decode Functions (No Check) | |||
These functions wrap around the virtual These functions can be used by friend classes if a manual EBML type check is performed before decoding (as is done with | |||
| ebmlElement * | _decode_nocheck (const parseString &parsed) const | ||
Decode element from ebml::parseString instance. More... | |||
| ebmlElement * | _decode_nocheck (const parseFile &parsed) const | ||
Decode element from ebml::parseFile instance. More... | |||
| ebmlElement * | _cdecode_nocheck (const parseString &parsed) const | ||
| ebmlElement * | _cdecode_nocheck (const parseFile &parsed) const | ||
Protected Decode Functions | |||
Decode functions for various input types. These functions perform EBML type checks and call
| |||
| ebmlElement * | _decode (const parseString &) const | ||
Decode element from ebml::parseString instance. More... | |||
| ebmlElement * | _decode (const parseFile &) const | ||
Decode and create a new EBML element instance from ebml::parseFile instance. More... | |||
| ebmlElement * | _decode (const char *, size_t) const | ||
| Decode from a raw data buffer. More... | |||
| ebmlElement * | _decode (const std::string &) const | ||
Decode from std::string. More... | |||
| ebmlElement * | _decode (ioBase &) const | ||
Decode and create a new EBML element instance from ebml::ioBase instance at the current file position. More... | |||
| ebmlElement * | _decode (ioBase &, off_t &) const | ||
Decode and create a new EBML element instance from ebml::ioBase instance with a specified offset. More... | |||
| ebmlElement * | _decode (ioBase &, off_t, off_t &) const | ||
Decode from ebml::ioBase instance with a specified offset and store the end offset. More... | |||
| ebmlElement * | _cdecode (const parseString &) const | ||
| ebmlElement * | _cdecode (const parseFile &) const | ||
| ebmlElement * | _cdecode (const char *, size_t) const | ||
| ebmlElement * | _cdecode (const std::string &) const | ||
| ebmlElement * | _cdecode (ioBase &) const | ||
| ebmlElement * | _cdecode (ioBase &, off_t &offset) const | ||
| ebmlElement * | _cdecode (ioBase &, off_t offset, off_t &end) const | ||
Friends | |
| class | ebmlElement |
| class | ebmlMasterElementType |
Abstract base class for EBML Element Type objects.
Abstract base class for EBML Element Type objects. Every subclass of ebmlElementType must have a companion subclass of ebmlElement declared as a friend class.
Instances of ebmlElementType are constructed using an EBML ID, either as an ebmlID_t (unsigned long long) or as a VINT (const char*), and a class name (unicode string).
This class declares these abstract member functions:
ebmlElement* _new() const,ebmlElement* _decode_v(const parseString&) const,ebmlElement* _decode_v(const parseFile&) const,ebmlElement* _cdecode_v(const parseString&) const, andebmlElement* _cdecode_v(const parseFile&) const.If you are creating an element type that encapsulates a basic data type T, consider deriving from ebml::ebmlDataType<T> and ebml::ebmlDataElement<T>.
If creating an element type that encapsulates other EBML elements, please see ebml::ebmlMasterElementType and ebml::ebmlMasterElement.
If you wish to subclass this (and ebml::ebmlElement), consider deriving directly from ebml::ebmlTypeCRTP<ebmltype_t, ebmlinst_t, typebase_t> and ebml::ebmlElementCRTP<ebmltype_t, ebmlinst_t, instbase_t>.
ebml::ebmlTypeCRTP<ebmltype_t, ebmlinst_t, typebase_t>
|
inline |
Constructor taking an EBML ID as a VINT string and an element name.
| ebmlID | VINT string representing the EBML ID. |
| name | The name of the EBML element type. |
|
inline |
|
inline |
Constructor taking an EBML ID as an unsigned integer and an element name.
| ebmlID | The EBML ID value. |
| name | The name of the EBML element type. |
|
inline |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protectedpure virtual |
Implemented in ebml::ebmlTypeCRTP< ebmlMapType< K, V, H, E, A, B >, ebmlMap< K, V, H, E, A, B >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlVoidType, ebmlVoid >, ebml::ebmlTypeCRTP< ebmlMasterElementType, ebmlMasterElement >, ebml::ebmlTypeCRTP< ebmlDataType< const T >, ebmlDataElement< const T > >, ebml::ebmlTypeCRTP< ebmlPairType< const K, V >, ebmlPair< const K, V >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlLazyLoadType, ebmlLazyLoad, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlPairType< K, V >, ebmlPair< K, V >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlStructType, ebmlStruct, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlDataType< T >, ebmlDataElement< T > >, and ebml::ebmlTypeCRTP< ebmlListType, ebmlList, ebmlMasterElementType >.
|
protectedpure virtual |
Implemented in ebml::ebmlTypeCRTP< ebmlMapType< K, V, H, E, A, B >, ebmlMap< K, V, H, E, A, B >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlVoidType, ebmlVoid >, ebml::ebmlTypeCRTP< ebmlMasterElementType, ebmlMasterElement >, ebml::ebmlTypeCRTP< ebmlDataType< const T >, ebmlDataElement< const T > >, ebml::ebmlTypeCRTP< ebmlPairType< const K, V >, ebmlPair< const K, V >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlLazyLoadType, ebmlLazyLoad, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlPairType< K, V >, ebmlPair< K, V >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlStructType, ebmlStruct, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlDataType< T >, ebmlDataElement< T > >, and ebml::ebmlTypeCRTP< ebmlListType, ebmlList, ebmlMasterElementType >.
|
inlineprotected |
Decode element from ebml::parseString instance.
| parsed | The parsed EBML string. |
ebml::ebmlElement instance.
|
inlineprotected |
Decode and create a new EBML element instance from ebml::parseFile instance.
| parsed | Parsing information parsed from an IO file. |
ebml::ebmlElement instance.
|
inlineprotected |
Decode from a raw data buffer.
| data | Pointer to the data buffer. |
| size | Number of bytes in the data buffer.. |
ebml::ebmlElement instance.
|
inlineprotected |
Decode from std::string.
| data | String data. |
ebml::ebmlElement instance.
|
inlineprotected |
Decode and create a new EBML element instance from ebml::ioBase instance at the current file position.
| file | File object. |
ebml::ebmlElement instance.
|
inlineprotected |
Decode and create a new EBML element instance from ebml::ioBase instance with a specified offset.
| file | File object. |
| offset | Location of start of data in file. |
ebml::ebmlElement instance.
|
inlineprotected |
Decode from ebml::ioBase instance with a specified offset and store the end offset.
| file | File object. |
| offset | Location of start of data in file. |
| endOffset | Reference to variable to set end offset. |
ebml::ebmlElement instance.
|
inlineprotected |
Decode element from ebml::parseString instance.
| parsed | The parsed EBML string. |
|
inlineprotected |
Decode element from ebml::parseFile instance.
| parsed | The parsed file data. |
|
protectedpure virtual |
Implemented in ebml::ebmlTypeCRTP< ebmlMapType< K, V, H, E, A, B >, ebmlMap< K, V, H, E, A, B >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlVoidType, ebmlVoid >, ebml::ebmlTypeCRTP< ebmlMasterElementType, ebmlMasterElement >, ebml::ebmlTypeCRTP< ebmlDataType< const T >, ebmlDataElement< const T > >, ebml::ebmlTypeCRTP< ebmlPairType< const K, V >, ebmlPair< const K, V >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlLazyLoadType, ebmlLazyLoad, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlPairType< K, V >, ebmlPair< K, V >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlStructType, ebmlStruct, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlDataType< T >, ebmlDataElement< T > >, and ebml::ebmlTypeCRTP< ebmlListType, ebmlList, ebmlMasterElementType >.
|
protectedpure virtual |
Implemented in ebml::ebmlTypeCRTP< ebmlMapType< K, V, H, E, A, B >, ebmlMap< K, V, H, E, A, B >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlVoidType, ebmlVoid >, ebml::ebmlTypeCRTP< ebmlMasterElementType, ebmlMasterElement >, ebml::ebmlTypeCRTP< ebmlDataType< const T >, ebmlDataElement< const T > >, ebml::ebmlTypeCRTP< ebmlPairType< const K, V >, ebmlPair< const K, V >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlLazyLoadType, ebmlLazyLoad, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlPairType< K, V >, ebmlPair< K, V >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlStructType, ebmlStruct, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlDataType< T >, ebmlDataElement< T > >, and ebml::ebmlTypeCRTP< ebmlListType, ebmlList, ebmlMasterElementType >.
|
protectedpure virtual |
Create a default instance of an EBML element.
Implemented in ebml::ebmlTypeCRTP< ebmlMapType< K, V, H, E, A, B >, ebmlMap< K, V, H, E, A, B >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlVoidType, ebmlVoid >, ebml::ebmlTypeCRTP< ebmlMasterElementType, ebmlMasterElement >, ebml::ebmlTypeCRTP< ebmlDataType< const T >, ebmlDataElement< const T > >, ebml::ebmlTypeCRTP< ebmlPairType< const K, V >, ebmlPair< const K, V >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlLazyLoadType, ebmlLazyLoad, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlPairType< K, V >, ebmlPair< K, V >, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlStructType, ebmlStruct, ebmlMasterElementType >, ebml::ebmlTypeCRTP< ebmlDataType< T >, ebmlDataElement< T > >, and ebml::ebmlTypeCRTP< ebmlListType, ebmlList, ebmlMasterElementType >.
|
inline |
Convenience member function that dynamically casts ebmlElementType to a subclass.
Example:
| std::bad_cast | If instance is not an instance of T. |
|
inline |
Convenience member function that dynamically casts const ebmlElementType to a subclass.
Example:
| std::bad_cast | If instance is not an instance of T. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Decode element from ebml::parseString instance.
| parsed | The parsed EBML string. |
ebml::ebmlElement instance.
|
inline |
Decode and create a new EBML element instance from ebml::parseFile instance.
| parsed | Parsing information parsed from an IO file. |
ebml::ebmlElement instance.
|
inline |
Decode and create a new EBML element instance from a raw data buffer.
| data | Pointer to the data buffer. |
| size | Number of bytes in the data buffer. |
ebml::ebmlElement instance.
|
inline |
Decode and create a new EBML element instance from a std::string instance.
| data | String data. |
ebml::ebmlElement instance.
|
inline |
Decode and create a new EBML element instance from ebml::ioBase instance at the current file position.
| file | File object. |
ebml::ebmlElement instance.
|
inline |
Decode and create a new EBML element instance from ebml::ioBase instance with a specified offset.
| file | File object. |
| offset | Location of start of data in file. |
ebml::ebmlElement instance.
|
inline |
Decode from ebml::ioBase instance with a specified offset and store the end offset.
| file | File object. |
| offset | Location of start of data in file. |
| endOffset | Reference to variable to set end offset. |
ebml::ebmlElement instance. | seekMapBase * ebml::ebmlElementType::initSeekMap | ( | ) | const |
| seekData_t * ebml::ebmlElementType::makeSeekData | ( | const parseString & | parsed | ) | const |
| seekData_t * ebml::ebmlElementType::makeSeekData | ( | const parseString & | parsed, |
| const ebmlMasterElement_wp & | parent | ||
| ) | const |
| seekData_t * ebml::ebmlElementType::makeSeekData | ( | const parseString & | parsed, |
| ebmlMasterElement_wp && | parent | ||
| ) | const |
| seekData_t * ebml::ebmlElementType::makeSeekData | ( | const parseFile & | parsed | ) | const |
| seekData_t * ebml::ebmlElementType::makeSeekData | ( | const parseFile & | parsed, |
| const ebmlMasterElement_wp & | parent | ||
| ) | const |
| seekData_t * ebml::ebmlElementType::makeSeekData | ( | const parseFile & | parsed, |
| ebmlMasterElement_wp && | parent | ||
| ) | const |
|
virtual |
|
inline |
Factory operator to create a default EBML element instance.
Internally, this calls the protected _new() function.
| std::wstring ebml::ebmlElementType::repr | ( | ) | const |
|
friend |
|
friend |
| const seekHelper_t* ebml::ebmlElementType::_seekHelper = &seekHelper |
| ebmlID_t ebml::ebmlElementType::ebmlID |
EBML ID associated with this element type.
| std::wstring ebml::ebmlElementType::name |
Name (as a wide string) of the element type.
1.8.14