1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0030169: Application Framework - Document format version management improvement

This commit is contained in:
szy
2018-10-09 17:30:10 +03:00
committed by apn
parent 90fd614536
commit b34d86cb28
58 changed files with 315 additions and 305 deletions

View File

@@ -60,7 +60,8 @@ CDM_Document::CDM_Document():
myRequestedNameIsDefined (Standard_False),
myRequestedPreviousVersionIsDefined(Standard_False),
myFileExtensionWasFound (Standard_False),
myDescriptionWasFound (Standard_False)
myDescriptionWasFound (Standard_False),
myStorageFormatVersion (0)
{}
@@ -1264,3 +1265,22 @@ 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;
}

View File

@@ -343,6 +343,12 @@ 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);
friend class CDM_Reference;
friend class CDM_ReferenceIterator;
friend class CDM_Application;
@@ -359,7 +365,6 @@ protected:
Standard_Boolean myResourcesAreLoaded;
private:
@@ -398,7 +403,7 @@ private:
Standard_Boolean myFileExtensionWasFound;
Standard_Boolean myDescriptionWasFound;
Handle(CDM_Application) myApplication;
Standard_Integer myStorageFormatVersion;
};