1 #ifndef EBML_NG_MASTERELEMENT_CHILDSLOT_H 2 #define EBML_NG_MASTERELEMENT_CHILDSLOT_H 4 #include "../../forwards.h" 5 #include "../../ptrs.h" 6 #include "../../struct/datetime.h" 7 #include "../../ebmlDataElement.h" 10 class childTypeSpec_t;
21 template<
typename T=ebmlElement>
28 T* _raw_ptr =
nullptr;
29 bool _allownull =
true;
37 std::enable_if_t<std::is_base_of<ebmlElement, T>::value && std::is_base_of<T, U>::value && !std::is_same<T, U>::value,
childSlot_t<T>&>
41 std::enable_if_t<std::is_base_of<ebmlElement, T>::value && std::is_base_of<T, U>::value && !std::is_same<T, U>::value,
childSlot_t<T>&>
49 std::enable_if_t<std::is_base_of<ebmlElement, T>::value && std::is_base_of<T, U>::value && !std::is_same<T, U>::value,
bool&>
68 bool _allownull =
true;
107 bool parent_is_const()
const;
112 bool hasParent()
const;
113 unsigned char headSize()
const;
114 unsigned char headSize(
size_t)
const;
115 unsigned char sizeWidth()
const;
116 unsigned char sizeWidth(
size_t)
const;
117 size_t outerSize()
const;
118 size_t outerSize(
size_t)
const;
119 size_t dataSize()
const;
120 off_t offsetInParent()
const;
121 off_t offsetInFile()
const;
122 off_t dataOffsetInParent()
const;
123 off_t dataOffsetInFile()
const;
124 std::string encode()
const;
125 size_t encode(
char*)
const;
127 size_t encode(
const ioBase_sp&, off_t)
const;
128 size_t encode(
ioBase*)
const;
129 size_t encode(
ioBase*, off_t)
const;
130 size_t encode(
char*,
size_t)
const;
132 std::wstring minirepr()
const;
133 std::wstring
repr()
const;
Abstract base class for EBML Element Type objects.
Definition: ebmlElementType.h:106
Abstract base class for EBML master element instances.This class provides the functionality to manage...
Definition: ebmlMasterElement.h:19
childSlot_t(ebmlMasterElement *parent, const childTypeSpec_t &, ebml::ptr< T > &childslot, bool allownull=true)
A drop-in replacement for std::weak_ptr tailored for EBML objects.
Definition: ptrs.h:30
Definition: basictypes.h:40
A drop-in replacement for std::shared_ptr tailored for EBML objects.
Definition: ptrs.h:27
Definition: childSlot_t.h:63
std::wstring repr(const std::string &str)
Definition: repr.cpp:36
bool operator==(const std::nullptr_t &)
uint64_t ebmlID_t
Definition: ebmlID_t.h:7
Abstract base class for EBML Element instances.
Definition: ebmlElement.h:79
Specifies accepted child element types within a parent element.
Definition: childTypeSpec.h:76
Base class for file-like IO operations.
Definition: io.h:22
childSlot_t< T > & operator=(const ebml::ptr< T > &item)
A templated helper class managing a child slot within an EBML master element.
Definition: childSlot_t.h:22