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

0029014: Managing Binary Format Version Is Not Possible for Own TDF_Attributes

CDM_Application has been extended to provide application name and version.

Application name and version is stored by BinLDrivers_DocumentStorageDriver.

BinLDrivers_DocumentStorageDriver propagates application name and version
by passing it to BinMDataStd.

Made BinObjMgt_RRelocationTable store a handle to the header data of the file
begin read in to make it accessible by binary attribute drivers.

Undone storing application name and version as static fields in BinMDataStd
which is bad style and not thread-safe.

Moved method implementations to .cxx files.

Clearing a BinObjMgt_RRelocationTable now nullifies the reference to the
file header data and BinLDrivers_DocumentRetrievalDriver therefore sets
the reference after the relocation table has been cleared before reading
in the document subtree.
This commit is contained in:
Benjamin Bihler
2017-08-18 10:40:19 +03:00
committed by bugmaster
parent bcb8fa43ea
commit fe21f79693
7 changed files with 115 additions and 3 deletions

View File

@@ -103,3 +103,25 @@ void CDM_Application::EndOfUpdate
message+=aDocument->Presentation();
Write(message.ToExtString());
}
//=======================================================================
//function : Name
//purpose : returns the application name
//=======================================================================
TCollection_ExtendedString CDM_Application::Name() const
{
// Default: empty
return TCollection_ExtendedString();
}
//=======================================================================
//function : Version
//purpose : returns the application version
//=======================================================================
TCollection_AsciiString CDM_Application::Version() const
{
// Default: empty
return TCollection_AsciiString();
}

View File

@@ -24,12 +24,14 @@
#include <Standard_Boolean.hxx>
#include <Standard_Integer.hxx>
#include <Standard_ExtString.hxx>
#include <TCollection_AsciiString.hxx>
#include <TCollection_ExtendedString.hxx>
class CDM_Reference;
class CDM_MetaData;
class CDM_Document;
class Resource_Manager;
class CDM_MessageDriver;
class TCollection_ExtendedString;
class CDM_Application;
@@ -60,6 +62,11 @@ public:
//! writes the string in the application MessagerDriver.
Standard_EXPORT void Write (const Standard_ExtString aString);
//! Returns the application name.
Standard_EXPORT virtual TCollection_ExtendedString Name() const;
//! Returns the application version.
Standard_EXPORT virtual TCollection_AsciiString Version() const;
friend class CDM_Reference;
friend class CDM_MetaData;