mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-06-15 11:44:07 +03:00
Fields to store cached instances of reader and writer drivers for each format are added in CDF_Application. Method DefineFormat() is added in TDocStd_Application, allowing defining format completely by single call, including drivers to be used for persistence. All OCAF driver packages provide static method DefineFormat() that defines standard OCAF persistence format supported by corresponding package; these methods are called in DRAW to enable all persistence by default. DRAW commands (except TObj-specific ones) now use single instance of OCAF Application, returned by DDocStd::GetApplication(). Other instances are eliminated, as well as method DDocStd::Find(const Handle(TDocStd_Application)&). Method MessageDriver() and relevant field are moved to TDocStd_Application from its descendants. Method CDF_Application::ReaderFromFormat() is made virtual to allow its redefinition in descendants. Creation of storage driver is moved from PCDM::StorageDriver() to new virtual method CDF_Application::WriterFromFormat(). The code loading driver as plugin is retained in both these methods for compatibility. Test command OCC24925 is converted to use virtual methods instead of defining plugin resource. Migration table for old OCAF types is hard-coded in Storage_Schema::CheckTypeMigration(). Removed obsolete and unused items: - FWOSPlugin library (driver is created directly) - Methods in classes CDM_Document dealing with unused parameters of format - DRAW command OCC23010 for testing non-reproducible issue #23010 - Methods PCDM::StorageDriver(), PCDM::FindStorageDriver() - Method Formats() from CDF_Application and descendants - Methods LoadExtensions and SchemaName from PCDM_StorageDriver - Method Plugin::AdditionalPluginMap() - Method BinLDrivers_DocumentStorageDriver::SchemaName() - Method CDF_Application::DefaultExtension(), Reader(), FindReader(), FindReaderFromFormat() - Method CDF_Store::Check()
52 lines
1.9 KiB
C++
52 lines
1.9 KiB
C++
// Created on: 2001-09-11
|
|
// Created by: Julia DOROVSKIKH
|
|
// Copyright (c) 2001-2014 OPEN CASCADE SAS
|
|
//
|
|
// This file is part of Open CASCADE Technology software library.
|
|
//
|
|
// This library is free software; you can redistribute it and/or modify it under
|
|
// the terms of the GNU Lesser General Public License version 2.1 as published
|
|
// by the Free Software Foundation, with special exception defined in the file
|
|
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
|
// distribution for complete text of the license and disclaimer of any warranty.
|
|
//
|
|
// Alternatively, this file may be used under the terms of Open CASCADE
|
|
// commercial license or contractual agreement.
|
|
|
|
#ifndef _XmlXCAFDrivers_HeaderFile
|
|
#define _XmlXCAFDrivers_HeaderFile
|
|
|
|
#include <Standard_Handle.hxx>
|
|
|
|
class Standard_Transient;
|
|
class Standard_GUID;
|
|
class XmlXCAFDrivers_DocumentRetrievalDriver;
|
|
class XmlXCAFDrivers_DocumentStorageDriver;
|
|
class TDocStd_Application;
|
|
|
|
class XmlXCAFDrivers
|
|
{
|
|
public:
|
|
|
|
//! Depending from the ID, returns a list of storage
|
|
//! or retrieval attribute drivers. Used for plugin.
|
|
//!
|
|
//! Standard data model drivers
|
|
//! ===========================
|
|
//! 47b0b826-d931-11d1-b5da-00a0c9064368 Transient-Persistent
|
|
//! 47b0b827-d931-11d1-b5da-00a0c9064368 Persistent-Transient
|
|
//!
|
|
//! XCAF data model drivers
|
|
//! =================================
|
|
//! ed8793f8-3142-11d4-b9b5-0060b0ee281b Transient-Persistent
|
|
//! ed8793f9-3142-11d4-b9b5-0060b0ee281b Persistent-Transient
|
|
//! ed8793fa-3142-11d4-b9b5-0060b0ee281b XCAFSchema
|
|
Standard_EXPORT static const Handle(Standard_Transient)& Factory (const Standard_GUID& aGUID);
|
|
|
|
//! Defines format "XmlXCAF" and registers its read and write drivers
|
|
//! in the specified application
|
|
Standard_EXPORT static void DefineFormat (const Handle(TDocStd_Application)& theApp);
|
|
};
|
|
|
|
#endif // _XmlXCAFDrivers_HeaderFile
|