|
libebml_ng
|
CRTP template for EBML Element Type objects. More...
#include <ebmlElementType.h>
Public Member Functions | |
| template<typename... Args> | |
| ebmlTypeCRTP (Args &&... args) | |
| template<typename... Args> | |
| ebml::ptr< ebmlinst_t > | operator() (Args &&... args) const |
| Creates a new instance of an EBML element. More... | |
| ebml::ptr< ebmlinst_t > | decode (const parseString &parsed) const |
| ebml::ptr< ebmlinst_t > | decode (const parseFile &parsed) const |
| ebml::ptr< ebmlinst_t > | decode (const char *data, size_t size) const |
| ebml::ptr< ebmlinst_t > | decode (const std::string &data) const |
| ebml::ptr< ebmlinst_t > | decode (ioBase &file) const |
| ebml::ptr< ebmlinst_t > | decode (ioBase &file, off_t &offset) const |
| ebml::ptr< ebmlinst_t > | decode (ioBase &file, off_t offset, off_t &endoffset) const |
| ebml::ptr< const ebmlinst_t > | cdecode (const parseString &parsed) const |
| ebml::ptr< const ebmlinst_t > | cdecode (const parseFile &parsed) const |
| ebml::ptr< const ebmlinst_t > | cdecode (const char *data, size_t size) const |
| ebml::ptr< const ebmlinst_t > | cdecode (const std::string &data) const |
| ebml::ptr< const ebmlinst_t > | cdecode (ioBase &file) const |
| ebml::ptr< const ebmlinst_t > | cdecode (ioBase &file, off_t &offset) const |
| ebml::ptr< const ebmlinst_t > | cdecode (ioBase &file, off_t offset, off_t &endoffset) const |
Protected Member Functions | |
| ebmlElement * | _new () const |
| ebmlElement * | _decode_v (const parseString &) const |
| ebmlElement * | _decode_v (const parseFile &) const |
| ebmlElement * | _cdecode_v (const parseString &) const |
| ebmlElement * | _cdecode_v (const parseFile &) const |
CRTP template for EBML Element Type objects.
This template implements the Curiously Recurring Template Pattern (CRTP) to enhance EBML element type classes. By wrapping their decode and cdecode functions, it provides type-safe pointer conversions, eliminating the need for manual recasting.
By inheriting from ebmlTypeCRTP, derived EBML element type classes receive:
operator()(Args&&...)ebml::ptr<ebmlinst_t> for mutable instancesebml::ptr<const ebmlinst_t> for const instancesebml::ebmlElementCRTP<ebmltype_t, ebmlinst_t, instbase_t> | ebmltype_t | The concrete element type class using this CRTP mixin. |
| ebmlinst_t | The associated concrete element instance class. |
| typebase_t | The base element type class (default is ebml::ebmlElementType). |
|
inline |
|
protected |
Reimplemented in 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 >, and ebml::ebmlTypeCRTP< ebmlListType, ebmlList, ebmlMasterElementType >.
|
protected |
Reimplemented in 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 >, and ebml::ebmlTypeCRTP< ebmlListType, ebmlList, ebmlMasterElementType >.
|
protected |
Reimplemented in 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 >, and ebml::ebmlTypeCRTP< ebmlListType, ebmlList, ebmlMasterElementType >.
|
protected |
Reimplemented in 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 >, and ebml::ebmlTypeCRTP< ebmlListType, ebmlList, ebmlMasterElementType >.
|
protected |
Reimplemented in 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 >, and ebml::ebmlTypeCRTP< ebmlListType, ebmlList, ebmlMasterElementType >.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Creates a new instance of an EBML element.
This operator wraps around the constructor of ebmlinst_t of the form ebmlinst_t(const ebmltype_t*, Args&&...), forwarding the provided arguments, validating the created instance, and returning a shared pointer to the new element.
| ebmltype_t | The concrete EBML element type class. |
| ebmlinst_t | The concrete EBML element instance class. |
| typebase_t | The base element type class. |
| Args | Arguments to be forwarded to the constructor of ebmlinst_t. |
| args | The arguments to forward. |
1.8.14