Skip to content

Commit

Permalink
Merge remote-tracking branch 'robux4/body_macro'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbunkus committed Jan 6, 2024
2 parents 30a0905 + ae1f222 commit bbb26de
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
4 changes: 2 additions & 2 deletions matroska/KaxBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class MATROSKA_DLL_API KaxBlock : public KaxInternalBlock {
static const libebml::EbmlCallbacks ClassInfos;
public:
KaxBlock() :KaxInternalBlock(KaxBlock::ClassInfos, false) {}
EBML_CONCRETE_CLASS(KaxBlock)
MATROSKA_CLASS_BODY(KaxBlock)
};

class MATROSKA_DLL_API KaxSimpleBlock : public KaxInternalBlock {
Expand All @@ -287,7 +287,7 @@ class MATROSKA_DLL_API KaxSimpleBlock : public KaxInternalBlock {

void SetParent(KaxCluster & aParentCluster);

EBML_CONCRETE_CLASS(KaxSimpleBlock)
MATROSKA_CLASS_BODY(KaxSimpleBlock)
};

/// Placeholder class for either a BlockGroup or a SimpleBlock
Expand Down
35 changes: 19 additions & 16 deletions matroska/KaxDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,84 +31,87 @@
#define DEFINE_MKX_SINTEGER_CONS(a,b,c,d,e) DEFINE_xxx_CLASS_CONS(a,b,c,d,e,GetKaxGlobal_Context) \
const libebml::EbmlCallbacksDefault<std::int64_t> a::ClassInfos(a::Create, Id_##a, e, Context_##a);

#define MATROSKA_CLASS_BODY(x) \
EBML_CONCRETE_CLASS(x)

#define DECLARE_MKX_MASTER(x) \
DECLARE_xxx_MASTER(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :EbmlMaster(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_MASTER_CONS(x) \
DECLARE_xxx_MASTER(x, MATROSKA_DLL_API) \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_BINARY(x) \
DECLARE_xxx_BINARY(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlBinary(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_BINARY_CONS(x) \
DECLARE_xxx_BINARY(x, MATROSKA_DLL_API) \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_UNISTRING(x) \
DECLARE_xxx_UNISTRING(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlUnicodeString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_STRING(x) \
DECLARE_xxx_STRING(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_STRING_DEF(x) \
DECLARE_xxx_STRING_DEF(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlString(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_UINTEGER(x) \
DECLARE_xxx_UINTEGER(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlUInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_UINTEGER_DEF(x) \
DECLARE_xxx_UINTEGER_DEF(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlUInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_SINTEGER_CONS(x) \
DECLARE_xxx_SINTEGER(x, MATROSKA_DLL_API) \
x(const x & ElementToClone); \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_SINTEGER(x) \
DECLARE_xxx_SINTEGER(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlSInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_SINTEGER_DEF(x) \
DECLARE_xxx_SINTEGER_DEF(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlSInteger(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_DATE(x) \
DECLARE_xxx_DATE(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlDate(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_DATE_DEF(x) \
DECLARE_xxx_DATE_DEF(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlDate(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_FLOAT(x) \
DECLARE_xxx_FLOAT(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlFloat(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#define DECLARE_MKX_FLOAT_DEF(x) \
DECLARE_xxx_FLOAT_DEF(x, MATROSKA_DLL_API) \
x(const x & ElementToClone) :libebml::EbmlFloat(ElementToClone) {} \
EBML_CONCRETE_CLASS(x)
MATROSKA_CLASS_BODY(x)

#endif // LIBMATROSKA_DEFINES_H

0 comments on commit bbb26de

Please sign in to comment.