replace DEFINE_MKX_MASTER_NOBODY() with DEFINE_MKX_MASTER_CONS() for better consistency

git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libmatroska@83 a6f86f6d-0131-4f8e-9e7b-e335508773d5
This commit is contained in:
Steve Lhomme 2010-04-07 15:59:32 +00:00
parent 998d163e7d
commit 345affd5d5
7 changed files with 26 additions and 32 deletions

View File

@ -38,10 +38,8 @@
#if LIBEBML_VERSION >= 0x010000
#define DEFINE_MKX_CONTEXT(a) DEFINE_xxx_CONTEXT(a,*GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER_NOBODY(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxGlobal_Context) \
a::a() :EbmlMaster(Context_##a) {}
#define DEFINE_MKX_MASTER_CONS(a,b,c,d,e) DEFINE_xxx_MASTER_CONS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER_ORPHAN(a,b,c,d) DEFINE_xxx_MASTER_ORPHAN(a,b,c,d,*GetKaxGlobal_Context)
#define DEFINE_MKX_UINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_UINTEGER_DEF(a,b,c,d,e,*GetKaxGlobal_Context,v)
#define DEFINE_MKX_UINTEGER(a,b,c,d,e) DEFINE_xxx_UINTEGER(a,b,c,d,e,*GetKaxGlobal_Context)
@ -128,10 +126,8 @@ class MATROSKA_DLL_API x : public EbmlMaster { \
#else
#define DEFINE_MKX_CONTEXT(a) DEFINE_xxx_CONTEXT(a,*GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER_NOBODY(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxGlobal_Context) \
a::a() :EbmlMaster(Context_##a) {}
#define DEFINE_MKX_MASTER_CONS(a,b,c,d,e) DEFINE_xxx_MASTER_CONS(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxGlobal_Context)
#define DEFINE_MKX_MASTER_ORPHAN(a,b,c,d) DEFINE_xxx_MASTER_ORPHAN(a,b,c,d,*GetKaxGlobal_Context)
#define DEFINE_MKX_UINTEGER_DEF(a,b,c,d,e,v) DEFINE_xxx_UINTEGER_DEF(a,b,c,d,e,*GetKaxGlobal_Context,v)
#define DEFINE_MKX_UINTEGER(a,b,c,d,e) DEFINE_xxx_CLASS(a,b,c,d,e,*GetKaxGlobal_Context)

View File

@ -58,14 +58,14 @@ static const EbmlSemantic ContextList_KaxAttached[6] =
#endif // MATROSKA_VERSION
};
DEFINE_MKX_MASTER_NOBODY(KaxAttached, 0x61A7, 2, KaxAttachments, "AttachedFile");
DEFINE_MKX_UNISTRING(KaxFileDescription, 0x467E, 2, KaxAttachments, "FileDescription");
DEFINE_MKX_UNISTRING(KaxFileName, 0x466E, 2, KaxAttachments, "FileName");
DEFINE_MKX_STRING (KaxMimeType, 0x4660, 2, KaxAttachments, "FileMimeType");
DEFINE_MKX_BINARY (KaxFileData, 0x465C, 2, KaxAttachments, "FileData");
DEFINE_MKX_UINTEGER (KaxFileUID, 0x46AE, 2, KaxAttachments, "FileUID");
DEFINE_MKX_MASTER_CONS(KaxAttached, 0x61A7, 2, KaxAttachments, "AttachedFile");
DEFINE_MKX_UNISTRING (KaxFileDescription, 0x467E, 2, KaxAttachments, "FileDescription");
DEFINE_MKX_UNISTRING (KaxFileName, 0x466E, 2, KaxAttachments, "FileName");
DEFINE_MKX_STRING (KaxMimeType, 0x4660, 2, KaxAttachments, "FileMimeType");
DEFINE_MKX_BINARY (KaxFileData, 0x465C, 2, KaxAttachments, "FileData");
DEFINE_MKX_UINTEGER (KaxFileUID, 0x46AE, 2, KaxAttachments, "FileUID");
#if MATROSKA_VERSION >= 2
DEFINE_MKX_BINARY (KaxFileReferral, 0x4675, 2, KaxAttachments, "FileReferral");
DEFINE_MKX_BINARY (KaxFileReferral, 0x4675, 2, KaxAttachments, "FileReferral");
#endif
KaxAttached::KaxAttached()

View File

@ -47,7 +47,7 @@ static const EbmlSemantic ContextList_KaxAttachments[1] =
EbmlSemantic(true, false, EBML_INFO(KaxAttached)), ///< EBMLVersion
};
DEFINE_MKX_MASTER_NOBODY(KaxAttachments, 0x1941A469, 4, KaxSegment, "Attachments");
DEFINE_MKX_MASTER_CONS(KaxAttachments, 0x1941A469, 4, KaxSegment, "Attachments");
KaxAttachments::KaxAttachments()
:EbmlMaster(Context_KaxAttachments)

View File

@ -75,18 +75,18 @@ static const EbmlSemantic ContextList_KaxBlockMore[2] =
EbmlSemantic(true, true, EBML_INFO(KaxBlockAdditional))
};
DEFINE_MKX_MASTER_NOBODY(KaxBlockGroup, 0xA0, 1, KaxCluster, "BlockGroup");
DEFINE_MKX_BINARY_CONS (KaxBlock, 0xA1, 1, KaxBlockGroup, "Block");
DEFINE_MKX_UINTEGER (KaxBlockDuration, 0x9B, 1, KaxBlockGroup, "BlockDuration");
DEFINE_MKX_MASTER_CONS (KaxBlockGroup, 0xA0, 1, KaxCluster, "BlockGroup");
DEFINE_MKX_BINARY_CONS (KaxBlock, 0xA1, 1, KaxBlockGroup, "Block");
DEFINE_MKX_UINTEGER (KaxBlockDuration, 0x9B, 1, KaxBlockGroup, "BlockDuration");
#if MATROSKA_VERSION >= 2
DEFINE_MKX_BINARY_CONS (KaxSimpleBlock, 0xA3, 1, KaxCluster, "SimpleBlock");
DEFINE_MKX_BINARY_CONS (KaxBlockVirtual, 0xA2, 1, KaxBlockGroup, "BlockVirtual");
DEFINE_MKX_BINARY (KaxCodecState, 0xA4, 1, KaxBlockGroup, "CodecState");
DEFINE_MKX_BINARY_CONS (KaxSimpleBlock, 0xA3, 1, KaxCluster, "SimpleBlock");
DEFINE_MKX_BINARY_CONS (KaxBlockVirtual, 0xA2, 1, KaxBlockGroup, "BlockVirtual");
DEFINE_MKX_BINARY (KaxCodecState, 0xA4, 1, KaxBlockGroup, "CodecState");
#endif
DEFINE_MKX_MASTER (KaxBlockAdditions, 0x75A1, 2, KaxBlockGroup, "BlockAdditions");
DEFINE_MKX_MASTER (KaxBlockMore, 0xA6, 1, KaxBlockAdditions, "BlockMore");
DEFINE_MKX_UINTEGER_DEF (KaxBlockAddID, 0xEE, 1, KaxBlockMore, "BlockAddID", 1);
DEFINE_MKX_BINARY (KaxBlockAdditional, 0xA5, 1, KaxBlockMore, "BlockAdditional");
DEFINE_MKX_MASTER (KaxBlockAdditions, 0x75A1, 2, KaxBlockGroup, "BlockAdditions");
DEFINE_MKX_MASTER (KaxBlockMore, 0xA6, 1, KaxBlockAdditions, "BlockMore");
DEFINE_MKX_UINTEGER_DEF(KaxBlockAddID, 0xEE, 1, KaxBlockMore, "BlockAddID", 1);
DEFINE_MKX_BINARY (KaxBlockAdditional, 0xA5, 1, KaxBlockMore, "BlockAdditional");
DataBuffer * DataBuffer::Clone()

