|
libebml_ng
|
Represents a parsed EBML string segment. More...
#include <string.h>
Classes | |
| class | iterator |
| Iterator for parseString objects. More... | |
Public Member Functions | |
| parseString () | |
| parseString (const parseString &) | |
| parseString (parseString &&) | |
| parseString & | operator= (const parseString &) |
| parseString & | operator= (parseString &&) |
| parseString (const char *, size_t) | |
| Construct from a raw buffer. More... | |
| parseString (const char *, size_t, off_t) | |
| Construct from a raw buffer with an offset parameter. More... | |
| parseString (ebmlID_t, vintWidth_t, size_t, vintWidth_t, off_t, const char *) | |
| Main constructor that initializes all fields. More... | |
| parseString (const parseFile &, char *) | |
| Construct a parseString directly from a parseFile object. More... | |
| parseString::iterator | begin () const |
| Returns an iterator to the beginning of the contained EBML elements. More... | |
| unsigned long long | outerSize () const |
| Returns the outer size (header + data) of the element. More... | |
| template<typename T > | |
| T | unpack () const |
| Template method to unpack data from the element's payload. More... | |
Public Attributes | |
| ebmlID_t | ebmlID |
| vintWidth_t | ebmlIDWidth |
| size_t | dataSize |
| vintWidth_t | sizeWidth |
| off_t | offset |
| const char * | data |
| parseString * | parent |
Represents a parsed EBML string segment.
A parseString holds the parsed details for an EBML element extracted from a raw buffer. It stores the EBML ID, the widths used for encoding, the size of the data, and a pointer into the raw data. It may also reference a "parent" parseString for nested elements.
Public members:
It also defines an iterator for sequential parsing of nested EBML elements.
| ebml::parseString::parseString | ( | ) |
| ebml::parseString::parseString | ( | const parseString & | other | ) |
| ebml::parseString::parseString | ( | parseString && | other | ) |
| ebml::parseString::parseString | ( | const char * | data, |
| size_t | size | ||
| ) |
Construct from a raw buffer.
| data | Pointer to raw data containing EBML element. |
| size | Total number of bytes available in the data. |
| ebml::parseString::parseString | ( | const char * | data, |
| size_t | size, | ||
| off_t | offset | ||
| ) |
Construct from a raw buffer with an offset parameter.
| data | Pointer to raw data. |
| size | Total size in bytes. |
| offset | Offset relative to the parent element. |
| ebml::parseString::parseString | ( | ebmlID_t | , |
| vintWidth_t | , | ||
| size_t | , | ||
| vintWidth_t | , | ||
| off_t | , | ||
| const char * | |||
| ) |
Main constructor that initializes all fields.
| ebmlID | The EBML ID. |
| ebmlIDWidth | Number of bytes used to encode ebmlID. |
| dataSize | Size of the element data in bytes. |
| sizeWidth | Number of bytes used to encode dataSize. |
| offset | Offset relative to the containing parent's data. |
| data | Pointer to the actual element data. |
| ebml::parseString::parseString | ( | const parseFile & | parsed, |
| char * | buffer | ||
| ) |
Construct a parseString directly from a parseFile object.
| parsed | A parseFile object. |
| buffer | A character buffer to hold the data. |
| parseString::iterator ebml::parseString::begin | ( | ) | const |
Returns an iterator to the beginning of the contained EBML elements.
This iterator walks through the child elements contained in the data.
| parseString & ebml::parseString::operator= | ( | const parseString & | other | ) |
| parseString & ebml::parseString::operator= | ( | parseString && | other | ) |
| unsigned long long ebml::parseString::outerSize | ( | ) | const |
Returns the outer size (header + data) of the element.
|
inline |
Template method to unpack data from the element's payload.
This function calls the global function ebml::unpack<T>() on the element's data.
| T | The target type to unpack. |
| const char* ebml::parseString::data |
Pointer to the beginning of the element data.
| size_t ebml::parseString::dataSize |
The size (in bytes) of the element data.
| ebmlID_t ebml::parseString::ebmlID |
The EBML ID for the element.
| vintWidth_t ebml::parseString::ebmlIDWidth |
The width (in bytes) of the EBML ID.
| off_t ebml::parseString::offset |
Offset relative to start of parent data.
| parseString* ebml::parseString::parent |
Pointer to the parent parseString (if any).
| vintWidth_t ebml::parseString::sizeWidth |
The width (in bytes) of the size field.
1.8.14