libebml_ng
Classes | Namespaces
ebmlElementType.h File Reference

Declaration of the EBML element type base class and CRTP templates. More...

#include "ptrs.h"
#include "seekdata.h"
#include "parsing/string.h"
#include "parsing/io.h"
#include "exceptions.h"
#include "vint.h"
#include <utility>
#include "typeof.h"

Go to the source code of this file.

Classes

class  ebml::ebmlElementType
 Abstract base class for EBML Element Type objects. More...
 
class  ebml::ebmlTypeCRTP< ebmltype_t, ebmlinst_t, typebase_t >
 CRTP template for EBML Element Type objects. More...
 

Namespaces

 ebml
 

Detailed Description

Declaration of the EBML element type base class and CRTP templates.

This header defines the abstract base class used to describe EBML element types. Every subclass of ebmlElementType represents a distinct EBML element type and must have a companion ebmlElement (or subclass) declared as a friend. It provides functionality for constructing element type instances based on an EBML ID (either as a VINT string or an unsigned integer) and a name (as a wide string). The header also defines a CRTP template, ebmlTypeCRTP, that facilitates creation, decoding, and type-safe casting of concrete element instances.

Note
Many member functions that perform trivial computations such as returning sizes or addresses are declared inline.
Author
Brian Sherson
Date
September 11, 2025