mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +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:
@@ -2177,3 +2177,15 @@ For example:
|
||||
gives different result.
|
||||
In current version ST1 - surface trimmed only along V, U trim is removed;
|
||||
After modification ST1 - surface trimmed along U and V, U trim is kept.
|
||||
|
||||
@subsection upgrade_760_storageformatversion Storage format version of OCAF document
|
||||
|
||||
The methods *XmlLDrivers::StorageVersion()* and *BinLDrivers::StorageVersion()* were removed.
|
||||
Since now *TDocStd_Document* manupulates the storage format version of a document for both XML and binary file formats.
|
||||
For this the methods *StorageFormatVersion()* and *ChangeStorageFormatVersion()* were moved from *CDM_Document* to *TDocStd_Document*.
|
||||
The methods are used to get and set the storage format version of a document.
|
||||
A new enumeration *TDocStd_FormatVersion* lists the storage format versions of a document. By default, the document uses the latest (current) storage format version.
|
||||
In order to save a document in an older storage format version, call the method *ChangeStorageFormatVersion()* with one of the values from the enumeration.
|
||||
This value will be used by storage drivers of a corresponding OCAF file format (XML or binary) and the document will be saved
|
||||
following the rules of the specified storage format version (corresponding to an older version of Open CASCADE Technology).
|
||||
This way an application based on an old version of Open CASCADE Technology may read documents saved by new applications (based on newer version of Open CASCADE Technology).
|
||||
|
Reference in New Issue
Block a user