|
| EbmlElement (MatroskaContainer &container, std::uint64_t startOffset) |
| Constructs a new top level element with the specified container at the specified startOffset.
|
|
std::string | idToString () const |
| Converts the specified EBML ID to a printable string.
|
|
bool | isParent () const |
| Returns an indication whether the element is a parent element.
|
|
bool | isPadding () const |
| Returns an indication whether the element is considered as padding.
|
|
std::uint64_t | firstChildOffset () const |
| Returns the offset of the first child of the element.
|
|
std::string | readString () |
| Reads the content of the element as string.
|
|
std::uint64_t | readUInteger () |
| Reads the content of the element as unsigned integer.
|
|
double | readFloat () |
| Reads the content of the element as float.
|
|
| GenericFileElement (ContainerType &container, std::uint64_t startOffset) |
|
| GenericFileElement (EbmlElement &parent, std::uint64_t startOffset) |
| Constructs a new sub level file element with the specified parent at the specified startOffset.
|
|
| GenericFileElement (ContainerType &container, std::uint64_t startOffset, std::uint64_t maxSize) |
|
| GenericFileElement (const GenericFileElement &other)=delete |
|
| GenericFileElement (GenericFileElement &other)=delete |
|
GenericFileElement & | operator= (const GenericFileElement &other)=delete |
|
ContainerType & | container () |
| Returns the related container.
|
|
const ContainerType & | container () const |
| Returns the related container.
|
|
std::iostream & | stream () |
| Returns the related stream.
|
|
CppUtilities::BinaryReader & | reader () |
| Returns the related BinaryReader.
|
|
CppUtilities::BinaryWriter & | writer () |
| Returns the related BinaryWriter.
|
|
std::uint64_t | startOffset () const |
| Returns the start offset in the related stream.
|
|
std::uint64_t | relativeStartOffset () const |
| Returns the offset of the element in its parent or - if it is a top-level element - in the related stream.
|
|
const IdentifierType & | id () const |
| Returns the element ID.
|
|
std::string | idToString () const |
| Returns a printable string representation of the element ID.
|
|
std::uint32_t | idLength () const |
| Returns the length of the id denotation in byte.
|
|
std::uint32_t | headerSize () const |
| Returns the header size of the element in byte.
|
|
DataSizeType | dataSize () const |
| Returns the data size of the element in byte.
|
|
std::uint32_t | sizeLength () const |
| Returns the length of the size denotation of the element in byte.
|
|
std::uint64_t | dataOffset () const |
| Returns the data offset of the element in the related stream.
|
|
std::uint64_t | totalSize () const |
| Returns the total size of the element.
|
|
std::uint64_t | endOffset () const |
| Returns the offset of the first byte which doesn't belong to this element anymore.
|
|
std::uint64_t | maxTotalSize () const |
| Returns maximum total size.
|
|
std::uint8_t | level () const |
| Returns how deep the element is nested (0 for top-level elements, 1 for children of top-level elements, ...).
|
|
EbmlElement * | parent () |
| Returns the parent of the element.
|
|
const EbmlElement * | parent () const |
| Returns the parent of the element.
|
|
EbmlElement * | parent (std::uint8_t n) |
| Returns the n-th parent of the element.
|
|
const EbmlElement * | parent (std::uint8_t n) const |
| Returns the n-th parent of the element.
|
|
EbmlElement * | nextSibling () |
| Returns the next sibling of the element.
|
|
const EbmlElement * | nextSibling () const |
| Returns the next sibling of the element.
|
|
EbmlElement * | firstChild () |
| Returns the first child of the element.
|
|
const EbmlElement * | firstChild () const |
| Returns the first child of the element.
|
|
EbmlElement * | lastChild () |
| Returns the last child of the element.
|
|
const EbmlElement * | lastChild () const |
| Returns the last child of the element.
|
|
EbmlElement * | subelementByPath (Diagnostics &diag, IdType item) |
| Returns the sub element for the specified path.
|
|
EbmlElement * | subelementByPath (Diagnostics &diag, IdType item, IdTypes... remainingPath) |
| Returns the sub element for the specified path.
|
|
const EbmlElement * | subelementByPath (Diagnostics &diag, IdType item) const |
| Returns the sub element for the specified path.
|
|
const EbmlElement * | subelementByPath (Diagnostics &diag, IdType item, IdTypes... remainingPath) const |
| Returns the sub element for the specified path.
|
|
EbmlElement * | childById (const IdentifierType &id, Diagnostics &diag) |
| Returns the first child with the specified id.
|
|
const EbmlElement * | childById (const IdentifierType &id, Diagnostics &diag) const |
| Returns the first child with the specified id.
|
|
EbmlElement * | siblingById (const IdentifierType &id, Diagnostics &diag) |
| Returns the first sibling with the specified id.
|
|
const EbmlElement * | siblingById (const IdentifierType &id, Diagnostics &diag) const |
| Returns the first sibling with the specified id.
|
|
EbmlElement * | siblingByIdIncludingThis (const IdentifierType &id, Diagnostics &diag) |
| Returns the first sibling with the specified id or the current instance if its ID equals id.
|
|
const EbmlElement * | siblingByIdIncludingThis (const IdentifierType &id, Diagnostics &diag) const |
| Returns the first sibling with the specified id or the current instance if its ID equals id.
|
|
bool | isParent () const |
| Returns an indication whether this instance is a parent element.
|
|
bool | isPadding () const |
| Returns an indication whether this instance is a padding element.
|
|
std::uint64_t | firstChildOffset () const |
| Returns the offset of the first child (relative to the start offset of this element).
|
|
bool | isParsed () const |
| Returns an indication whether this instance has been parsed yet.
|
|
void | clear () |
| Clears the status of the element.
|
|
void | parse (Diagnostics &diag) |
| Parses the header information of the element which is read from the related stream at the start offset.
|
|
void | reparse (Diagnostics &diag) |
| Parses the header information of the element which is read from the related stream at the start offset.
|
|
void | validateSubsequentElementStructure (Diagnostics &diag, std::uint64_t *paddingSize=nullptr, AbortableProgressFeedback *progress=nullptr) |
| Parses (see parse()) this and all subsequent elements.
|
|
void | copyHeader (TargetStream &targetStream, Diagnostics &diag, AbortableProgressFeedback *progress) |
| Writes the header information of the element to the specified targetStream.
|
|
void | copyWithoutChilds (TargetStream &targetStream, Diagnostics &diag, AbortableProgressFeedback *progress) |
| Writes the element without its children to the specified targetStream.
|
|
void | copyEntirely (TargetStream &targetStream, Diagnostics &diag, AbortableProgressFeedback *progress) |
| Writes the entire element including all children to the specified targetStream.
|
|
void | makeBuffer () |
| Buffers the element (header and data).
|
|
void | discardBuffer () |
| Discards buffered data.
|
|
void | copyBuffer (TargetStream &targetStream) |
| Copies buffered data to targetStream.
|
|
void | copyPreferablyFromBuffer (TargetStream &targetStream, Diagnostics &diag, AbortableProgressFeedback *progress) |
| Copies buffered data to targetStream if data has been buffered; copies from input stream otherwise.
|
|
const std::unique_ptr< char[]> & | buffer () |
| Returns buffered data.
|
|
EbmlElement * | denoteFirstChild (std::uint32_t offset) |
| Denotes the first child to start at the specified offset (relative to the start offset of this descriptor).
|
|
|
static std::uint8_t | calculateIdLength (IdentifierType id) |
| Returns the length of the specified id in byte.
|
|
static std::uint8_t | calculateSizeDenotationLength (std::uint64_t size) |
| Returns the length of the size denotation for the specified size in byte.
|
|
static std::uint8_t | makeId (IdentifierType id, char *buff) |
| Stores the specified id in the specified buffer which must be at least 8 bytes long.
|
|
static std::uint8_t | makeSizeDenotation (std::uint64_t size, char *buff) |
| Makes the size denotation for the specified size and stores it to buff.
|
|
static std::uint8_t | makeSizeDenotation (std::uint64_t size, char *buff, std::uint8_t minBytes) |
| Makes the size denotation for the specified size and stores it to buff.
|
|
static std::uint8_t | calculateUIntegerLength (std::uint64_t integer) |
| Returns the length of the specified unsigned integer in byte.
|
|
static std::uint8_t | makeUInteger (std::uint64_t value, char *buff) |
| Writes value to buff.
|
|
static std::uint8_t | makeUInteger (std::uint64_t value, char *buff, std::uint8_t minBytes) |
| Writes value to buff.
|
|
static void | makeSimpleElement (std::ostream &stream, IdentifierType id, std::uint64_t content) |
| Makes a simple EBML element.
|
|
static void | makeSimpleElement (std::ostream &stream, IdentifierType id, std::string_view content) |
|
static constexpr std::uint32_t | maximumIdLengthSupported () |
| Returns the maximum id length supported by the class in byte.
|
|
static constexpr std::uint32_t | maximumSizeLengthSupported () |
| Returns the maximum size length supported by the class in byte.
|
|
static constexpr std::uint8_t | minimumElementSize () |
| Returns the minimum element size.
|
|
The EbmlElement class helps to parse EBML files such as Matroska files.