libebml: move some operator code in the .cpp files (MSVC has issues in DLLs)
+ libmatroska ChangeLog git-svn-id: https://matroska.svn.sourceforge.net/svnroot/matroska/trunk/libebml@347 a6f86f6d-0131-4f8e-9e7b-e335508773d5
This commit is contained in:
parent
1f01dcd455
commit
5607f4ebc8
@ -1,3 +1,7 @@
|
||||
2010-06-xx robux4
|
||||
New 1.0.1 version:
|
||||
- move some operator code in the .cpp files (MSVC has issues in DLLs)
|
||||
|
||||
2010-06-04 robux4/mosu
|
||||
New 1.0.0 version:
|
||||
- rename the library .so name as it's backward incompatible
|
||||
|
@ -85,7 +85,7 @@ class EBML_DLL_API EbmlBinary : public EbmlElement {
|
||||
SetValueIsSet();
|
||||
}
|
||||
|
||||
operator const binary &() const {return *Data;}
|
||||
operator const binary &() const;
|
||||
|
||||
bool IsDefaultValue() const {
|
||||
return false;
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: EbmlFloat.h 1079 2005-03-03 13:18:14Z robux4 $
|
||||
\version \$Id$
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#ifndef LIBEBML_FLOAT_H
|
||||
@ -79,8 +79,8 @@ class EBML_DLL_API EbmlFloat : public EbmlElement {
|
||||
|
||||
virtual bool IsSmallerThan(const EbmlElement *Cmp) const;
|
||||
|
||||
operator const float() const {return float(Value);}
|
||||
operator const double() const {return double(Value);}
|
||||
operator const float() const;
|
||||
operator const double() const;
|
||||
|
||||
void SetDefaultValue(double);
|
||||
|
||||
|
@ -71,10 +71,10 @@ class EBML_DLL_API EbmlSInteger : public EbmlElement {
|
||||
|
||||
virtual bool IsSmallerThan(const EbmlElement *Cmp) const;
|
||||
|
||||
operator int8() {return int8(Value);}
|
||||
operator int16() {return int16(Value);}
|
||||
operator int32() {return int32(Value);}
|
||||
operator int64() {return Value;}
|
||||
operator int8();
|
||||
operator int16();
|
||||
operator int32();
|
||||
operator int64();
|
||||
|
||||
void SetDefaultValue(int64 aValue) {assert(!DefaultISset()); DefaultValue = aValue; SetDefaultIsSet();}
|
||||
|
||||
|
@ -61,7 +61,7 @@ class EBML_DLL_API EbmlString : public EbmlElement {
|
||||
filepos_t UpdateSize(bool bWithDefault = false, bool bForceRender = false);
|
||||
|
||||
EbmlString & operator=(const std::string &);
|
||||
operator const std::string &() const {return Value;}
|
||||
operator const std::string &() const;
|
||||
|
||||
void SetDefaultValue(std::string &);
|
||||
|
||||
|
@ -69,10 +69,10 @@ class EBML_DLL_API EbmlUInteger : public EbmlElement {
|
||||
|
||||
virtual bool IsSmallerThan(const EbmlElement *Cmp) const;
|
||||
|
||||
operator uint8() const {return uint8(Value); }
|
||||
operator uint16() const {return uint16(Value);}
|
||||
operator uint32() const {return uint32(Value);}
|
||||
operator uint64() const {return Value;}
|
||||
operator uint8() const;
|
||||
operator uint16() const;
|
||||
operator uint32() const;
|
||||
operator uint64() const;
|
||||
|
||||
void SetDefaultValue(uint64);
|
||||
|
||||
|
@ -71,7 +71,7 @@ public:
|
||||
/// Return length of string
|
||||
size_t length() const {return _Length;}
|
||||
|
||||
operator const wchar_t*() const {return _Data;}
|
||||
operator const wchar_t*() const;
|
||||
const wchar_t* c_str() const {return _Data;}
|
||||
|
||||
const std::string & GetUTF8() const {return UTF8string;}
|
||||
@ -110,7 +110,7 @@ class EBML_DLL_API EbmlUnicodeString : public EbmlElement {
|
||||
filepos_t UpdateSize(bool bWithDefault = false, bool bForceRender = false);
|
||||
|
||||
EbmlUnicodeString & operator=(const UTFstring &); ///< platform dependant code
|
||||
operator const UTFstring &() const {return Value;}
|
||||
operator const UTFstring &() const;
|
||||
|
||||
void SetDefaultValue(UTFstring &);
|
||||
|
||||
|
@ -42,9 +42,9 @@
|
||||
|
||||
START_LIBEBML_NAMESPACE
|
||||
|
||||
#define LIBEBML_VERSION 0x010000
|
||||
#define LIBEBML_VERSION 0x010001
|
||||
|
||||
static const std::string EbmlCodeVersion = "1.0.0";
|
||||
static const std::string EbmlCodeVersion = "1.0.1";
|
||||
static const std::string EbmlCodeDate = __TIMESTAMP__;
|
||||
|
||||
/*!
|
||||
|
@ -2,7 +2,7 @@ Include "*/*.proj"
|
||||
|
||||
LIB ebml
|
||||
{
|
||||
PROJECT_VERSION 1.0.0
|
||||
PROJECT_VERSION 1.0.1
|
||||
|
||||
INCLUDE .
|
||||
EXPINCLUDE .
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: EbmlBinary.cpp 1112 2005-03-28 09:55:50Z mosu $
|
||||
\version \$Id$
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Julien Coloos <suiryc @ users.sf.net>
|
||||
*/
|
||||
@ -61,6 +61,9 @@ EbmlBinary::~EbmlBinary(void) {
|
||||
free(Data);
|
||||
}
|
||||
|
||||
EbmlBinary::operator const binary &() const {return *Data;}
|
||||
|
||||
|
||||
filepos_t EbmlBinary::RenderData(IOCallback & output, bool bForceRender, bool bWithDefault)
|
||||
{
|
||||
output.writeFully(Data,GetSize());
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: EbmlFloat.cpp 1243 2006-03-30 19:33:22Z mosu $
|
||||
\version \$Id$
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
|
||||
@ -73,6 +73,9 @@ const double EbmlFloat::DefaultVal() const
|
||||
return DefaultValue;
|
||||
}
|
||||
|
||||
EbmlFloat::operator const float() const {return float(Value);}
|
||||
EbmlFloat::operator const double() const {return double(Value);}
|
||||
|
||||
|
||||
/*!
|
||||
\todo handle exception on errors
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: EbmlSInteger.cpp 1079 2005-03-03 13:18:14Z robux4 $
|
||||
\version \$Id$
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Moritz Bunkus <moritz @ bunkus.org>
|
||||
*/
|
||||
@ -55,6 +55,11 @@ EbmlSInteger::EbmlSInteger(const EbmlSInteger & ElementToClone)
|
||||
{
|
||||
}
|
||||
|
||||
EbmlSInteger::operator int8() {return int8(Value);}
|
||||
EbmlSInteger::operator int16() {return int16(Value);}
|
||||
EbmlSInteger::operator int32() {return int32(Value);}
|
||||
EbmlSInteger::operator int64() {return Value;}
|
||||
|
||||
/*!
|
||||
\todo handle exception on errors
|
||||
*/
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: EbmlString.cpp 1079 2005-03-03 13:18:14Z robux4 $
|
||||
\version \$Id$
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
*/
|
||||
#include <cassert>
|
||||
@ -109,6 +109,8 @@ filepos_t EbmlString::RenderData(IOCallback & output, bool bForceRender, bool bW
|
||||
return Result;
|
||||
}
|
||||
|
||||
EbmlString::operator const std::string &() const {return Value;}
|
||||
|
||||
EbmlString & EbmlString::operator=(const std::string & NewString)
|
||||
{
|
||||
Value = NewString;
|
||||
|
@ -70,6 +70,11 @@ uint64 EbmlUInteger::DefaultVal() const
|
||||
return DefaultValue;
|
||||
}
|
||||
|
||||
EbmlUInteger::operator uint8() const {return uint8(Value); }
|
||||
EbmlUInteger::operator uint16() const {return uint16(Value);}
|
||||
EbmlUInteger::operator uint32() const {return uint32(Value);}
|
||||
EbmlUInteger::operator uint64() const {return Value;}
|
||||
|
||||
|
||||
/*!
|
||||
\todo handle exception on errors
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
/*!
|
||||
\file
|
||||
\version \$Id: EbmlUnicodeString.cpp 1079 2005-03-03 13:18:14Z robux4 $
|
||||
\version \$Id$
|
||||
\author Steve Lhomme <robux4 @ users.sf.net>
|
||||
\author Jory Stone <jcsston @ toughguy.net>
|
||||
*/
|
||||
@ -77,6 +77,9 @@ UTFstring & UTFstring::operator=(const UTFstring & _aBuf)
|
||||
return *this;
|
||||
}
|
||||
|
||||
UTFstring::operator const wchar_t*() const {return _Data;}
|
||||
|
||||
|
||||
UTFstring & UTFstring::operator=(const wchar_t * _aBuf)
|
||||
{
|
||||
delete [] _Data;
|
||||
@ -265,6 +268,8 @@ filepos_t EbmlUnicodeString::RenderData(IOCallback & output, bool bForceRender,
|
||||
return Result;
|
||||
}
|
||||
|
||||
EbmlUnicodeString::operator const UTFstring &() const {return Value;}
|
||||
|
||||
EbmlUnicodeString & EbmlUnicodeString::operator=(const UTFstring & NewString)
|
||||
{
|
||||
Value = NewString;
|
||||
|
Loading…
Reference in New Issue
Block a user