Author: robux4
Date: 2005-01-11 01:49:42 +0300 (Tue, 11 Jan 2005)
New Revision: 1033
Modified:
trunk/libebml/ebml/EbmlBinary.h
trunk/libebml/ebml/EbmlCrc32.h
trunk/libebml/ebml/EbmlDate.h
trunk/libebml/ebml/EbmlElement.h
trunk/libebml/ebml/EbmlFloat.h
trunk/libebml/ebml/EbmlMaster.h
trunk/libebml/ebml/EbmlSInteger.h
trunk/libebml/ebml/EbmlString.h
trunk/libebml/ebml/EbmlUInteger.h
trunk/libebml/ebml/EbmlUnicodeString.h
trunk/libebml/ebml/EbmlVoid.h
trunk/libebml/src/EbmlBinary.cpp
trunk/libebml/src/EbmlCrc32.cpp
trunk/libebml/src/EbmlDate.cpp
trunk/libebml/src/EbmlElement.cpp
trunk/libebml/src/EbmlFloat.cpp
trunk/libebml/src/EbmlMaster.cpp
trunk/libebml/src/EbmlSInteger.cpp
trunk/libebml/src/EbmlString.cpp
trunk/libebml/src/EbmlUInteger.cpp
trunk/libebml/src/EbmlUnicodeString.cpp
trunk/libebml/src/EbmlVoid.cpp
Log:
libebml: rename bSaveDefault in bKeepIntact
Modified: trunk/libebml/ebml/EbmlBinary.h
===================================================================
--- trunk/libebml/ebml/EbmlBinary.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlBinary.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -62,9 +62,9 @@
EbmlBinary(const EbmlBinary & ElementToClone);
virtual ~EbmlBinary(void);
- uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
+ uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
uint64 ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
- uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
+ uint64 UpdateSize(bool bKeepIntact = false, bool bForceRender = false);
void SetBuffer(const binary *Buffer, const uint32 BufferSize) {
Data = (binary *) Buffer;
Modified: trunk/libebml/ebml/EbmlCrc32.h
===================================================================
--- trunk/libebml/ebml/EbmlCrc32.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlCrc32.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -59,9 +59,9 @@
static EbmlElement & Create() {return *(new EbmlCrc32);}
const EbmlCallbacks & Generic() const {return ClassInfos;}
bool ValidateSize() const {return (Size == 4);}
- uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
+ uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
uint64 ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
-// uint64 UpdateSize(bool bSaveDefault = false);
+// uint64 UpdateSize(bool bKeepIntact = false);
static const EbmlCallbacks ClassInfos;
bool IsDefaultValue() const {
Modified: trunk/libebml/ebml/EbmlDate.h
===================================================================
--- trunk/libebml/ebml/EbmlDate.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlDate.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -65,7 +65,7 @@
/*!
\note no Default date handled
*/
- uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false) {
+ uint64 UpdateSize(bool bKeepIntact = false, bool bForceRender = false) {
if(!bValueIsSet)
Size = 0;
else
@@ -82,7 +82,7 @@
}
protected:
- uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
+ uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
int64 myDate; ///< internal format of the date
Modified: trunk/libebml/ebml/EbmlElement.h
===================================================================
--- trunk/libebml/ebml/EbmlElement.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlElement.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -182,11 +182,11 @@
uint64 GetElementPosition() const {return ElementPosition;}
- uint64 ElementSize(bool bSaveDefault = false) const; /// return the size of the header+data, before writing
+ uint64 ElementSize(bool bKeepIntact = false) const; /// return the size of the header+data, before writing
- uint32 Render(IOCallback & output, bool bSaveDefault = false, bool bKeepPosition = false, bool bForceRender = false);
+ uint32 Render(IOCallback & output, bool bKeepIntact = false, bool bKeepPosition = false, bool bForceRender = false);
- virtual uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false) = 0; /// update the Size of the Data stored
+ virtual uint64 UpdateSize(bool bKeepIntact = false, bool bForceRender = false) = 0; /// update the Size of the Data stored
virtual uint64 GetSize() const {return Size;} /// return the size of the data stored in the element, on reading
virtual uint64 ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA) = 0;
@@ -223,7 +223,7 @@
/*!
\brief void the content of the element (replace by EbmlVoid)
*/
- uint32 VoidMe(IOCallback & output, bool bSaveDefault = false);
+ uint32 VoidMe(IOCallback & output, bool bKeepIntact = false);
bool DefaultISset() const {return DefaultIsSet;}
virtual bool IsDefaultValue() const = 0;
@@ -253,13 +253,13 @@
*/
static EbmlElement *CreateElementUsingContext(const EbmlId & aID, const EbmlSemanticContext & Context, int & LowLevel, bool IsGlobalContext, bool bAllowDummy = false, unsigned int MaxLowerLevel = 1);
- uint32 RenderHead(IOCallback & output, bool bForceRender, bool bSaveDefault = false, bool bKeepPosition = false);
+ uint32 RenderHead(IOCallback & output, bool bForceRender, bool bKeepIntact = false, bool bKeepPosition = false);
uint32 MakeRenderHead(IOCallback & output, bool bKeepPosition);
/*!
\brief prepare the data before writing them (in case it's not already done by default)
*/
- virtual uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false) = 0;
+ virtual uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false) = 0;
/*!
\brief special constructor for cloning
Modified: trunk/libebml/ebml/EbmlFloat.h
===================================================================
--- trunk/libebml/ebml/EbmlFloat.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlFloat.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -61,9 +61,9 @@
return (Size == 4 || Size == 8);
}
- uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
+ uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
uint64 ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
- uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
+ uint64 UpdateSize(bool bKeepIntact = false, bool bForceRender = false);
void SetPrecision(const EbmlFloat::Precision prec = FLOAT_32)
{
Modified: trunk/libebml/ebml/EbmlMaster.h
===================================================================
--- trunk/libebml/ebml/EbmlMaster.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlMaster.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -61,9 +61,9 @@
*/
virtual ~EbmlMaster();
- uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
+ uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
uint64 ReadData(IOCallback & input, ScopeMode ReadFully);
- uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
+ uint64 UpdateSize(bool bKeepIntact = false, bool bForceRender = false);
/*!
\brief Set wether the size is finite (size is known in advance when writing, or infinite size is not known on writing)
@@ -141,7 +141,7 @@
\brief facility for Master elements to write only the head and force the size later
\warning
*/
- uint32 WriteHead(IOCallback & output, int SizeLength, bool bSaveDefault = false);
+ uint32 WriteHead(IOCallback & output, int SizeLength, bool bKeepIntact = false);
void EnableChecksum(bool bIsEnabled = true) { bChecksumUsed = bIsEnabled; }
bool HasChecksum() const {return bChecksumUsed;}
Modified: trunk/libebml/ebml/EbmlSInteger.h
===================================================================
--- trunk/libebml/ebml/EbmlSInteger.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlSInteger.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -63,9 +63,9 @@
void SetDefaultSize(const int nDefaultSize = DEFAULT_INT_SIZE) {Size = nDefaultSize;}
bool ValidateSize() const {return (Size <= 8);}
- uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
+ uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
uint64 ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
- uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
+ uint64 UpdateSize(bool bKeepIntact = false, bool bForceRender = false);
bool operator<(const EbmlSInteger & EltCmp) const {return Value < EltCmp.Value;}
Modified: trunk/libebml/ebml/EbmlString.h
===================================================================
--- trunk/libebml/ebml/EbmlString.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlString.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -56,9 +56,9 @@
virtual ~EbmlString() {}
bool ValidateSize() const {return true;} // any size is possible
- uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
+ uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
uint64 ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
- uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
+ uint64 UpdateSize(bool bKeepIntact = false, bool bForceRender = false);
EbmlString & operator=(const std::string);
operator const std::string &() const {return Value;}
Modified: trunk/libebml/ebml/EbmlUInteger.h
===================================================================
--- trunk/libebml/ebml/EbmlUInteger.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlUInteger.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -63,9 +63,9 @@
void SetDefaultSize(const int nDefaultSize = DEFAULT_UINT_SIZE) {Size = nDefaultSize;}
bool ValidateSize() const {return (Size <= 8);}
- uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
+ uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
uint64 ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
- uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
+ uint64 UpdateSize(bool bKeepIntact = false, bool bForceRender = false);
bool operator<(const EbmlUInteger & EltCmp) const {return Value < EltCmp.Value;}
Modified: trunk/libebml/ebml/EbmlUnicodeString.h
===================================================================
--- trunk/libebml/ebml/EbmlUnicodeString.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlUnicodeString.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -101,9 +101,9 @@
virtual ~EbmlUnicodeString() {}
bool ValidateSize() const {return true;} // any size is possible
- uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
+ uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
uint64 ReadData(IOCallback & input, ScopeMode ReadFully = SCOPE_ALL_DATA);
- uint64 UpdateSize(bool bSaveDefault = false, bool bForceRender = false);
+ uint64 UpdateSize(bool bKeepIntact = false, bool bForceRender = false);
EbmlUnicodeString & operator=(const UTFstring &); ///< platform dependant code
operator const UTFstring &() const {return Value;}
Modified: trunk/libebml/ebml/EbmlVoid.h
===================================================================
--- trunk/libebml/ebml/EbmlVoid.h 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/ebml/EbmlVoid.h 2005-01-10 22:49:42 UTC (rev 1033)
@@ -61,17 +61,17 @@
/*!
\note overwrite to write fake data
*/
- uint32 RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault = false);
+ uint32 RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact = false);
/*!
\brief Replace the void element content (written) with this one
*/
- uint64 ReplaceWith(EbmlElement & EltToReplaceWith, IOCallback & output, bool ComeBackAfterward = true, bool bSaveDefault = false);
+ uint64 ReplaceWith(EbmlElement & EltToReplaceWith, IOCallback & output, bool ComeBackAfterward = true, bool bKeepIntact = false);
/*!
\brief Void the content of an element
*/
- uint64 Overwrite(const EbmlElement & EltToVoid, IOCallback & output, bool ComeBackAfterward = true, bool bSaveDefault = false);
+ uint64 Overwrite(const EbmlElement & EltToVoid, IOCallback & output, bool ComeBackAfterward = true, bool bKeepIntact = false);
EbmlElement * Clone() const {return new EbmlVoid(*this);}
};
Modified: trunk/libebml/src/EbmlBinary.cpp
===================================================================
--- trunk/libebml/src/EbmlBinary.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlBinary.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -64,7 +64,7 @@
free(Data);
}
-uint32 EbmlBinary::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
+uint32 EbmlBinary::RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact)
{
output.writeFully(Data,Size);
@@ -74,7 +74,7 @@
/*!
\note no Default binary value handled
*/
-uint64 EbmlBinary::UpdateSize(bool bSaveDefault, bool bForceRender)
+uint64 EbmlBinary::UpdateSize(bool bKeepIntact, bool bForceRender)
{
return Size;
}
Modified: trunk/libebml/src/EbmlCrc32.cpp
===================================================================
--- trunk/libebml/src/EbmlCrc32.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlCrc32.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -193,7 +193,7 @@
return CheckCRC(m_crc_final, memoryBuffer.GetDataBuffer(), memoryBuffer.GetDataBufferSize());
};
-uint32 EbmlCrc32::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
+uint32 EbmlCrc32::RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact)
{
uint32 Result = DIGESTSIZE;
Modified: trunk/libebml/src/EbmlDate.cpp
===================================================================
--- trunk/libebml/src/EbmlDate.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlDate.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -65,7 +65,7 @@
return Size;
}
-uint32 EbmlDate::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
+uint32 EbmlDate::RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact)
{
if (Size != 0) {
assert(Size == 8);
Modified: trunk/libebml/src/EbmlElement.cpp
===================================================================
--- trunk/libebml/src/EbmlElement.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlElement.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -529,19 +529,19 @@
/*!
\todo verify that the size written is the same as the data written
*/
-uint32 EbmlElement::Render(IOCallback & output, bool bSaveDefault, bool bKeepPosition, bool bForceRender)
+uint32 EbmlElement::Render(IOCallback & output, bool bKeepIntact, bool bKeepPosition, bool bForceRender)
{
- assert(bValueIsSet || (bSaveDefault && DefaultISset())); // an element is been rendered without a value set !!!
+ assert(bValueIsSet || (bKeepIntact && DefaultISset())); // an element is been rendered without a value set !!!
// it may be a mandatory element without a default value
try {
- if (!bSaveDefault && IsDefaultValue()) {
+ if (!bKeepIntact && IsDefaultValue()) {
return 0;
}
#if defined(_DEBUG) || defined(DEBUG)
- uint64 SupposedSize = UpdateSize(bSaveDefault, bForceRender);
+ uint64 SupposedSize = UpdateSize(bKeepIntact, bForceRender);
#endif // _DEBUG
- uint32 result = RenderHead(output, bForceRender, bSaveDefault, bKeepPosition);
- uint64 WrittenSize = RenderData(output, bForceRender, bSaveDefault);
+ uint32 result = RenderHead(output, bForceRender, bKeepIntact, bKeepPosition);
+ uint64 WrittenSize = RenderData(output, bForceRender, bKeepIntact);
#if defined(_DEBUG) || defined(DEBUG)
if (SupposedSize != (0-1)) assert(WrittenSize == SupposedSize);
#endif // DEBUG
@@ -559,12 +559,12 @@
\todo handle exceptions on errors
\todo handle CodeSize bigger than 5 bytes
*/
-uint32 EbmlElement::RenderHead(IOCallback & output, bool bForceRender, bool bSaveDefault, bool bKeepPosition)
+uint32 EbmlElement::RenderHead(IOCallback & output, bool bForceRender, bool bKeepIntact, bool bKeepPosition)
{
if (EbmlId(*this).Length <= 0 || EbmlId(*this).Length > 4)
return 0;
- UpdateSize(bSaveDefault, bForceRender);
+ UpdateSize(bKeepIntact, bForceRender);
return MakeRenderHead(output, bKeepPosition);
}
@@ -590,9 +590,9 @@
return FinalHeadSize;
}
-uint64 EbmlElement::ElementSize(bool bSaveDefault) const
+uint64 EbmlElement::ElementSize(bool bKeepIntact) const
{
- if (!bSaveDefault && IsDefaultValue())
+ if (!bKeepIntact && IsDefaultValue())
return 0; // won't be saved
return Size + EbmlId(*this).Length + CodedSizeLength(Size, SizeLength);
}
@@ -643,14 +643,14 @@
return Result;
}
-uint32 EbmlElement::VoidMe(IOCallback & output, bool bSaveDefault)
+uint32 EbmlElement::VoidMe(IOCallback & output, bool bKeepIntact)
{
if (ElementPosition == 0) {
return 0; // the element has not been written
}
EbmlVoid Dummy;
- return Dummy.Overwrite(*this, output, bSaveDefault);
+ return Dummy.Overwrite(*this, output, bKeepIntact);
}
END_LIBEBML_NAMESPACE
Modified: trunk/libebml/src/EbmlFloat.cpp
===================================================================
--- trunk/libebml/src/EbmlFloat.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlFloat.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -64,7 +64,7 @@
\todo handle exception on errors
\todo handle 10 bits precision
*/
-uint32 EbmlFloat::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
+uint32 EbmlFloat::RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact)
{
assert(Size == 4 || Size == 8);
@@ -81,9 +81,9 @@
return Size;
}
-uint64 EbmlFloat::UpdateSize(bool bSaveDefault, bool bForceRender)
+uint64 EbmlFloat::UpdateSize(bool bKeepIntact, bool bForceRender)
{
- if (!bSaveDefault && IsDefaultValue())
+ if (!bKeepIntact && IsDefaultValue())
return 0;
return Size;
}
Modified: trunk/libebml/src/EbmlMaster.cpp
===================================================================
--- trunk/libebml/src/EbmlMaster.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlMaster.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -87,7 +87,7 @@
\todo handle exception on errors
\todo write all the Mandatory elements in the Context, otherwise assert
*/
-uint32 EbmlMaster::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
+uint32 EbmlMaster::RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact)
{
uint32 Result = 0;
size_t Index;
@@ -98,16 +98,16 @@
if (!bChecksumUsed) { // old school
for (Index = 0; Index < ElementList.size(); Index++) {
- if (!bSaveDefault && (ElementList[Index])->IsDefaultValue())
+ if (!bKeepIntact && (ElementList[Index])->IsDefaultValue())
continue;
- Result += (ElementList[Index])->Render(output, bSaveDefault, false ,bForceRender);
+ Result += (ElementList[Index])->Render(output, bKeepIntact, false ,bForceRender);
}
} else { // new school
MemIOCallback TmpBuf(Size - 6);
for (Index = 0; Index < ElementList.size(); Index++) {
- if (!bSaveDefault && (ElementList[Index])->IsDefaultValue())
+ if (!bKeepIntact && (ElementList[Index])->IsDefaultValue())
continue;
- (ElementList[Index])->Render(TmpBuf, bSaveDefault, false ,bForceRender);
+ (ElementList[Index])->Render(TmpBuf, bKeepIntact, false ,bForceRender);
}
Checksum.FillCRC32(TmpBuf.GetDataBuffer(), TmpBuf.GetDataBufferSize());
Result += Checksum.Render(output, true, false ,bForceRender);
@@ -127,7 +127,7 @@
return true;
}
-uint64 EbmlMaster::UpdateSize(bool bSaveDefault, bool bForceRender)
+uint64 EbmlMaster::UpdateSize(bool bKeepIntact, bool bForceRender)
{
Size = 0;
@@ -141,10 +141,10 @@
size_t Index;
for (Index = 0; Index < ElementList.size(); Index++) {
- if (!bSaveDefault && (ElementList[Index])->IsDefaultValue())
+ if (!bKeepIntact && (ElementList[Index])->IsDefaultValue())
continue;
- (ElementList[Index])->UpdateSize(bSaveDefault, bForceRender);
- uint64 SizeToAdd = (ElementList[Index])->ElementSize(bSaveDefault);
+ (ElementList[Index])->UpdateSize(bKeepIntact, bForceRender);
+ uint64 SizeToAdd = (ElementList[Index])->ElementSize(bKeepIntact);
#if defined(_DEBUG) || defined(DEBUG)
if (SizeToAdd == (0-1))
return (0-1);
@@ -158,10 +158,10 @@
return Size;
}
-uint32 EbmlMaster::WriteHead(IOCallback & output, int nSizeLength, bool bSaveDefault)
+uint32 EbmlMaster::WriteHead(IOCallback & output, int nSizeLength, bool bKeepIntact)
{
SetSizeLength(nSizeLength);
- return RenderHead(output, false, bSaveDefault);
+ return RenderHead(output, false, bKeepIntact);
}
/*!
Modified: trunk/libebml/src/EbmlSInteger.cpp
===================================================================
--- trunk/libebml/src/EbmlSInteger.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlSInteger.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -58,7 +58,7 @@
/*!
\todo handle exception on errors
*/
-uint32 EbmlSInteger::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
+uint32 EbmlSInteger::RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact)
{
binary FinalData[8]; // we don't handle more than 64 bits integers
unsigned int i;
@@ -77,9 +77,9 @@
return Size;
}
-uint64 EbmlSInteger::UpdateSize(bool bSaveDefault, bool bForceRender)
+uint64 EbmlSInteger::UpdateSize(bool bKeepIntact, bool bForceRender)
{
- if (!bSaveDefault && IsDefaultValue())
+ if (!bKeepIntact && IsDefaultValue())
return 0;
if (Value <= 0x7F && Value >= (-0x80)) {
Modified: trunk/libebml/src/EbmlString.cpp
===================================================================
--- trunk/libebml/src/EbmlString.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlString.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -73,7 +73,7 @@
/*!
\todo handle exception on errors
*/
-uint32 EbmlString::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
+uint32 EbmlString::RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact)
{
uint32 Result;
output.writeFully(Value.c_str(), Value.length());
@@ -106,9 +106,9 @@
return *this;
}
-uint64 EbmlString::UpdateSize(bool bSaveDefault, bool bForceRender)
+uint64 EbmlString::UpdateSize(bool bKeepIntact, bool bForceRender)
{
- if (!bSaveDefault && IsDefaultValue())
+ if (!bKeepIntact && IsDefaultValue())
return 0;
if (Value.length() < DefaultSize) {
Modified: trunk/libebml/src/EbmlUInteger.cpp
===================================================================
--- trunk/libebml/src/EbmlUInteger.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlUInteger.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -60,7 +60,7 @@
/*!
\todo handle exception on errors
*/
-uint32 EbmlUInteger::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
+uint32 EbmlUInteger::RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact)
{
binary FinalData[8]; // we don't handle more than 64 bits integers
@@ -78,9 +78,9 @@
return Size;
}
-uint64 EbmlUInteger::UpdateSize(bool bSaveDefault, bool bForceRender)
+uint64 EbmlUInteger::UpdateSize(bool bKeepIntact, bool bForceRender)
{
- if (!bSaveDefault && IsDefaultValue())
+ if (!bKeepIntact && IsDefaultValue())
return 0;
if (Value <= 0xFF) {
Modified: trunk/libebml/src/EbmlUnicodeString.cpp
===================================================================
--- trunk/libebml/src/EbmlUnicodeString.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlUnicodeString.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -228,7 +228,7 @@
\note limited to UCS-2
\todo handle exception on errors
*/
-uint32 EbmlUnicodeString::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
+uint32 EbmlUnicodeString::RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact)
{
uint32 Result = Value.GetUTF8().length();
@@ -261,9 +261,9 @@
/*!
\note limited to UCS-2
*/
-uint64 EbmlUnicodeString::UpdateSize(bool bSaveDefault, bool bForceRender)
+uint64 EbmlUnicodeString::UpdateSize(bool bKeepIntact, bool bForceRender)
{
- if (!bSaveDefault && IsDefaultValue())
+ if (!bKeepIntact && IsDefaultValue())
return 0;
Size = Value.GetUTF8().length();
Modified: trunk/libebml/src/EbmlVoid.cpp
===================================================================
--- trunk/libebml/src/EbmlVoid.cpp 2005-01-10 22:34:48 UTC (rev 1032)
+++ trunk/libebml/src/EbmlVoid.cpp 2005-01-10 22:49:42 UTC (rev 1033)
@@ -46,7 +46,7 @@
bValueIsSet = true;
}
-uint32 EbmlVoid::RenderData(IOCallback & output, bool bForceRender, bool bSaveDefault)
+uint32 EbmlVoid::RenderData(IOCallback & output, bool bForceRender, bool bKeepIntact)
{
// write dummy data by 4KB chunks
static binary DummyBuf[4*1024];
@@ -61,9 +61,9 @@
return Size;
}
-uint64 EbmlVoid::ReplaceWith(EbmlElement & EltToReplaceWith, IOCallback & output, bool ComeBackAfterward, bool bSaveDefault)
+uint64 EbmlVoid::ReplaceWith(EbmlElement & EltToReplaceWith, IOCallback & output, bool ComeBackAfterward, bool bKeepIntact)
{
- EltToReplaceWith.UpdateSize(bSaveDefault);
+ EltToReplaceWith.UpdateSize(bKeepIntact);
if (HeadSize() + Size < EltToReplaceWith.GetSize() + EltToReplaceWith.HeadSize()) {
// the element can't be written here !
return 0;
@@ -76,7 +76,7 @@
uint64 CurrentPosition = output.getFilePointer();
output.setFilePointer(GetElementPosition());
- EltToReplaceWith.Render(output, bSaveDefault);
+ EltToReplaceWith.Render(output, bKeepIntact);
if (HeadSize() + Size - EltToReplaceWith.GetSize() - EltToReplaceWith.HeadSize() > 1) {
// fill the rest with another void element
@@ -88,7 +88,7 @@
if (HeadBefore != HeadAfter) {
aTmp.SetSizeLength(CodedSizeLength(aTmp.Size, aTmp.SizeLength) - (HeadAfter - HeadBefore));
}
- aTmp.RenderHead(output, false, bSaveDefault); // the rest of the data is not rewritten
+ aTmp.RenderHead(output, false, bKeepIntact); // the rest of the data is not rewritten
}
if (ComeBackAfterward) {
@@ -98,9 +98,9 @@
return Size + HeadSize();
}
-uint64 EbmlVoid::Overwrite(const EbmlElement & EltToVoid, IOCallback & output, bool ComeBackAfterward, bool bSaveDefault)
+uint64 EbmlVoid::Overwrite(const EbmlElement & EltToVoid, IOCallback & output, bool ComeBackAfterward, bool bKeepIntact)
{
-// EltToVoid.UpdateSize(bSaveDefault);
+// EltToVoid.UpdateSize(bKeepIntact);
if (EltToVoid.GetElementPosition() == 0) {
// this element has never been written
return 0;
@@ -126,7 +126,7 @@
}
if (Size != 0) {
- RenderHead(output, false, bSaveDefault); // the rest of the data is not rewritten
+ RenderHead(output, false, bKeepIntact); // the rest of the data is not rewritten
}
if (ComeBackAfterward) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.