mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0029217: Application Framework - nonsense API method XmlLDrivers::SetStorageVersion()
1. Unification of usage of a storage version of an OCAF document by XML and binary file formats. 2. A new format version enumeration in TDocStd package: TDocStd_FormatVersion. 3. Removal of unnecessary methods for storage version like XmlLDrivers::StorageVersion() and BinLDrivers::StorageVersion(). 4. Support of old documents (storage version <= 9) in binary file format (came from ESA). New files: - TDocStd_FormatVersion.hxx: a new storage format version enumeration for an OCAF document. Modified files: - CDM_Document.hxx and cxx: removal of storage format version property (moved to TDocStd_Document). - TDocStd_Document.hxx and cxx: a storage format version property (moved from CDM_Document). - BinLDrivers_DocumentSection.hxx and cxx: support of old document storage version in binary file format. - BinDrivers_DocumentStorageDriver.hxx and cxx, - BinLDrivers_DocumentStorageDriver.hxx and cxx, - BinLDrivers_DocumentRetrievalDriver.cxx, - XmlLDrivers_DocumentRetrievalDriver.cxx, - XmlLDrivers_DocumentStorageDriver.cxx: usage of document storage version from TDocStd_Document in storage and retrieval drivers. - DDocStd_ApplicationCommands.cxx: draw-command name StorageVersion is replaced by StorageFormatVersion (to be the same everywhere). A corresponding script is corrected too. New test: - bugs caf bug29217: a test case for old document storage version in binary file format. It checks several attributes saved by the version TDocStd_FormatVersion_VERSION_7 (old) and the latest version. Modified test: - caf presentation M1: the test used a file in the current folder, not in {imagedir} like all other tests. - bugs caf bug28691 Documentation: - dox/upgrade/upgrade.md // All remarks are fixed.
This commit is contained in:
@@ -54,8 +54,7 @@ CDM_Document::CDM_Document():
|
||||
myRequestedNameIsDefined (Standard_False),
|
||||
myRequestedPreviousVersionIsDefined(Standard_False),
|
||||
myFileExtensionWasFound (Standard_False),
|
||||
myDescriptionWasFound (Standard_False),
|
||||
myStorageFormatVersion (0)
|
||||
myDescriptionWasFound (Standard_False)
|
||||
{}
|
||||
|
||||
|
||||
@@ -1150,25 +1149,6 @@ void CDM_Document::SetReferenceCounter (const Standard_Integer aReferenceCounter
|
||||
myActualReferenceIdentifier=aReferenceCounter;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : StorageFormatVersion
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Integer CDM_Document::StorageFormatVersion() const
|
||||
{
|
||||
return myStorageFormatVersion;
|
||||
}
|
||||
|
||||
//!
|
||||
//=======================================================================
|
||||
//function : ChangeStorageFormatVersion
|
||||
//purpose : Sets <theVersion> of the format to be used to store the document
|
||||
//=======================================================================
|
||||
void CDM_Document::ChangeStorageFormatVersion(const Standard_Integer theVersion)
|
||||
{
|
||||
myStorageFormatVersion = theVersion;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : DumpJson
|
||||
//purpose :
|
||||
@@ -1214,6 +1194,4 @@ void CDM_Document::DumpJson (Standard_OStream& theOStream, Standard_Integer theD
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myDescriptionWasFound)
|
||||
|
||||
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myApplication.get())
|
||||
|
||||
OCCT_DUMP_FIELD_VALUE_NUMERICAL (theOStream, myStorageFormatVersion)
|
||||
}
|
||||
|
@@ -329,12 +329,6 @@ Standard_OStream& operator << (Standard_OStream& anOStream);
|
||||
|
||||
Standard_EXPORT void SetReferenceCounter (const Standard_Integer aReferenceCounter);
|
||||
|
||||
//! Returns version of the format to be used to store the document
|
||||
Standard_EXPORT Standard_Integer StorageFormatVersion() const;
|
||||
|
||||
//! Sets <theVersion> of the format to be used to store the document
|
||||
Standard_EXPORT void ChangeStorageFormatVersion(const Standard_Integer theVersion);
|
||||
|
||||
//! Dumps the content of me into the stream
|
||||
Standard_EXPORT void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const;
|
||||
|
||||
@@ -387,7 +381,6 @@ private:
|
||||
Standard_Boolean myFileExtensionWasFound;
|
||||
Standard_Boolean myDescriptionWasFound;
|
||||
Handle(CDM_Application) myApplication;
|
||||
Standard_Integer myStorageFormatVersion;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user