@@ -176,7 +176,6 @@ extern const EbmlSemanticContext Context_EbmlGlobal;
176
176
public: \
177
177
x ();
178
178
179
- #if defined(EBML_STRICT_API)
180
179
#define EBML_CONCRETE_CLASS (Type ) \
181
180
public: \
182
181
const EbmlSemanticContext &Context () const override {return ClassInfos.GetContext ();} \
@@ -225,50 +224,6 @@ extern const EbmlSemanticContext Context_EbmlGlobal;
225
224
#define EBML_CTX_IDX (c,i ) (c).GetSemantic(i)
226
225
#define EBML_CTX_IDX_INFO (c,i ) (const EbmlCallbacks &)((c).GetSemantic(i))
227
226
#define EBML_CTX_IDX_ID (c,i ) ((const EbmlCallbacks &)((c).GetSemantic(i))).ClassId()
228
- #else
229
- #define EBML_CONCRETE_CLASS (Type ) \
230
- public: \
231
- const EbmlCallbacks & Generic () const override {return ClassInfos;} \
232
- operator const EbmlId &() const override {return ClassInfos.GlobalId ;} \
233
- EbmlElement & CreateElement () const override {return Create ();} \
234
- EbmlElement * Clone () const override { return new Type (*this ); } \
235
- static EbmlElement & Create () {return *(new (Type));} \
236
- static const EbmlCallbacks ClassInfos; \
237
-
238
- #define EBML_CONCRETE_DUMMY_CLASS (Type ) \
239
- public: \
240
- const EbmlCallbacks & Generic () const override {return ClassInfos;} \
241
- virtual operator const EbmlId &(); \
242
- EbmlElement & CreateElement () const override {return Create ();} \
243
- EbmlElement * Clone () const override { return new Type (*this ); } \
244
- static EbmlElement & Create () {return *(new (Type));} \
245
- static const EbmlCallbacks ClassInfos; \
246
-
247
-
248
- #define EBML_INFO (ref ) ref::ClassInfos
249
- #define EBML_ID (ref ) ref::ClassInfos.GlobalId
250
- #define EBML_CLASS_SEMCONTEXT (ref ) Context_##ref
251
- #define EBML_CLASS_CONTEXT (ref ) ref::ClassInfos.Context
252
- #define EBML_CLASS_CALLBACK (ref ) ref::ClassInfos
253
- #define EBML_CONTEXT (e ) (e)->Generic ().Context
254
- #define EBML_NAME (e ) (e)->Generic ().DebugName
255
-
256
- #define EBML_INFO_ID (cb ) (cb).GlobalId
257
- #define EBML_INFO_NAME (cb ) (cb).DebugName
258
- #define EBML_INFO_CREATE (cb ) (cb).Create()
259
- #define EBML_INFO_CONTEXT (cb ) (cb).Context
260
-
261
- #define EBML_SEM_UNIQUE (s ) (s).Unique
262
- #define EBML_SEM_CONTEXT (s ) (s).GetCallbacks.Context
263
- #define EBML_SEM_CREATE (s ) (s).Create()
264
-
265
- #define EBML_CTX_SIZE (c ) (c).Size
266
- #define EBML_CTX_MASTER (c ) (c).MasterElt
267
- #define EBML_CTX_PARENT (c ) (c).UpTable
268
- #define EBML_CTX_IDX (c,i ) (c).MyTable[(i)]
269
- #define EBML_CTX_IDX_INFO (c,i ) (c).MyTable[(i)].GetCallbacks
270
- #define EBML_CTX_IDX_ID (c,i ) (c).MyTable[(i)].GetCallbacks.GlobalId
271
- #endif
272
227
273
228
#if !defined(INVALID_FILEPOS_T)
274
229
#define INVALID_FILEPOS_T 0
@@ -298,9 +253,7 @@ class EBML_DLL_API EbmlCallbacks {
298
253
inline const char * GetName () const { return DebugName; }
299
254
inline EbmlElement & NewElement () const { return Create (); }
300
255
301
- #if defined(EBML_STRICT_API)
302
256
private:
303
- #endif
304
257
EbmlElement & (*Create)();
305
258
const EbmlId & GlobalId;
306
259
const char * DebugName;
@@ -321,9 +274,7 @@ class EBML_DLL_API EbmlSemantic {
321
274
inline EbmlElement & Create () const { return EBML_INFO_CREATE (GetCallbacks); }
322
275
inline explicit operator const EbmlCallbacks &() const { return GetCallbacks; }
323
276
324
- #if defined(EBML_STRICT_API)
325
277
private:
326
- #endif
327
278
bool Mandatory; // /< wether the element is mandatory in the context or not
328
279
bool Unique;
329
280
const EbmlCallbacks & GetCallbacks;
@@ -358,9 +309,7 @@ class EBML_DLL_API EbmlSemanticContext {
358
309
359
310
const _GetSemanticContext GetGlobalContext; // /< global elements supported at this level
360
311
361
- #if defined(EBML_STRICT_API)
362
312
private:
363
- #endif
364
313
const EbmlSemantic *MyTable; // /< First element in the table
365
314
std::size_t Size ; // /< number of elements in the table
366
315
const EbmlSemanticContext *UpTable; // /< Parent element
@@ -399,13 +348,8 @@ class EBML_DLL_API EbmlElement {
399
348
virtual EbmlElement * Clone () const = 0;
400
349
401
350
virtual explicit operator const EbmlId &() const = 0 ;
402
- #if defined(EBML_STRICT_API)
403
351
virtual const char *DebugName () const = 0;
404
352
virtual const EbmlSemanticContext &Context () const = 0;
405
- #else
406
- // / return the generic callback to monitor a derived class
407
- virtual const EbmlCallbacks & Generic () const = 0;
408
- #endif
409
353
virtual EbmlElement & CreateElement () const = 0;
410
354
411
355
// by default only allow to set element as finite (override when needed)
@@ -501,9 +445,7 @@ class EBML_DLL_API EbmlElement {
501
445
inline void SetSizeIsFinite (bool Set = true ) {bSizeIsFinite = Set;}
502
446
inline std::uint64_t GetSizePosition () const {return SizePosition;}
503
447
504
- #if defined(EBML_STRICT_API)
505
448
private:
506
- #endif
507
449
std::uint64_t Size ; // /< the size of the data to write
508
450
std::uint64_t DefaultSize; // /< Minimum data size to fill on rendering (0 = optimal)
509
451
int SizeLength{0 }; // / the minimum size on which the size will be written (0 = optimal)
0 commit comments