mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0024002: Overall code and build procedure refactoring -- automatic
Automatic upgrade of OCCT code by command "occt_upgrade . -nocdl": - WOK-generated header files from inc and sources from drv are moved to src - CDL files removed - All packages are converted to nocdlpack
This commit is contained in:
@@ -1,4 +1,14 @@
|
||||
XmlMDF_MapOfDriver.hxx
|
||||
XmlMDF.cxx
|
||||
XmlMDF.hxx
|
||||
XmlMDF_ADriver.cxx
|
||||
XmlMDF_ADriver.hxx
|
||||
XmlMDF_ADriverTable.cxx
|
||||
XmlMDF_ADriverTable.hxx
|
||||
XmlMDF_DataMapIteratorOfMapOfDriver.hxx
|
||||
XmlMDF_TypeADriverMap.hxx
|
||||
XmlMDF_DataMapIteratorOfTypeADriverMap.hxx
|
||||
XmlMDF_MapOfDriver.hxx
|
||||
XmlMDF_ReferenceDriver.cxx
|
||||
XmlMDF_ReferenceDriver.hxx
|
||||
XmlMDF_TagSourceDriver.cxx
|
||||
XmlMDF_TagSourceDriver.hxx
|
||||
XmlMDF_TypeADriverMap.hxx
|
||||
|
@@ -1,112 +0,0 @@
|
||||
-- Created on: 2001-07-09
|
||||
-- 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.
|
||||
|
||||
package XmlMDF
|
||||
|
||||
---Purpose: This package provides classes and methods to
|
||||
-- translate a transient DF into a persistent one and
|
||||
-- vice versa.
|
||||
--
|
||||
-- Driver
|
||||
--
|
||||
-- A driver is a tool used to translate a transient
|
||||
-- attribute into a persistent one and vice versa.
|
||||
--
|
||||
-- Driver Table
|
||||
--
|
||||
-- A driver table is an object building links between
|
||||
-- object types and object drivers. In the
|
||||
-- translation process, a driver table is asked to
|
||||
-- give a translation driver for each current object
|
||||
-- to be translated.
|
||||
|
||||
uses
|
||||
TCollection,
|
||||
TColStd,
|
||||
TDF,
|
||||
CDM,
|
||||
XmlObjMgt
|
||||
|
||||
is
|
||||
---Category: Classes
|
||||
-- =============================================================
|
||||
|
||||
deferred class ADriver; -- Attribute Storage/Retrieve Driver.
|
||||
|
||||
imported MapOfDriver;
|
||||
|
||||
imported DataMapIteratorOfMapOfDriver;
|
||||
|
||||
---Category: Storage and Retrieval attributes drivers
|
||||
-- ========================================
|
||||
|
||||
class TagSourceDriver;
|
||||
|
||||
class ReferenceDriver;
|
||||
|
||||
---Category: Instantiations
|
||||
-- =============================================================
|
||||
|
||||
-- Map (Type, ADriver)
|
||||
imported TypeADriverMap;
|
||||
imported DataMapIteratorOfTypeADriverMap;
|
||||
|
||||
-- Attribute Storage Driver Table.
|
||||
class ADriverTable;
|
||||
|
||||
|
||||
-- Package methods
|
||||
|
||||
FromTo(aSource : Data from TDF;
|
||||
aTarget : in out Element from XmlObjMgt;
|
||||
aReloc : in out SRelocationTable from XmlObjMgt;
|
||||
aDrivers : ADriverTable from XmlMDF);
|
||||
---Purpose: Translates a transient <aSource> into a persistent
|
||||
-- <aTarget>.
|
||||
|
||||
WriteSubTree(theLabel : Label from TDF;
|
||||
theElement : in out Element from XmlObjMgt;
|
||||
aReloc : in out SRelocationTable from XmlObjMgt;
|
||||
aDrivers : ADriverTable from XmlMDF)
|
||||
returns Integer from Standard
|
||||
is private;
|
||||
---Purpose:
|
||||
|
||||
FromTo(aSource : Element from XmlObjMgt;
|
||||
aTarget : in out Data from TDF;
|
||||
aReloc : in out RRelocationTable from XmlObjMgt;
|
||||
aDrivers : ADriverTable from XmlMDF)
|
||||
returns Boolean from Standard;
|
||||
---Purpose: Translates a persistent <aSource> into a transient
|
||||
-- <aTarget>.
|
||||
-- Returns True if completed successfully (False on error)
|
||||
|
||||
ReadSubTree (theElement : Element from XmlObjMgt;
|
||||
theLabel : Label from TDF;
|
||||
aReloc : in out RRelocationTable from XmlObjMgt;
|
||||
aDrivers : MapOfDriver from XmlMDF)
|
||||
returns Integer from Standard
|
||||
is private;
|
||||
---Purpose:
|
||||
|
||||
AddDrivers (aDriverTable : ADriverTable from XmlMDF;
|
||||
theMessageDriver: MessageDriver from CDM);
|
||||
---Purpose: Adds the attribute storage drivers to <aDriverSeq>.
|
||||
|
||||
CreateDrvMap (aDriverTable : ADriverTable from XmlMDF;
|
||||
anAsciiDriverMap: out MapOfDriver from XmlMDF)
|
||||
is private;
|
||||
|
||||
end XmlMDF;
|
@@ -13,24 +13,26 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XmlMDF.ixx>
|
||||
#include <XmlMDF_ADriver.hxx>
|
||||
#include <XmlMDF_TagSourceDriver.hxx>
|
||||
#include <XmlMDF_ReferenceDriver.hxx>
|
||||
#include <XmlMDF_DataMapIteratorOfTypeADriverMap.hxx>
|
||||
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
#include <XmlObjMgt_DOMString.hxx>
|
||||
#include <XmlObjMgt_Document.hxx>
|
||||
|
||||
#include <TDF_TagSource.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
#include <TDF_Tool.hxx>
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <Storage_Schema.hxx>
|
||||
#include <TColStd_MapOfTransient.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDF_AttributeIterator.hxx>
|
||||
#include <TDF_ChildIterator.hxx>
|
||||
#include <TColStd_MapOfTransient.hxx>
|
||||
#include <Storage_Schema.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDF_Data.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
#include <TDF_TagSource.hxx>
|
||||
#include <TDF_Tool.hxx>
|
||||
#include <XmlMDF.hxx>
|
||||
#include <XmlMDF_ADriver.hxx>
|
||||
#include <XmlMDF_ADriverTable.hxx>
|
||||
#include <XmlMDF_DataMapIteratorOfTypeADriverMap.hxx>
|
||||
#include <XmlMDF_ReferenceDriver.hxx>
|
||||
#include <XmlMDF_TagSourceDriver.hxx>
|
||||
#include <XmlObjMgt_Document.hxx>
|
||||
#include <XmlObjMgt_DOMString.hxx>
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
|
||||
IMPLEMENT_DOMSTRING (TagString, "tag")
|
||||
IMPLEMENT_DOMSTRING (LabelString, "label")
|
||||
|
107
src/XmlMDF/XmlMDF.hxx
Normal file
107
src/XmlMDF/XmlMDF.hxx
Normal file
@@ -0,0 +1,107 @@
|
||||
// Created on: 2001-07-09
|
||||
// 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 _XmlMDF_HeaderFile
|
||||
#define _XmlMDF_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_DefineAlloc.hxx>
|
||||
#include <Standard_Handle.hxx>
|
||||
|
||||
#include <XmlObjMgt_Element.hxx>
|
||||
#include <XmlObjMgt_SRelocationTable.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <XmlObjMgt_RRelocationTable.hxx>
|
||||
#include <XmlMDF_MapOfDriver.hxx>
|
||||
class TDF_Data;
|
||||
class XmlMDF_ADriverTable;
|
||||
class TDF_Label;
|
||||
class CDM_MessageDriver;
|
||||
class XmlMDF_ADriver;
|
||||
class XmlMDF_TagSourceDriver;
|
||||
class XmlMDF_ReferenceDriver;
|
||||
class XmlMDF_ADriverTable;
|
||||
|
||||
|
||||
//! This package provides classes and methods to
|
||||
//! translate a transient DF into a persistent one and
|
||||
//! vice versa.
|
||||
//!
|
||||
//! Driver
|
||||
//!
|
||||
//! A driver is a tool used to translate a transient
|
||||
//! attribute into a persistent one and vice versa.
|
||||
//!
|
||||
//! Driver Table
|
||||
//!
|
||||
//! A driver table is an object building links between
|
||||
//! object types and object drivers. In the
|
||||
//! translation process, a driver table is asked to
|
||||
//! give a translation driver for each current object
|
||||
//! to be translated.
|
||||
class XmlMDF
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
|
||||
//! Translates a transient <aSource> into a persistent
|
||||
//! <aTarget>.
|
||||
Standard_EXPORT static void FromTo (const Handle(TDF_Data)& aSource, XmlObjMgt_Element& aTarget, XmlObjMgt_SRelocationTable& aReloc, const Handle(XmlMDF_ADriverTable)& aDrivers);
|
||||
|
||||
//! Translates a persistent <aSource> into a transient
|
||||
//! <aTarget>.
|
||||
//! Returns True if completed successfully (False on error)
|
||||
Standard_EXPORT static Standard_Boolean FromTo (const XmlObjMgt_Element& aSource, Handle(TDF_Data)& aTarget, XmlObjMgt_RRelocationTable& aReloc, const Handle(XmlMDF_ADriverTable)& aDrivers);
|
||||
|
||||
//! Adds the attribute storage drivers to <aDriverSeq>.
|
||||
Standard_EXPORT static void AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable, const Handle(CDM_MessageDriver)& theMessageDriver);
|
||||
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_EXPORT static Standard_Integer WriteSubTree (const TDF_Label& theLabel, XmlObjMgt_Element& theElement, XmlObjMgt_SRelocationTable& aReloc, const Handle(XmlMDF_ADriverTable)& aDrivers);
|
||||
|
||||
Standard_EXPORT static Standard_Integer ReadSubTree (const XmlObjMgt_Element& theElement, const TDF_Label& theLabel, XmlObjMgt_RRelocationTable& aReloc, const XmlMDF_MapOfDriver& aDrivers);
|
||||
|
||||
Standard_EXPORT static void CreateDrvMap (const Handle(XmlMDF_ADriverTable)& aDriverTable, XmlMDF_MapOfDriver& anAsciiDriverMap);
|
||||
|
||||
|
||||
|
||||
friend class XmlMDF_ADriver;
|
||||
friend class XmlMDF_TagSourceDriver;
|
||||
friend class XmlMDF_ReferenceDriver;
|
||||
friend class XmlMDF_ADriverTable;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XmlMDF_HeaderFile
|
@@ -1,80 +0,0 @@
|
||||
-- Created on: 2001-07-09
|
||||
-- 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.
|
||||
|
||||
deferred class ADriver from XmlMDF inherits TShared from MMgt
|
||||
|
||||
---Purpose: Attribute Storage/Retrieval Driver.
|
||||
|
||||
uses
|
||||
AsciiString from TCollection,
|
||||
ExtendedString from TCollection,
|
||||
Attribute from TDF,
|
||||
MessageDriver from CDM,
|
||||
RRelocationTable from XmlObjMgt,
|
||||
SRelocationTable from XmlObjMgt,
|
||||
Persistent from XmlObjMgt,
|
||||
Element from XmlObjMgt
|
||||
|
||||
is
|
||||
Initialize (theMessageDriver : MessageDriver from CDM;
|
||||
theNamespace : CString from Standard;
|
||||
theName : CString from Standard = NULL);
|
||||
|
||||
VersionNumber(me) returns Integer from Standard
|
||||
is virtual;
|
||||
---Purpose: Returns the version number from which the driver
|
||||
-- is available.
|
||||
|
||||
NewEmpty (me)
|
||||
returns Attribute from TDF
|
||||
is deferred;
|
||||
---Purpose: Creates a new attribute from TDF.
|
||||
|
||||
SourceType (me) returns Type from Standard;
|
||||
---Purpose: Returns the type of source object,
|
||||
-- inheriting from Attribute from TDF.
|
||||
|
||||
TypeName (me)
|
||||
returns AsciiString from TCollection
|
||||
is static;
|
||||
---C++: return const &
|
||||
---Purpose: Returns the full XML tag name (including NS prefix)
|
||||
|
||||
Paste (me; aSource : Persistent from XmlObjMgt;
|
||||
aTarget : Attribute from TDF;
|
||||
aRelocTable : out RRelocationTable from XmlObjMgt)
|
||||
returns Boolean from Standard
|
||||
is deferred;
|
||||
---Purpose: Translate the contents of <aSource> and put it
|
||||
-- into <aTarget>, using the relocation table
|
||||
-- <aRelocTable> to keep the sharings.
|
||||
|
||||
Paste (me; aSource : Attribute from TDF;
|
||||
aTarget : in out Persistent from XmlObjMgt;
|
||||
aRelocTable : out SRelocationTable from XmlObjMgt)
|
||||
is deferred;
|
||||
---Purpose: Translate the contents of <aSource> and put it
|
||||
-- into <aTarget>, using the relocation table
|
||||
-- <aRelocTable> to keep the sharings.
|
||||
|
||||
WriteMessage (me; theMessage : ExtendedString from TCollection);
|
||||
---Purpose: Send message to Application (usually when error occurres)
|
||||
|
||||
fields
|
||||
|
||||
myMessageDriver : MessageDriver from CDM;
|
||||
myTypeName : AsciiString from TCollection is protected;
|
||||
|
||||
end ADriver;
|
@@ -13,13 +13,19 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XmlMDF_ADriver.ixx>
|
||||
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <TCollection_ExtendedString.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <XmlMDF_ADriver.hxx>
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : XmlMDF_ADriver
|
||||
//purpose : Constructor
|
||||
//=======================================================================
|
||||
|
||||
XmlMDF_ADriver::XmlMDF_ADriver (const Handle(CDM_MessageDriver)& theMsgDriver,
|
||||
const Standard_CString theNS,
|
||||
const Standard_CString theName)
|
||||
|
101
src/XmlMDF/XmlMDF_ADriver.hxx
Normal file
101
src/XmlMDF/XmlMDF_ADriver.hxx
Normal file
@@ -0,0 +1,101 @@
|
||||
// Created on: 2001-07-09
|
||||
// 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 _XmlMDF_ADriver_HeaderFile
|
||||
#define _XmlMDF_ADriver_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_CString.hxx>
|
||||
#include <Standard_Integer.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <XmlObjMgt_RRelocationTable.hxx>
|
||||
#include <XmlObjMgt_SRelocationTable.hxx>
|
||||
class CDM_MessageDriver;
|
||||
class TDF_Attribute;
|
||||
class TCollection_AsciiString;
|
||||
class XmlObjMgt_Persistent;
|
||||
class TCollection_ExtendedString;
|
||||
|
||||
|
||||
class XmlMDF_ADriver;
|
||||
DEFINE_STANDARD_HANDLE(XmlMDF_ADriver, MMgt_TShared)
|
||||
|
||||
//! Attribute Storage/Retrieval Driver.
|
||||
class XmlMDF_ADriver : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Returns the version number from which the driver
|
||||
//! is available.
|
||||
Standard_EXPORT virtual Standard_Integer VersionNumber() const;
|
||||
|
||||
//! Creates a new attribute from TDF.
|
||||
Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const = 0;
|
||||
|
||||
//! Returns the type of source object,
|
||||
//! inheriting from Attribute from TDF.
|
||||
Standard_EXPORT Handle(Standard_Type) SourceType() const;
|
||||
|
||||
//! Returns the full XML tag name (including NS prefix)
|
||||
Standard_EXPORT const TCollection_AsciiString& TypeName() const;
|
||||
|
||||
//! Translate the contents of <aSource> and put it
|
||||
//! into <aTarget>, using the relocation table
|
||||
//! <aRelocTable> to keep the sharings.
|
||||
Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& aSource, const Handle(TDF_Attribute)& aTarget, XmlObjMgt_RRelocationTable& aRelocTable) const = 0;
|
||||
|
||||
//! Translate the contents of <aSource> and put it
|
||||
//! into <aTarget>, using the relocation table
|
||||
//! <aRelocTable> to keep the sharings.
|
||||
Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& aSource, XmlObjMgt_Persistent& aTarget, XmlObjMgt_SRelocationTable& aRelocTable) const = 0;
|
||||
|
||||
//! Send message to Application (usually when error occurres)
|
||||
Standard_EXPORT void WriteMessage (const TCollection_ExtendedString& theMessage) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(XmlMDF_ADriver,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Standard_EXPORT XmlMDF_ADriver(const Handle(CDM_MessageDriver)& theMessageDriver, const Standard_CString theNamespace, const Standard_CString theName = NULL);
|
||||
|
||||
TCollection_AsciiString myTypeName;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(CDM_MessageDriver) myMessageDriver;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XmlMDF_ADriver_HeaderFile
|
@@ -1,52 +0,0 @@
|
||||
-- Created on: 2001-09-26
|
||||
-- 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.
|
||||
|
||||
class ADriverTable from XmlMDF inherits TShared from MMgt
|
||||
|
||||
---Purpose: A driver table is an object building links between
|
||||
-- object types and object drivers. In the
|
||||
-- translation process, a driver table is asked to
|
||||
-- give a translation driver for each current object
|
||||
-- to be translated.
|
||||
|
||||
uses
|
||||
Type from Standard,
|
||||
MapTransientHasher from TColStd,
|
||||
ADriver from XmlMDF,
|
||||
TypeADriverMap from XmlMDF
|
||||
|
||||
is
|
||||
Create returns ADriverTable from XmlMDF;
|
||||
---Purpose: Creates a mutable ADriverTable from XmlMDF.
|
||||
|
||||
AddDriver(me : mutable; anHDriver : ADriver from XmlMDF);
|
||||
---Purpose: Sets a translation driver: <aDriver>.
|
||||
|
||||
GetDrivers(me)
|
||||
returns TypeADriverMap from XmlMDF;
|
||||
---Purpose: Gets a map of drivers.
|
||||
---C++: return const &
|
||||
|
||||
GetDriver(me; aType : Type from Standard;
|
||||
anHDriver : in out ADriver from XmlMDF)
|
||||
returns Boolean from Standard;
|
||||
---Purpose: Gets a driver <aDriver> according to <aType>
|
||||
--
|
||||
-- Returns True if a driver is found; false otherwise.
|
||||
|
||||
fields
|
||||
myMap : TypeADriverMap from XmlMDF;
|
||||
|
||||
end ADriverTable;
|
@@ -13,7 +13,10 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#include <XmlMDF_ADriverTable.ixx>
|
||||
|
||||
#include <Standard_Type.hxx>
|
||||
#include <XmlMDF_ADriver.hxx>
|
||||
#include <XmlMDF_ADriverTable.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : MDF_ADriverTable
|
||||
|
81
src/XmlMDF/XmlMDF_ADriverTable.hxx
Normal file
81
src/XmlMDF/XmlMDF_ADriverTable.hxx
Normal file
@@ -0,0 +1,81 @@
|
||||
// Created on: 2001-09-26
|
||||
// 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 _XmlMDF_ADriverTable_HeaderFile
|
||||
#define _XmlMDF_ADriverTable_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <XmlMDF_TypeADriverMap.hxx>
|
||||
#include <MMgt_TShared.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
class XmlMDF_ADriver;
|
||||
|
||||
|
||||
class XmlMDF_ADriverTable;
|
||||
DEFINE_STANDARD_HANDLE(XmlMDF_ADriverTable, MMgt_TShared)
|
||||
|
||||
//! A driver table is an object building links between
|
||||
//! object types and object drivers. In the
|
||||
//! translation process, a driver table is asked to
|
||||
//! give a translation driver for each current object
|
||||
//! to be translated.
|
||||
class XmlMDF_ADriverTable : public MMgt_TShared
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates a mutable ADriverTable from XmlMDF.
|
||||
Standard_EXPORT XmlMDF_ADriverTable();
|
||||
|
||||
//! Sets a translation driver: <aDriver>.
|
||||
Standard_EXPORT void AddDriver (const Handle(XmlMDF_ADriver)& anHDriver);
|
||||
|
||||
//! Gets a map of drivers.
|
||||
Standard_EXPORT const XmlMDF_TypeADriverMap& GetDrivers() const;
|
||||
|
||||
//! Gets a driver <aDriver> according to <aType>
|
||||
//!
|
||||
//! Returns True if a driver is found; false otherwise.
|
||||
Standard_EXPORT Standard_Boolean GetDriver (const Handle(Standard_Type)& aType, Handle(XmlMDF_ADriver)& anHDriver) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(XmlMDF_ADriverTable,MMgt_TShared)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
XmlMDF_TypeADriverMap myMap;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XmlMDF_ADriverTable_HeaderFile
|
@@ -1,42 +0,0 @@
|
||||
-- Created on: 2001-09-04
|
||||
-- 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.
|
||||
|
||||
class ReferenceDriver from XmlMDF inherits ADriver from XmlMDF
|
||||
|
||||
---Purpose: Attribute Driver.
|
||||
|
||||
uses
|
||||
SRelocationTable from XmlObjMgt,
|
||||
RRelocationTable from XmlObjMgt,
|
||||
Persistent from XmlObjMgt,
|
||||
MessageDriver from CDM,
|
||||
Attribute from TDF
|
||||
|
||||
is
|
||||
Create (theMessageDriver:MessageDriver from CDM)
|
||||
returns ReferenceDriver from XmlMDF;
|
||||
|
||||
NewEmpty (me) returns Attribute from TDF;
|
||||
|
||||
Paste(me; Source : Persistent from XmlObjMgt;
|
||||
Target : Attribute from TDF;
|
||||
RelocTable : out RRelocationTable from XmlObjMgt)
|
||||
returns Boolean from Standard;
|
||||
|
||||
Paste(me; Source : Attribute from TDF;
|
||||
Target : in out Persistent from XmlObjMgt;
|
||||
RelocTable : out SRelocationTable from XmlObjMgt);
|
||||
|
||||
end ReferenceDriver;
|
@@ -15,11 +15,14 @@
|
||||
|
||||
//AGV 150202: Changed prototype XmlObjMgt::SetStringValue()
|
||||
|
||||
#include <XmlMDF_ReferenceDriver.ixx>
|
||||
#include <XmlObjMgt.hxx>
|
||||
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDF_Reference.hxx>
|
||||
#include <TDF_Tool.hxx>
|
||||
#include <XmlMDF_ReferenceDriver.hxx>
|
||||
#include <XmlObjMgt.hxx>
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : XmlMDF_ReferenceDriver
|
||||
|
72
src/XmlMDF/XmlMDF_ReferenceDriver.hxx
Normal file
72
src/XmlMDF/XmlMDF_ReferenceDriver.hxx
Normal file
@@ -0,0 +1,72 @@
|
||||
// Created on: 2001-09-04
|
||||
// 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 _XmlMDF_ReferenceDriver_HeaderFile
|
||||
#define _XmlMDF_ReferenceDriver_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <XmlMDF_ADriver.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <XmlObjMgt_RRelocationTable.hxx>
|
||||
#include <XmlObjMgt_SRelocationTable.hxx>
|
||||
class CDM_MessageDriver;
|
||||
class TDF_Attribute;
|
||||
class XmlObjMgt_Persistent;
|
||||
|
||||
|
||||
class XmlMDF_ReferenceDriver;
|
||||
DEFINE_STANDARD_HANDLE(XmlMDF_ReferenceDriver, XmlMDF_ADriver)
|
||||
|
||||
//! Attribute Driver.
|
||||
class XmlMDF_ReferenceDriver : public XmlMDF_ADriver
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT XmlMDF_ReferenceDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
|
||||
|
||||
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const;
|
||||
|
||||
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(XmlMDF_ReferenceDriver,XmlMDF_ADriver)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XmlMDF_ReferenceDriver_HeaderFile
|
@@ -1,43 +0,0 @@
|
||||
-- Created on: 2001-08-29
|
||||
-- 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.
|
||||
|
||||
class TagSourceDriver from XmlMDF inherits ADriver from XmlMDF
|
||||
|
||||
---Purpose: Attribute Driver.
|
||||
|
||||
uses
|
||||
SRelocationTable from XmlObjMgt,
|
||||
RRelocationTable from XmlObjMgt,
|
||||
Persistent from XmlObjMgt,
|
||||
Attribute from TDF,
|
||||
MessageDriver from CDM
|
||||
|
||||
is
|
||||
Create (theMessageDriver : MessageDriver from CDM)
|
||||
returns TagSourceDriver from XmlMDF;
|
||||
|
||||
NewEmpty (me) returns Attribute from TDF;
|
||||
|
||||
Paste(me; Source : Persistent from XmlObjMgt;
|
||||
Target : Attribute from TDF;
|
||||
RelocTable : out RRelocationTable from XmlObjMgt)
|
||||
returns Boolean from Standard;
|
||||
|
||||
Paste(me; Source : Attribute from TDF;
|
||||
Target : in out Persistent from XmlObjMgt;
|
||||
RelocTable : out SRelocationTable from XmlObjMgt);
|
||||
|
||||
end TagSourceDriver;
|
||||
|
@@ -15,15 +15,18 @@
|
||||
|
||||
//AGV 150202: Changed prototype XmlObjMgt::SetStringValue()
|
||||
|
||||
#include <XmlMDF_TagSourceDriver.ixx>
|
||||
#include <XmlObjMgt.hxx>
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDF_TagSource.hxx>
|
||||
#include <XmlMDF_TagSourceDriver.hxx>
|
||||
#include <XmlObjMgt.hxx>
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : XmlMDF_TagSourceDriver
|
||||
//purpose : Constructor
|
||||
//=======================================================================
|
||||
|
||||
XmlMDF_TagSourceDriver::XmlMDF_TagSourceDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
: XmlMDF_ADriver (theMsgDriver, NULL)
|
||||
|
72
src/XmlMDF/XmlMDF_TagSourceDriver.hxx
Normal file
72
src/XmlMDF/XmlMDF_TagSourceDriver.hxx
Normal file
@@ -0,0 +1,72 @@
|
||||
// Created on: 2001-08-29
|
||||
// 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 _XmlMDF_TagSourceDriver_HeaderFile
|
||||
#define _XmlMDF_TagSourceDriver_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <XmlMDF_ADriver.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <XmlObjMgt_RRelocationTable.hxx>
|
||||
#include <XmlObjMgt_SRelocationTable.hxx>
|
||||
class CDM_MessageDriver;
|
||||
class TDF_Attribute;
|
||||
class XmlObjMgt_Persistent;
|
||||
|
||||
|
||||
class XmlMDF_TagSourceDriver;
|
||||
DEFINE_STANDARD_HANDLE(XmlMDF_TagSourceDriver, XmlMDF_ADriver)
|
||||
|
||||
//! Attribute Driver.
|
||||
class XmlMDF_TagSourceDriver : public XmlMDF_ADriver
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT XmlMDF_TagSourceDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
|
||||
|
||||
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const;
|
||||
|
||||
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTI(XmlMDF_TagSourceDriver,XmlMDF_ADriver)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _XmlMDF_TagSourceDriver_HeaderFile
|
Reference in New Issue
Block a user