use a macro to define the semantic tables as the v2 library uses a slightly different table format
git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@85 a6f86f6d-0131-4f8e-9e7b-e335508773d5
This commit is contained in:
parent
2b635aa5ac
commit
5dd210bfdc
@ -146,6 +146,10 @@ extern const EbmlSemanticContext Context_EbmlGlobal;
|
||||
#define DEFINE_EBML_UINTEGER_DEF(x,id,idl,parent,name,val) DEFINE_xxx_UINTEGER_DEF(x,id,idl,parent,name,*GetEbmlGlobal_Context,val)
|
||||
#define DEFINE_EBML_STRING_DEF(x,id,idl,parent,name,val) DEFINE_xxx_STRING_DEF(x,id,idl,parent,name,*GetEbmlGlobal_Context,val)
|
||||
|
||||
#define DEFINE_START_SEMANTIC(x) static const EbmlSemantic ContextList_##x[] = {
|
||||
#define DEFINE_SEMANTIC_ITEM(m,u,c) EbmlSemantic(m, u, EBML_INFO(c)),
|
||||
#define DEFINE_END_SEMANTIC(x) };
|
||||
|
||||
#define DECLARE_EBML_MASTER(x) class EBML_DLL_API x : public EbmlMaster { \
|
||||
public: \
|
||||
x();
|
||||
|
@ -39,16 +39,15 @@
|
||||
|
||||
START_LIBEBML_NAMESPACE
|
||||
|
||||
static const EbmlSemantic ContextList_EbmlHead[7] =
|
||||
{
|
||||
EbmlSemantic(true, true, EBML_INFO(EVersion)), ///< EBMLVersion
|
||||
EbmlSemantic(true, true, EBML_INFO(EReadVersion)), ///< EBMLReadVersion
|
||||
EbmlSemantic(true, true, EBML_INFO(EMaxIdLength)), ///< EBMLMaxIdLength
|
||||
EbmlSemantic(true, true, EBML_INFO(EMaxSizeLength)), ///< EBMLMaxSizeLength
|
||||
EbmlSemantic(true, true, EBML_INFO(EDocType)), ///< DocType
|
||||
EbmlSemantic(true, true, EBML_INFO(EDocTypeVersion)), ///< DocTypeVersion
|
||||
EbmlSemantic(true, true, EBML_INFO(EDocTypeReadVersion)), ///< DocTypeReadVersion
|
||||
};
|
||||
DEFINE_START_SEMANTIC(EbmlHead)
|
||||
DEFINE_SEMANTIC_ITEM(true, true, EVersion) ///< EBMLVersion
|
||||
DEFINE_SEMANTIC_ITEM(true, true, EReadVersion) ///< EBMLReadVersion
|
||||
DEFINE_SEMANTIC_ITEM(true, true, EMaxIdLength) ///< EBMLMaxIdLength
|
||||
DEFINE_SEMANTIC_ITEM(true, true, EMaxSizeLength) ///< EBMLMaxSizeLength
|
||||
DEFINE_SEMANTIC_ITEM(true, true, EDocType) ///< DocType
|
||||
DEFINE_SEMANTIC_ITEM(true, true, EDocTypeVersion) ///< DocTypeVersion
|
||||
DEFINE_SEMANTIC_ITEM(true, true, EDocTypeReadVersion) ///< DocTypeReadVersion
|
||||
DEFINE_END_SEMANTIC(EbmlHead)
|
||||
|
||||
DEFINE_EBML_MASTER_ORPHAN(EbmlHead, 0x1A45DFA3, 4, "EBMLHead\0ratamapaga");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user