|
libebml_ng
|
Represents a parsed EBML file segment. More...
#include <io.h>
Classes | |
| class | iterator |
| Iterator class for parseFile. More... | |
Public Member Functions | |
| parseFile (ioBase &) | |
| parseFile (ioBase &, parseFile &) | |
| parseFile (ioBase &, off_t) | |
| parseFile (ioBase &, off_t, parseFile &) | |
| off_t | dataOffset () const |
| off_t | endOffset () const |
| size_t | read (char *) const |
| size_t | read (char *, size_t) const |
| size_t | read (char *, off_t, size_t) const |
| off_t | seek (off_t) const |
| off_t | tell () const |
| size_t | outerSize () const |
| template<typename T > | |
| T | unpack () const |
| Template method to unpack data from the element read from file. More... | |
| iterator | begin () const |
Public Attributes | |
| ebmlID_t | ebmlID |
| unsigned char | ebmlIDWidth |
| size_t | dataSize |
| unsigned char | sizeWidth |
| off_t | offset |
| off_t | parentOffset = 0 |
| parseFile * | parent |
Protected Member Functions | |
| parseFile (ioBase *, ebmlID_t, unsigned char, size_t, unsigned char, off_t) | |
| parseFile (ioBase *, ebmlID_t, unsigned char, size_t, unsigned char, off_t, parseFile &) | |
Friends | |
| class | parseFile::iterator |
Represents a parsed EBML file segment.
The parseFile class encapsulates the data read from an IO interface (ioBase) for an EBML element. It stores the EBML ID, widths, data size, file offset, and parent relations. Underlying IO operations (such as seek, read, write, or truncate) may throw exceptions derived from std::ios_base::failure (or other exceptions such as ebmlUnexpectedEndOfData and ebmlDecodeError) if errors occur in the IO operations.
| std::ios_base::failure | Thrown if seeking, reading, writing, or truncating fails due to an underlying IO error. |
| std::invalid_argument | Thrown by the specialized IO implementations (such as when no read, write, or append flag is specified). |
| ebml::ebmlUnexpectedEndOfData | Thrown if a parsed element header indicates more data than available. |
| ebml::ebmlDecodeError | Thrown if there is an error in decoding the EBML header fields. |
| ebml::parseFile::parseFile | ( | ioBase & | file | ) |
| ebml::parseFile::parseFile | ( | ioBase & | file, |
| off_t | offset | ||
| ) |
|
protected |
|
protected |
| parseFile::iterator ebml::parseFile::begin | ( | ) | const |
| off_t ebml::parseFile::dataOffset | ( | ) | const |
| off_t ebml::parseFile::endOffset | ( | ) | const |
| size_t ebml::parseFile::outerSize | ( | ) | const |
| size_t ebml::parseFile::read | ( | char * | dest | ) | const |
| size_t ebml::parseFile::read | ( | char * | dest, |
| size_t | size | ||
| ) | const |
| size_t ebml::parseFile::read | ( | char * | dest, |
| off_t | offset, | ||
| size_t | size | ||
| ) | const |
| off_t ebml::parseFile::seek | ( | off_t | offset | ) | const |
| off_t ebml::parseFile::tell | ( | ) | const |
|
inline |
Template method to unpack data from the element read from file.
This method reads the element's data into a temporary buffer and then converts it to a value of the requested type using ebml::unpack.
| T | The target type. |
| std::ios_base::failure | if an IO error occurs during the read. |
|
friend |
| size_t ebml::parseFile::dataSize |
| ebmlID_t ebml::parseFile::ebmlID |
| unsigned char ebml::parseFile::ebmlIDWidth |
| off_t ebml::parseFile::offset |
| parseFile* ebml::parseFile::parent |
| off_t ebml::parseFile::parentOffset = 0 |
| unsigned char ebml::parseFile::sizeWidth |
1.8.14