View File

@ -56,7 +56,7 @@ static const EbmlSemantic ContextList_KaxCluster[6] =
EbmlSemantic(false, true, EBML_INFO(KaxClusterPosition)),
};
DEFINE_MKX_MASTER_NOBODY(KaxCluster, 0x1F43B675, 4, KaxSegment, "Cluster");
DEFINE_MKX_MASTER_CONS(KaxCluster, 0x1F43B675, 4, KaxSegment, "Cluster");
KaxCluster::KaxCluster()
:EbmlMaster(Context_KaxCluster)

View File

@ -160,9 +160,7 @@ const EbmlSemanticContext & GetKaxTagsGlobal_Context()
return Context_KaxTagMultiGlobal;
}
#define DEFINE_TAG_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxTagsGlobal_Context) \
a::a() :EbmlMaster(Context_##a) {}
#define DEFINE_TAG_MASTER(a,b,c,d,e) DEFINE_xxx_MASTER(a,b,c,d,e,*GetKaxTagsGlobal_Context)
DEFINE_MKX_MASTER (KaxTagMultiComment, 0x5B7B, 2, KaxTag, "MultiComment");

View File

@ -88,8 +88,8 @@ static const EbmlSemantic ContextList_KaxTrackEntry[27] =
EbmlSemantic(false, true, EBML_INFO(KaxContentEncodings)),
};
DEFINE_MKX_MASTER(KaxTracks, 0x1654AE6B, 4, KaxSegment, "Tracks");
DEFINE_MKX_MASTER_NOBODY(KaxTrackEntry, 0xAE, 1, KaxTracks, "TrackEntry");
DEFINE_MKX_MASTER (KaxTracks, 0x1654AE6B, 4, KaxSegment, "Tracks");
DEFINE_MKX_MASTER_CONS(KaxTrackEntry, 0xAE, 1, KaxTracks, "TrackEntry");
KaxTrackEntry::KaxTrackEntry()
:EbmlMaster(Context_KaxTrackEntry)