1 /****************************************************************************
2 ** libebml : parse EBML files, see http://embl.sourceforge.net/
4 ** <file/class description>
6 ** Copyright (C) 2002-2004 Steve Lhomme. All rights reserved.
8 ** This file is part of libebml.
10 ** This library is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU Lesser General Public
12 ** License as published by the Free Software Foundation; either
13 ** version 2.1 of the License, or (at your option) any later version.
15 ** This library is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 ** Lesser General Public License for more details.
20 ** You should have received a copy of the GNU Lesser General Public
21 ** License along with this library; if not, write to the Free Software
22 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 ** See http://www.matroska.org/license/lgpl/ for LGPL licensing information.
26 ** Contact license@matroska.org if any conditions of this licensing are
29 **********************************************************************/
33 \version \$Id: EbmlSubHead.h 639 2004-07-09 20:59:14Z mosu $
34 \author Steve Lhomme <robux4 @ users.sf.net>
36 #ifndef LIBEBML_SUBHEAD_H
37 #define LIBEBML_SUBHEAD_H
41 #include "EbmlUInteger.h"
42 #include "EbmlString.h"
44 START_LIBEBML_NAMESPACE
46 class EBML_DLL_API EVersion
: public EbmlUInteger
{
48 EVersion() :EbmlUInteger(1) {}
49 EVersion(const EVersion
& ElementToClone
) : EbmlUInteger(ElementToClone
) {}
50 static EbmlElement
& Create() {return *(new EVersion
);}
51 const EbmlCallbacks
& Generic() const {return ClassInfos
;}
52 static const EbmlCallbacks ClassInfos
;
53 operator const EbmlId
&() const {return ClassInfos
.GlobalId
;}
54 EbmlElement
* Clone() const {return new EVersion(*this);}
57 class EBML_DLL_API EReadVersion
: public EbmlUInteger
{
59 EReadVersion() :EbmlUInteger(1) {}
60 EReadVersion(const EReadVersion
& ElementToClone
) : EbmlUInteger(ElementToClone
) {}
61 static EbmlElement
& Create() {return *(new EReadVersion
);}
62 const EbmlCallbacks
& Generic() const {return ClassInfos
;}
63 static const EbmlCallbacks ClassInfos
;
64 operator const EbmlId
&() const {return ClassInfos
.GlobalId
;}
65 EbmlElement
* Clone() const {return new EReadVersion(*this);}
68 class EBML_DLL_API EMaxIdLength
: public EbmlUInteger
{
70 EMaxIdLength() :EbmlUInteger(4) {}
71 EMaxIdLength(const EMaxIdLength
& ElementToClone
) : EbmlUInteger(ElementToClone
) {}
72 static EbmlElement
& Create() {return *(new EMaxIdLength
);}
73 const EbmlCallbacks
& Generic() const {return ClassInfos
;}
74 static const EbmlCallbacks ClassInfos
;
75 operator const EbmlId
&() const {return ClassInfos
.GlobalId
;}
76 EbmlElement
* Clone() const {return new EMaxIdLength(*this);}
79 class EBML_DLL_API EMaxSizeLength
: public EbmlUInteger
{
81 EMaxSizeLength() :EbmlUInteger(8) {}
82 EMaxSizeLength(const EMaxSizeLength
& ElementToClone
) : EbmlUInteger(ElementToClone
) {}
83 static EbmlElement
& Create() {return *(new EMaxSizeLength
);}
84 const EbmlCallbacks
& Generic() const {return ClassInfos
;}
85 static const EbmlCallbacks ClassInfos
;
86 operator const EbmlId
&() const {return ClassInfos
.GlobalId
;}
87 EbmlElement
* Clone() const {return new EMaxSizeLength(*this);}
90 class EBML_DLL_API EDocType
: public EbmlString
{
93 EDocType(const EDocType
& ElementToClone
) : EbmlString(ElementToClone
) {}
94 static EbmlElement
& Create() {return *(new EDocType
);}
95 const EbmlCallbacks
& Generic() const {return ClassInfos
;}
96 static const EbmlCallbacks ClassInfos
;
97 operator const EbmlId
&() const {return ClassInfos
.GlobalId
;}
98 EbmlElement
* Clone() const {return new EDocType(*this);}
101 class EBML_DLL_API EDocTypeVersion
: public EbmlUInteger
{
104 EDocTypeVersion(const EDocTypeVersion
& ElementToClone
) : EbmlUInteger(ElementToClone
) {}
105 static EbmlElement
& Create() {return *(new EDocTypeVersion
);}
106 const EbmlCallbacks
& Generic() const {return ClassInfos
;}
107 static const EbmlCallbacks ClassInfos
;
108 operator const EbmlId
&() const {return ClassInfos
.GlobalId
;}
109 EbmlElement
* Clone() const {return new EDocTypeVersion(*this);}
112 class EBML_DLL_API EDocTypeReadVersion
: public EbmlUInteger
{
114 EDocTypeReadVersion() {}
115 EDocTypeReadVersion(const EDocTypeReadVersion
& ElementToClone
) : EbmlUInteger(ElementToClone
) {}
116 static EbmlElement
& Create() {return *(new EDocTypeReadVersion
);}
117 const EbmlCallbacks
& Generic() const {return ClassInfos
;}
118 static const EbmlCallbacks ClassInfos
;
119 operator const EbmlId
&() const {return ClassInfos
.GlobalId
;}
120 EbmlElement
* Clone() const {return new EDocTypeReadVersion(*this);}
123 END_LIBEBML_NAMESPACE
125 #endif // LIBEBML_SUBHEAD_H