diff --git a/src/BinMDF/BinMDF_ADriver.cxx b/src/BinMDF/BinMDF_ADriver.cxx index 8786c67f76..95d92b6602 100644 --- a/src/BinMDF/BinMDF_ADriver.cxx +++ b/src/BinMDF/BinMDF_ADriver.cxx @@ -15,12 +15,6 @@ #include -#include -#include -#include -#include -#include -#include IMPLEMENT_STANDARD_RTTIEXT(BinMDF_ADriver,Standard_Transient) @@ -34,4 +28,15 @@ BinMDF_ADriver::BinMDF_ADriver (const Handle(Message_Messenger)& theMsgDriver, { if (theName) myTypeName = theName; -} \ No newline at end of file +} + +//======================================================================= +//function : SourceType +//purpose : +//======================================================================= + +const Handle(Standard_Type)& BinMDF_ADriver::SourceType () const +{ + return NewEmpty() -> DynamicType(); +} + diff --git a/src/BinMDF/BinMDF_ADriver.hxx b/src/BinMDF/BinMDF_ADriver.hxx index ba63dfafe4..9033635e14 100644 --- a/src/BinMDF/BinMDF_ADriver.hxx +++ b/src/BinMDF/BinMDF_ADriver.hxx @@ -48,7 +48,7 @@ public: //! Returns the type of source object, //! inheriting from Attribute from TDF. - const Handle(Standard_Type)& SourceType() const; + Standard_EXPORT virtual const Handle(Standard_Type)& SourceType() const; //! Returns the type name of the attribute object const TCollection_AsciiString& TypeName() const; @@ -63,6 +63,8 @@ public: //! to keep the sharings. Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& aSource, BinObjMgt_Persistent& aTarget, BinObjMgt_SRelocationTable& aRelocTable) const = 0; + //! Returns the current message driver of this driver + const Handle(Message_Messenger)& MessageDriver() const { return myMessageDriver; } DEFINE_STANDARD_RTTIEXT(BinMDF_ADriver,Standard_Transient) diff --git a/src/BinMDF/BinMDF_ADriver.lxx b/src/BinMDF/BinMDF_ADriver.lxx index d991cf5ceb..516d8ab242 100644 --- a/src/BinMDF/BinMDF_ADriver.lxx +++ b/src/BinMDF/BinMDF_ADriver.lxx @@ -15,16 +15,6 @@ #include -//======================================================================= -//function : SourceType -//purpose : -//======================================================================= - -inline const Handle(Standard_Type)& BinMDF_ADriver::SourceType () const -{ - return NewEmpty() -> DynamicType(); -} - //======================================================================= //function : TypeName //purpose : diff --git a/src/BinMDF/BinMDF_ADriverTable.cxx b/src/BinMDF/BinMDF_ADriverTable.cxx index 73973c0ee0..a5fd1184cb 100644 --- a/src/BinMDF/BinMDF_ADriverTable.cxx +++ b/src/BinMDF/BinMDF_ADriverTable.cxx @@ -17,10 +17,12 @@ #include #include #include +#include #include #include #include #include +#include IMPLEMENT_STANDARD_RTTIEXT(BinMDF_ADriverTable,Standard_Transient) @@ -44,6 +46,42 @@ void BinMDF_ADriverTable::AddDriver myMap.Bind (aType, theDriver); } +//======================================================================= +//function : AddDerivedDriver +//purpose : +//======================================================================= +void BinMDF_ADriverTable::AddDerivedDriver (const Handle(TDF_Attribute)& theInstance) +{ + const Handle(Standard_Type)& anInstanceType = theInstance->DynamicType(); + if (!myMap.IsBound (anInstanceType)) // no direct driver, use a derived one + { + for (Handle(Standard_Type) aType = anInstanceType->Parent(); !aType.IsNull(); aType = aType->Parent()) + { + if (myMap.IsBound (aType)) + { + Handle(BinMDF_DerivedDriver) aDriver = new BinMDF_DerivedDriver (theInstance, myMap (aType)); + myMap.Bind (anInstanceType, aDriver); + return; + } + } + } +} + +//======================================================================= +//function : AddDerivedDriver +//purpose : +//======================================================================= +const Handle(Standard_Type)& BinMDF_ADriverTable::AddDerivedDriver (Standard_CString theDerivedType) +{ + if (Handle(TDF_Attribute) anInstance = TDF_DerivedAttribute::Attribute (theDerivedType)) + { + AddDerivedDriver (anInstance); + return anInstance->DynamicType(); + } + static const Handle(Standard_Type) aNullType; + return aNullType; +} + //======================================================================= //function : AssignIds //purpose : Assigns the IDs to the drivers of the given Types. @@ -97,4 +135,16 @@ void BinMDF_ADriverTable::AssignIds myMapId.Bind (aType, i); } } + + // try to add derived drivers for attributes not found in myMap + for (BinMDF_StringIdMap::Iterator aStrId (aStringIdMap); aStrId.More(); aStrId.Next()) + { + if (!myMapId.IsBound2 (aStrId.Value())) + { + if (Handle(Standard_Type) anAdded = AddDerivedDriver (aStrId.Key().ToCString())) + { + myMapId.Bind (anAdded, aStrId.Value()); + } + } + } } diff --git a/src/BinMDF/BinMDF_ADriverTable.hxx b/src/BinMDF/BinMDF_ADriverTable.hxx index 718ed36f50..fc6d2fd77a 100644 --- a/src/BinMDF/BinMDF_ADriverTable.hxx +++ b/src/BinMDF/BinMDF_ADriverTable.hxx @@ -48,7 +48,15 @@ public: //! Adds a translation driver . Standard_EXPORT void AddDriver (const Handle(BinMDF_ADriver)& theDriver); - + + //! Adds a translation driver for the derived attribute. The base driver must be already added. + //! @param theInstance is newly created attribute, detached from any label + Standard_EXPORT void AddDerivedDriver (const Handle(TDF_Attribute)& theInstance); + + //! Adds a translation driver for the derived attribute. The base driver must be already added. + //! @param theDerivedType is registered attribute type using IMPLEMENT_DERIVED_ATTRIBUTE macro + Standard_EXPORT const Handle(Standard_Type)& AddDerivedDriver (Standard_CString theDerivedType); + //! Assigns the IDs to the drivers of the given Types. //! It uses indices in the map as IDs. //! Useful in storage procedure. @@ -61,11 +69,11 @@ public: //! Gets a driver according to . //! Returns Type ID if the driver was assigned an ID; 0 otherwise. - Standard_Integer GetDriver (const Handle(Standard_Type)& theType, Handle(BinMDF_ADriver)& theDriver) const; + Standard_Integer GetDriver (const Handle(Standard_Type)& theType, Handle(BinMDF_ADriver)& theDriver); //! Returns a driver according to . //! Returns null handle if a driver is not found - Handle(BinMDF_ADriver) GetDriver (const Standard_Integer theTypeId) const; + Handle(BinMDF_ADriver) GetDriver (const Standard_Integer theTypeId); diff --git a/src/BinMDF/BinMDF_ADriverTable.lxx b/src/BinMDF/BinMDF_ADriverTable.lxx index 1c0c4cc329..6940efea90 100644 --- a/src/BinMDF/BinMDF_ADriverTable.lxx +++ b/src/BinMDF/BinMDF_ADriverTable.lxx @@ -33,8 +33,13 @@ inline void BinMDF_ADriverTable::AssignId inline Standard_Integer BinMDF_ADriverTable::GetDriver (const Handle(Standard_Type)& theType, - Handle(BinMDF_ADriver)& theDriver) const + Handle(BinMDF_ADriver)& theDriver) { + if (!myMap.IsBound (theType)) // try to assign driver for derived type + { + AddDerivedDriver (theType->Name()); + } + Standard_Integer anId = 0; if (myMap.IsBound(theType)) { theDriver = myMap (theType); @@ -51,7 +56,7 @@ inline Standard_Integer BinMDF_ADriverTable::GetDriver //======================================================================= inline Handle(BinMDF_ADriver) BinMDF_ADriverTable::GetDriver - (const Standard_Integer theTypeId) const + (const Standard_Integer theTypeId) { Handle(BinMDF_ADriver) aDriver; if (myMapId.IsBound2(theTypeId)) { diff --git a/src/BinMDF/BinMDF_DerivedDriver.cxx b/src/BinMDF/BinMDF_DerivedDriver.cxx new file mode 100644 index 0000000000..f2af226f36 --- /dev/null +++ b/src/BinMDF/BinMDF_DerivedDriver.cxx @@ -0,0 +1,16 @@ +// Copyright (c) 2020 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. + +#include + +IMPLEMENT_STANDARD_RTTIEXT(BinMDF_DerivedDriver, BinMDF_ADriver) diff --git a/src/BinMDF/BinMDF_DerivedDriver.hxx b/src/BinMDF/BinMDF_DerivedDriver.hxx new file mode 100644 index 0000000000..40721c1cf4 --- /dev/null +++ b/src/BinMDF/BinMDF_DerivedDriver.hxx @@ -0,0 +1,59 @@ +// Copyright (c) 2020 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 _BinMDF_DerivedDriver_HeaderFile +#define _BinMDF_DerivedDriver_HeaderFile + +#include + +//! A universal driver for the attribute that inherits another attribute with +//! ready to used persistence mechanism implemented (already has a driver to store/retrieve). +class BinMDF_DerivedDriver : public BinMDF_ADriver +{ + DEFINE_STANDARD_RTTIEXT(BinMDF_DerivedDriver, BinMDF_ADriver) +public: + + //! Creates a derivative persistence driver for theDerivative attribute by reusage of theBaseDriver + //! @param theDerivative an instance of the attribute, just created, detached from any label + //! @param theBaseDriver a driver of the base attribute, called by Paste methods + BinMDF_DerivedDriver (const Handle(TDF_Attribute)& theDerivative, + const Handle(BinMDF_ADriver)& theBaseDriver) + : BinMDF_ADriver(theBaseDriver->MessageDriver()), myDerivative(theDerivative), myBaseDirver(theBaseDriver) {} + + //! Creates a new instance of the derivative attribute + virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE { return myDerivative->NewEmpty(); } + + //! Reuses the base driver to read the base fields + virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, + const Handle(TDF_Attribute)& theTarget, + BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE + { + Standard_Boolean aResult = myBaseDirver->Paste (theSource, theTarget, theRelocTable); + theTarget->AfterRetrieval(); // to allow synchronization of the derived attribute with the base content + return aResult; + } + + //! Reuses the base driver to store the base fields + virtual void Paste (const Handle(TDF_Attribute)& theSource, + BinObjMgt_Persistent& theTarget, + BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE + { + myBaseDirver->Paste(theSource, theTarget, theRelocTable); + } + +protected: + Handle(TDF_Attribute) myDerivative; //!< the derivative attribute that inherits the base + Handle(BinMDF_ADriver) myBaseDirver; //!< the base attribute driver to be reused here +}; + +#endif diff --git a/src/BinMDF/FILES b/src/BinMDF/FILES index 345cb19fd7..569e29b116 100644 --- a/src/BinMDF/FILES +++ b/src/BinMDF/FILES @@ -15,3 +15,5 @@ BinMDF_TagSourceDriver.cxx BinMDF_TagSourceDriver.hxx BinMDF_TypeADriverMap.hxx BinMDF_TypeIdMap.hxx +BinMDF_DerivedDriver.cxx +BinMDF_DerivedDriver.hxx diff --git a/src/BinMDataStd/BinMDataStd.cxx b/src/BinMDataStd/BinMDataStd.cxx index a407dd0cf0..0f24acd5f5 100644 --- a/src/BinMDataStd/BinMDataStd.cxx +++ b/src/BinMDataStd/BinMDataStd.cxx @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include @@ -29,15 +27,13 @@ #include #include #include -#include -#include +#include #include #include #include #include #include -#include -#include +#include #include #include #include @@ -52,31 +48,26 @@ void BinMDataStd::AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable, const Handle(Message_Messenger)& theMsgDriver) { - theDriverTable->AddDriver (new BinMDataStd_CommentDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_ExpressionDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_IntegerArrayDriver(theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_IntegerDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_NameDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_RealArrayDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_RealDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_RelationDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_TreeNodeDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_UAttributeDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_VariableDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_DirectoryDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_NoteBookDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_ExtStringArrayDriver(theMsgDriver) ); - - theDriverTable->AddDriver (new BinMDataStd_TickDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_IntegerListDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_RealListDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_ExtStringListDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_BooleanListDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_ReferenceListDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_BooleanArrayDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_ReferenceArrayDriver(theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_ByteArrayDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_NamedDataDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_AsciiStringDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataStd_IntPackedMapDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_ExpressionDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_IntegerArrayDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_IntegerDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_GenericExtStringDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_RealArrayDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_RealDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_TreeNodeDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_UAttributeDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_VariableDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_ExtStringArrayDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_GenericEmptyDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_IntegerListDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_RealListDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_ExtStringListDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_BooleanListDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_ReferenceListDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_BooleanArrayDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_ReferenceArrayDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_ByteArrayDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_NamedDataDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_AsciiStringDriver (theMsgDriver) ); + theDriverTable->AddDriver (new BinMDataStd_IntPackedMapDriver (theMsgDriver) ); } diff --git a/src/BinMDataStd/BinMDataStd.hxx b/src/BinMDataStd/BinMDataStd.hxx index 64db29aa4f..50864bb07c 100644 --- a/src/BinMDataStd/BinMDataStd.hxx +++ b/src/BinMDataStd/BinMDataStd.hxx @@ -68,21 +68,17 @@ private: -friend class BinMDataStd_NameDriver; +friend class BinMDataStd_GenericExtStringDriver; friend class BinMDataStd_IntegerDriver; friend class BinMDataStd_RealDriver; friend class BinMDataStd_IntegerArrayDriver; friend class BinMDataStd_RealArrayDriver; friend class BinMDataStd_UAttributeDriver; -friend class BinMDataStd_DirectoryDriver; -friend class BinMDataStd_CommentDriver; friend class BinMDataStd_VariableDriver; friend class BinMDataStd_ExpressionDriver; -friend class BinMDataStd_RelationDriver; -friend class BinMDataStd_NoteBookDriver; friend class BinMDataStd_TreeNodeDriver; friend class BinMDataStd_ExtStringArrayDriver; -friend class BinMDataStd_TickDriver; +friend class BinMDataStd_GenericEmptyDriver; friend class BinMDataStd_AsciiStringDriver; friend class BinMDataStd_IntPackedMapDriver; friend class BinMDataStd_IntegerListDriver; diff --git a/src/BinMDataStd/BinMDataStd_CommentDriver.cxx b/src/BinMDataStd/BinMDataStd_CommentDriver.cxx deleted file mode 100644 index cf3a932005..0000000000 --- a/src/BinMDataStd/BinMDataStd_CommentDriver.cxx +++ /dev/null @@ -1,71 +0,0 @@ -// Created on: 2001-08-24 -// Created by: Alexnder GRIGORIEV -// 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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_CommentDriver,BinMDF_ADriver) - -//======================================================================= -//function : BinMDataStd_CommentDriver -//purpose : Constructor -//======================================================================= -BinMDataStd_CommentDriver::BinMDataStd_CommentDriver - (const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver (theMsgDriver, NULL) -{} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMDataStd_CommentDriver::NewEmpty() const -{ - return (new TDataStd_Comment()); -} - -//======================================================================= -//function : Paste -//purpose : -//======================================================================= -Standard_Boolean BinMDataStd_CommentDriver::Paste - (const BinObjMgt_Persistent& theSource, - const Handle(TDF_Attribute)& theTarget, - BinObjMgt_RRelocationTable& ) const -{ - TCollection_ExtendedString aString; - Standard_Boolean ok = theSource >> aString; - if (ok) - Handle(TDataStd_Comment)::DownCast(theTarget) -> Set (aString); - return ok; -} - -//======================================================================= -//function : Paste -//purpose : -//======================================================================= -void BinMDataStd_CommentDriver::Paste (const Handle(TDF_Attribute)& theSource, - BinObjMgt_Persistent& theTarget, - BinObjMgt_SRelocationTable& ) const -{ - TCollection_ExtendedString aName = - Handle(TDataStd_Comment)::DownCast(theSource) -> Get(); - theTarget << aName; -} diff --git a/src/BinMDataStd/BinMDataStd_CommentDriver.hxx b/src/BinMDataStd/BinMDataStd_CommentDriver.hxx deleted file mode 100644 index 93fc8951a1..0000000000 --- a/src/BinMDataStd/BinMDataStd_CommentDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2001-08-24 -// Created by: Alexander GRIGORIEV -// 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 _BinMDataStd_CommentDriver_HeaderFile -#define _BinMDataStd_CommentDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMDataStd_CommentDriver; -DEFINE_STANDARD_HANDLE(BinMDataStd_CommentDriver, BinMDF_ADriver) - -//! Attribute Driver. -class BinMDataStd_CommentDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMDataStd_CommentDriver(const Handle(Message_Messenger)& theMessageDriver); - - Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; - - Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMDataStd_CommentDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMDataStd_CommentDriver_HeaderFile diff --git a/src/BinMDataStd/BinMDataStd_DirectoryDriver.cxx b/src/BinMDataStd/BinMDataStd_DirectoryDriver.cxx deleted file mode 100644 index 1ebcb40ced..0000000000 --- a/src/BinMDataStd/BinMDataStd_DirectoryDriver.cxx +++ /dev/null @@ -1,71 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_DirectoryDriver,BinMDF_ADriver) - -//======================================================================= -//function : BinMDataStd_DirectoryDriver -//purpose : -//======================================================================= -BinMDataStd_DirectoryDriver::BinMDataStd_DirectoryDriver - (const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataStd_Directory)->Name()) -{ -} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= - -Handle(TDF_Attribute) BinMDataStd_DirectoryDriver::NewEmpty() const -{ - return new TDataStd_Directory(); -} - -//======================================================================= -//function : Paste -//purpose : persistent -> transient (retrieve) -//======================================================================= - -Standard_Boolean BinMDataStd_DirectoryDriver::Paste - (const BinObjMgt_Persistent&, - const Handle(TDF_Attribute)&, - BinObjMgt_RRelocationTable& ) const -{return Standard_True;} - -//======================================================================= -//function : Paste -//purpose : transient -> persistent (store) -//======================================================================= - -void BinMDataStd_DirectoryDriver::Paste (const Handle(TDF_Attribute)&, - BinObjMgt_Persistent&, - BinObjMgt_SRelocationTable& ) const -{} - - - diff --git a/src/BinMDataStd/BinMDataStd_DirectoryDriver.hxx b/src/BinMDataStd/BinMDataStd_DirectoryDriver.hxx deleted file mode 100644 index c91a36e986..0000000000 --- a/src/BinMDataStd/BinMDataStd_DirectoryDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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 _BinMDataStd_DirectoryDriver_HeaderFile -#define _BinMDataStd_DirectoryDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMDataStd_DirectoryDriver; -DEFINE_STANDARD_HANDLE(BinMDataStd_DirectoryDriver, BinMDF_ADriver) - -//! Directory attribute Driver. -class BinMDataStd_DirectoryDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMDataStd_DirectoryDriver(const Handle(Message_Messenger)& theMessageDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMDataStd_DirectoryDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMDataStd_DirectoryDriver_HeaderFile diff --git a/src/BinMDataStd/BinMDataStd_TickDriver.cxx b/src/BinMDataStd/BinMDataStd_GenericEmptyDriver.cxx similarity index 63% rename from src/BinMDataStd/BinMDataStd_TickDriver.cxx rename to src/BinMDataStd/BinMDataStd_GenericEmptyDriver.cxx index 278432d191..1d05de0eb6 100644 --- a/src/BinMDataStd/BinMDataStd_TickDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_GenericEmptyDriver.cxx @@ -1,6 +1,4 @@ -// Created on: 2007-05-29 -// Created by: Vlad Romashko -// Copyright (c) 2007-2014 OPEN CASCADE SAS +// Copyright (c) 2020 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -14,41 +12,49 @@ // commercial license or contractual agreement. -#include +#include #include #include #include #include #include #include -#include +#include #include -IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_TickDriver,BinMDF_ADriver) +IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_GenericEmptyDriver,BinMDF_ADriver) //======================================================================= -//function : BinMDataStd_TickDriver +//function : BinMDataStd_GenericEmptyDriver //purpose : //======================================================================= -BinMDataStd_TickDriver::BinMDataStd_TickDriver(const Handle(Message_Messenger)& theMsgDriver) -: BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataStd_Tick)->Name()) -{ -} +BinMDataStd_GenericEmptyDriver::BinMDataStd_GenericEmptyDriver(const Handle(Message_Messenger)& theMsgDriver) +: BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataStd_GenericEmpty)->Name()) +{} //======================================================================= //function : NewEmpty //purpose : //======================================================================= -Handle(TDF_Attribute) BinMDataStd_TickDriver::NewEmpty() const +Handle(TDF_Attribute) BinMDataStd_GenericEmptyDriver::NewEmpty() const { - return new TDataStd_Tick(); + return Handle(TDF_Attribute)(); // this attribute can not be created +} + +//======================================================================= +//function : SourceType +//purpose : +//======================================================================= +const Handle(Standard_Type)& BinMDataStd_GenericEmptyDriver::SourceType() const +{ + return Standard_Type::Instance(); } //======================================================================= //function : Paste //purpose : persistent -> transient (retrieve) //======================================================================= -Standard_Boolean BinMDataStd_TickDriver::Paste(const BinObjMgt_Persistent&, +Standard_Boolean BinMDataStd_GenericEmptyDriver::Paste(const BinObjMgt_Persistent&, const Handle(TDF_Attribute)&, BinObjMgt_RRelocationTable& ) const { @@ -59,7 +65,7 @@ Standard_Boolean BinMDataStd_TickDriver::Paste(const BinObjMgt_Persistent&, //function : Paste //purpose : transient -> persistent (store) //======================================================================= -void BinMDataStd_TickDriver::Paste(const Handle(TDF_Attribute)&, +void BinMDataStd_GenericEmptyDriver::Paste(const Handle(TDF_Attribute)&, BinObjMgt_Persistent&, BinObjMgt_SRelocationTable& ) const { diff --git a/src/BinMDataXtd/BinMDataXtd_AxisDriver.hxx b/src/BinMDataStd/BinMDataStd_GenericEmptyDriver.hxx similarity index 67% rename from src/BinMDataXtd/BinMDataXtd_AxisDriver.hxx rename to src/BinMDataStd/BinMDataStd_GenericEmptyDriver.hxx index 8af19ce9d2..6b1fc275da 100644 --- a/src/BinMDataXtd/BinMDataXtd_AxisDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_GenericEmptyDriver.hxx @@ -1,6 +1,4 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-2014 OPEN CASCADE SAS +// Copyright (c) 2020 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -13,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BinMDataXtd_AxisDriver_HeaderFile -#define _BinMDataXtd_AxisDriver_HeaderFile +#ifndef _BinMDataStd_GenericEmptyDriver_HeaderFile +#define _BinMDataStd_GenericEmptyDriver_HeaderFile #include #include @@ -28,19 +26,21 @@ class TDF_Attribute; class BinObjMgt_Persistent; -class BinMDataXtd_AxisDriver; -DEFINE_STANDARD_HANDLE(BinMDataXtd_AxisDriver, BinMDF_ADriver) +class BinMDataStd_GenericEmptyDriver; +DEFINE_STANDARD_HANDLE(BinMDataStd_GenericEmptyDriver, BinMDF_ADriver) -//! Axis attribute Driver. -class BinMDataXtd_AxisDriver : public BinMDF_ADriver +//! GenericEmpty attribute driver. +class BinMDataStd_GenericEmptyDriver : public BinMDF_ADriver { public: - Standard_EXPORT BinMDataXtd_AxisDriver(const Handle(Message_Messenger)& theMessageDriver); + Standard_EXPORT BinMDataStd_GenericEmptyDriver(const Handle(Message_Messenger)& theMessageDriver); Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; + + Standard_EXPORT virtual const Handle(Standard_Type)& SourceType() const Standard_OVERRIDE; Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; @@ -49,7 +49,7 @@ public: - DEFINE_STANDARD_RTTIEXT(BinMDataXtd_AxisDriver,BinMDF_ADriver) + DEFINE_STANDARD_RTTIEXT(BinMDataStd_GenericEmptyDriver,BinMDF_ADriver) protected: @@ -69,4 +69,4 @@ private: -#endif // _BinMDataXtd_AxisDriver_HeaderFile +#endif // _BinMDataStd_GenericEmptyDriver_HeaderFile diff --git a/src/BinMDataStd/BinMDataStd_NameDriver.cxx b/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.cxx similarity index 68% rename from src/BinMDataStd/BinMDataStd_NameDriver.cxx rename to src/BinMDataStd/BinMDataStd_GenericExtStringDriver.cxx index fba6fa4da7..84a0e39749 100644 --- a/src/BinMDataStd/BinMDataStd_NameDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.cxx @@ -1,6 +1,4 @@ -// Created on: 2002-11-19 -// Created by: Edward AGAPOV (eap) -// Copyright (c) 2002-2014 OPEN CASCADE SAS +// Copyright (c) 2020 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -14,7 +12,7 @@ // commercial license or contractual agreement. -#include +#include #include #include #include @@ -22,15 +20,15 @@ #include #include -IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_NameDriver,BinMDF_ADriver) +IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_GenericExtStringDriver,BinMDF_ADriver) //======================================================================= -//function : BinMDataStd_NameDriver +//function : BinMDataStd_GenericExtStringDriver //purpose : //======================================================================= -BinMDataStd_NameDriver::BinMDataStd_NameDriver +BinMDataStd_GenericExtStringDriver::BinMDataStd_GenericExtStringDriver (const Handle(Message_Messenger)& theMessageDriver) - : BinMDF_ADriver (theMessageDriver, STANDARD_TYPE(TDataStd_Name)->Name()) + : BinMDF_ADriver (theMessageDriver, STANDARD_TYPE(TDataStd_GenericExtString)->Name()) { } @@ -39,39 +37,47 @@ BinMDataStd_NameDriver::BinMDataStd_NameDriver //purpose : //======================================================================= -Handle(TDF_Attribute) BinMDataStd_NameDriver::NewEmpty() const +Handle(TDF_Attribute) BinMDataStd_GenericExtStringDriver::NewEmpty() const { return new TDataStd_Name; } +//======================================================================= +//function : SourceType +//purpose : +//======================================================================= +Handle(Standard_Type)& BinMDataStd_GenericExtStringDriver::SourceType() const +{ + static Handle(Standard_Type) aSourceType = Standard_Type::Instance(); + return aSourceType; +} + //======================================================================= //function : Paste //purpose : persistent -> transient (retrieve) //======================================================================= -Standard_Boolean BinMDataStd_NameDriver::Paste +Standard_Boolean BinMDataStd_GenericExtStringDriver::Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const { - Handle(TDataStd_Name) aName = Handle(TDataStd_Name)::DownCast(Target); + Handle(TDataStd_GenericExtString) aStrAttr = Handle(TDataStd_GenericExtString)::DownCast(Target); TCollection_ExtendedString aStr; Standard_Boolean ok = Source >> aStr; if (ok) - aName->Set( aStr ); + aStrAttr->Set( aStr ); if(RelocTable.GetHeaderData()->StorageVersion().IntegerValue() > 8) { // process user defined guid const Standard_Integer& aPos = Source.Position(); Standard_GUID aGuid; ok = Source >> aGuid; if (!ok) { Source.SetPosition(aPos); - aName->SetID(TDataStd_Name::GetID()); ok = Standard_True; } else { - aName->SetID(aGuid); + aStrAttr->SetID(aGuid); } - } else - aName->SetID(TDataStd_Name::GetID()); + } return ok; } @@ -80,14 +86,13 @@ Standard_Boolean BinMDataStd_NameDriver::Paste //purpose : transient -> persistent (store) //======================================================================= -void BinMDataStd_NameDriver::Paste +void BinMDataStd_GenericExtStringDriver::Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& /*RelocTable*/) const { - Handle(TDataStd_Name) aName = Handle(TDataStd_Name)::DownCast(Source); - Target << aName->Get(); + Handle(TDataStd_GenericExtString) aStrAttr = Handle(TDataStd_GenericExtString)::DownCast(Source); + Target << aStrAttr->Get(); // process user defined guid - if(aName->ID() != TDataStd_Name::GetID()) - Target << aName->ID(); + Target << aStrAttr->ID(); } diff --git a/src/BinMDataStd/BinMDataStd_NameDriver.hxx b/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.hxx similarity index 69% rename from src/BinMDataStd/BinMDataStd_NameDriver.hxx rename to src/BinMDataStd/BinMDataStd_GenericExtStringDriver.hxx index 86e89a6cd7..9a0694a55f 100644 --- a/src/BinMDataStd/BinMDataStd_NameDriver.hxx +++ b/src/BinMDataStd/BinMDataStd_GenericExtStringDriver.hxx @@ -1,6 +1,4 @@ -// Created on: 2002-11-19 -// Created by: Edward AGAPOV -// Copyright (c) 2002-2014 OPEN CASCADE SAS +// Copyright (c) 2020 OPEN CASCADE SAS // // This file is part of Open CASCADE Technology software library. // @@ -13,8 +11,8 @@ // Alternatively, this file may be used under the terms of Open CASCADE // commercial license or contractual agreement. -#ifndef _BinMDataStd_NameDriver_HeaderFile -#define _BinMDataStd_NameDriver_HeaderFile +#ifndef _BinMDataStd_GenericExtStringDriver_HeaderFile +#define _BinMDataStd_GenericExtStringDriver_HeaderFile #include #include @@ -28,20 +26,22 @@ class TDF_Attribute; class BinObjMgt_Persistent; -class BinMDataStd_NameDriver; -DEFINE_STANDARD_HANDLE(BinMDataStd_NameDriver, BinMDF_ADriver) +class BinMDataStd_GenericExtStringDriver; +DEFINE_STANDARD_HANDLE(BinMDataStd_GenericExtStringDriver, BinMDF_ADriver) //! TDataStd_Name attribute Driver. -class BinMDataStd_NameDriver : public BinMDF_ADriver +class BinMDataStd_GenericExtStringDriver : public BinMDF_ADriver { public: - Standard_EXPORT BinMDataStd_NameDriver(const Handle(Message_Messenger)& theMessageDriver); + Standard_EXPORT BinMDataStd_GenericExtStringDriver(const Handle(Message_Messenger)& theMessageDriver); Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - + + Standard_EXPORT virtual Handle(Standard_Type)& SourceType() const Standard_OVERRIDE; + //! persistent -> transient (retrieve) Standard_EXPORT Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; @@ -51,7 +51,7 @@ public: - DEFINE_STANDARD_RTTIEXT(BinMDataStd_NameDriver,BinMDF_ADriver) + DEFINE_STANDARD_RTTIEXT(BinMDataStd_GenericExtStringDriver,BinMDF_ADriver) protected: @@ -71,4 +71,4 @@ private: -#endif // _BinMDataStd_NameDriver_HeaderFile +#endif // _BinMDataStd_GenericExtStringDriver_HeaderFile diff --git a/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx b/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx index 6ac2571fde..5325bdfd8f 100644 --- a/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx +++ b/src/BinMDataStd/BinMDataStd_IntegerDriver.cxx @@ -65,7 +65,6 @@ Standard_Boolean BinMDataStd_IntegerDriver::Paste ok = theSource >> aGuid; if (!ok) { theSource.SetPosition(aPos); - anAtt->SetID(TDataStd_Integer::GetID()); ok = Standard_True; } else { anAtt->SetID(aGuid); diff --git a/src/BinMDataStd/BinMDataStd_NoteBookDriver.cxx b/src/BinMDataStd/BinMDataStd_NoteBookDriver.cxx deleted file mode 100644 index 35c536c074..0000000000 --- a/src/BinMDataStd/BinMDataStd_NoteBookDriver.cxx +++ /dev/null @@ -1,70 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_NoteBookDriver,BinMDF_ADriver) - -//======================================================================= -//function : BinMDataStd_NoteBookDriver -//purpose : -//======================================================================= -BinMDataStd_NoteBookDriver::BinMDataStd_NoteBookDriver - (const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataStd_NoteBook)->Name()) -{ -} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= - -Handle(TDF_Attribute) BinMDataStd_NoteBookDriver::NewEmpty() const -{ - return new TDataStd_NoteBook(); -} - -//======================================================================= -//function : Paste -//purpose : persistent -> transient (retrieve) -//======================================================================= - -Standard_Boolean BinMDataStd_NoteBookDriver::Paste - (const BinObjMgt_Persistent&, - const Handle(TDF_Attribute)&, - BinObjMgt_RRelocationTable& ) const -{return Standard_True;} - -//======================================================================= -//function : Paste -//purpose : transient -> persistent (store) -//======================================================================= - -void BinMDataStd_NoteBookDriver::Paste (const Handle(TDF_Attribute)&, - BinObjMgt_Persistent&, - BinObjMgt_SRelocationTable& ) const -{} - - diff --git a/src/BinMDataStd/BinMDataStd_NoteBookDriver.hxx b/src/BinMDataStd/BinMDataStd_NoteBookDriver.hxx deleted file mode 100644 index 11dee1ab31..0000000000 --- a/src/BinMDataStd/BinMDataStd_NoteBookDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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 _BinMDataStd_NoteBookDriver_HeaderFile -#define _BinMDataStd_NoteBookDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMDataStd_NoteBookDriver; -DEFINE_STANDARD_HANDLE(BinMDataStd_NoteBookDriver, BinMDF_ADriver) - -//! NoteBook attribute Driver. -class BinMDataStd_NoteBookDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMDataStd_NoteBookDriver(const Handle(Message_Messenger)& theMessageDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMDataStd_NoteBookDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMDataStd_NoteBookDriver_HeaderFile diff --git a/src/BinMDataStd/BinMDataStd_RelationDriver.cxx b/src/BinMDataStd/BinMDataStd_RelationDriver.cxx deleted file mode 100644 index 581a073455..0000000000 --- a/src/BinMDataStd/BinMDataStd_RelationDriver.cxx +++ /dev/null @@ -1,122 +0,0 @@ -// Created on: 2001-09-12 -// 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. - - -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_RelationDriver,BinMDF_ADriver) - -//======================================================================= -//function : BinMDataStd_RelationDriver -//purpose : Constructor -//======================================================================= -BinMDataStd_RelationDriver::BinMDataStd_RelationDriver - (const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver (theMsgDriver, NULL) -{} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMDataStd_RelationDriver::NewEmpty() const -{ - return (new TDataStd_Relation()); -} - -//======================================================================= -//function : Paste -//purpose : persistent -> transient (retrieve) -//======================================================================= -Standard_Boolean BinMDataStd_RelationDriver::Paste - (const BinObjMgt_Persistent& theSource, - const Handle(TDF_Attribute)& theTarget, - BinObjMgt_RRelocationTable& theRelocTable) const -{ - Handle(TDataStd_Relation) aC = - Handle(TDataStd_Relation)::DownCast(theTarget); - - // variables - Standard_Integer nbvar; - if (! (theSource >> nbvar) || nbvar < 0) - return Standard_False; - TDF_AttributeList& aList = aC->GetVariables(); - for (; nbvar > 0; nbvar--) - { - Handle(TDF_Attribute) aV; - Standard_Integer aNb; - if (! (theSource >> aNb)) - return Standard_False; - if (aNb > 0) - { - if (theRelocTable.IsBound(aNb)) - aV = Handle(TDataStd_Variable)::DownCast(theRelocTable.Find(aNb)); - else - { - aV = new TDataStd_Variable; - theRelocTable.Bind(aNb, aV); - } - } - aList.Append(aV); - } - - // expression - TCollection_ExtendedString aString; - if (! (theSource >> aString)) - return Standard_False; - aC->SetRelation(aString); - - return Standard_True; -} - -//======================================================================= -//function : Paste -//purpose : transient -> persistent (store) -//======================================================================= -void BinMDataStd_RelationDriver::Paste - (const Handle(TDF_Attribute)& theSource, - BinObjMgt_Persistent& theTarget, - BinObjMgt_SRelocationTable& theRelocTable) const -{ - Handle(TDataStd_Relation) aC = - Handle(TDataStd_Relation)::DownCast(theSource); - - // variables - const TDF_AttributeList& aList = aC->GetVariables(); - Standard_Integer nbvar = aList.Extent(); - theTarget << nbvar; - TDF_ListIteratorOfAttributeList it; - for (it.Initialize(aList); it.More(); it.Next()) - { - const Handle(TDF_Attribute)& TV = it.Value(); - Standard_Integer aNb; - if (!TV.IsNull()) - aNb = theRelocTable.Add(TV); - else - aNb = -1; - theTarget << aNb; - } - - // expression - TCollection_ExtendedString aName = aC->Name(); - theTarget << aName; -} diff --git a/src/BinMDataStd/BinMDataStd_RelationDriver.hxx b/src/BinMDataStd/BinMDataStd_RelationDriver.hxx deleted file mode 100644 index eee881ecf1..0000000000 --- a/src/BinMDataStd/BinMDataStd_RelationDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2001-09-12 -// 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 _BinMDataStd_RelationDriver_HeaderFile -#define _BinMDataStd_RelationDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMDataStd_RelationDriver; -DEFINE_STANDARD_HANDLE(BinMDataStd_RelationDriver, BinMDF_ADriver) - -//! Attribute Driver. -class BinMDataStd_RelationDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMDataStd_RelationDriver(const Handle(Message_Messenger)& theMessageDriver); - - Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; - - Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMDataStd_RelationDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMDataStd_RelationDriver_HeaderFile diff --git a/src/BinMDataStd/BinMDataStd_TickDriver.hxx b/src/BinMDataStd/BinMDataStd_TickDriver.hxx deleted file mode 100644 index 430d9727b6..0000000000 --- a/src/BinMDataStd/BinMDataStd_TickDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2007-05-29 -// Created by: Vlad Romashko -// Copyright (c) 2007-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 _BinMDataStd_TickDriver_HeaderFile -#define _BinMDataStd_TickDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMDataStd_TickDriver; -DEFINE_STANDARD_HANDLE(BinMDataStd_TickDriver, BinMDF_ADriver) - -//! Tick attribute driver. -class BinMDataStd_TickDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMDataStd_TickDriver(const Handle(Message_Messenger)& theMessageDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMDataStd_TickDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMDataStd_TickDriver_HeaderFile diff --git a/src/BinMDataStd/FILES b/src/BinMDataStd/FILES index 49f0d5daaf..35832aeef1 100644 --- a/src/BinMDataStd/FILES +++ b/src/BinMDataStd/FILES @@ -8,10 +8,6 @@ BinMDataStd_BooleanListDriver.cxx BinMDataStd_BooleanListDriver.hxx BinMDataStd_ByteArrayDriver.cxx BinMDataStd_ByteArrayDriver.hxx -BinMDataStd_CommentDriver.cxx -BinMDataStd_CommentDriver.hxx -BinMDataStd_DirectoryDriver.cxx -BinMDataStd_DirectoryDriver.hxx BinMDataStd_ExpressionDriver.cxx BinMDataStd_ExpressionDriver.hxx BinMDataStd_ExtStringArrayDriver.cxx @@ -28,10 +24,8 @@ BinMDataStd_IntPackedMapDriver.cxx BinMDataStd_IntPackedMapDriver.hxx BinMDataStd_NamedDataDriver.cxx BinMDataStd_NamedDataDriver.hxx -BinMDataStd_NameDriver.cxx -BinMDataStd_NameDriver.hxx -BinMDataStd_NoteBookDriver.cxx -BinMDataStd_NoteBookDriver.hxx +BinMDataStd_GenericExtStringDriver.cxx +BinMDataStd_GenericExtStringDriver.hxx BinMDataStd_RealArrayDriver.cxx BinMDataStd_RealArrayDriver.hxx BinMDataStd_RealDriver.cxx @@ -42,10 +36,8 @@ BinMDataStd_ReferenceArrayDriver.cxx BinMDataStd_ReferenceArrayDriver.hxx BinMDataStd_ReferenceListDriver.cxx BinMDataStd_ReferenceListDriver.hxx -BinMDataStd_RelationDriver.cxx -BinMDataStd_RelationDriver.hxx -BinMDataStd_TickDriver.cxx -BinMDataStd_TickDriver.hxx +BinMDataStd_GenericEmptyDriver.cxx +BinMDataStd_GenericEmptyDriver.hxx BinMDataStd_TreeNodeDriver.cxx BinMDataStd_TreeNodeDriver.hxx BinMDataStd_UAttributeDriver.cxx diff --git a/src/BinMDataXtd/BinMDataXtd.cxx b/src/BinMDataXtd/BinMDataXtd.cxx index 7b967f73e5..564dbf803d 100644 --- a/src/BinMDataXtd/BinMDataXtd.cxx +++ b/src/BinMDataXtd/BinMDataXtd.cxx @@ -16,14 +16,9 @@ // modified 13.04.2009 Sergey Zaritchny #include -#include #include #include #include -#include -#include -#include -#include #include #include #include @@ -42,11 +37,6 @@ void BinMDataXtd::AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable, theDriverTable->AddDriver (new BinMDataXtd_ConstraintDriver (theMsgDriver) ); theDriverTable->AddDriver (new BinMDataXtd_GeometryDriver (theMsgDriver) ); theDriverTable->AddDriver (new BinMDataXtd_PatternStdDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataXtd_ShapeDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataXtd_PointDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataXtd_AxisDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataXtd_PlaneDriver (theMsgDriver) ); - theDriverTable->AddDriver (new BinMDataXtd_PlacementDriver (theMsgDriver) ); theDriverTable->AddDriver (new BinMDataXtd_TriangulationDriver(theMsgDriver) ); theDriverTable->AddDriver (new BinMDataXtd_PresentationDriver (theMsgDriver) ); diff --git a/src/BinMDataXtd/BinMDataXtd.hxx b/src/BinMDataXtd/BinMDataXtd.hxx index a4f1ac8c62..d2cb914cc0 100644 --- a/src/BinMDataXtd/BinMDataXtd.hxx +++ b/src/BinMDataXtd/BinMDataXtd.hxx @@ -23,14 +23,9 @@ #include class BinMDF_ADriverTable; class Message_Messenger; -class BinMDataXtd_PointDriver; -class BinMDataXtd_AxisDriver; -class BinMDataXtd_PlaneDriver; class BinMDataXtd_GeometryDriver; class BinMDataXtd_ConstraintDriver; -class BinMDataXtd_PlacementDriver; class BinMDataXtd_PatternStdDriver; -class BinMDataXtd_ShapeDriver; class BinMDataXtd_TriangulationDriver; //! Storage and Retrieval drivers for modelling attributes. @@ -62,14 +57,9 @@ private: -friend class BinMDataXtd_PointDriver; -friend class BinMDataXtd_AxisDriver; -friend class BinMDataXtd_PlaneDriver; friend class BinMDataXtd_GeometryDriver; friend class BinMDataXtd_ConstraintDriver; -friend class BinMDataXtd_PlacementDriver; friend class BinMDataXtd_PatternStdDriver; -friend class BinMDataXtd_ShapeDriver; friend class BinMDataXtd_TriangulationDriver; }; diff --git a/src/BinMDataXtd/BinMDataXtd_AxisDriver.cxx b/src/BinMDataXtd/BinMDataXtd_AxisDriver.cxx deleted file mode 100644 index 149d3c88f2..0000000000 --- a/src/BinMDataXtd/BinMDataXtd_AxisDriver.cxx +++ /dev/null @@ -1,69 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMDataXtd_AxisDriver,BinMDF_ADriver) - -//======================================================================= -//function : BinMDataXtd_AxisDriver -//purpose : -//======================================================================= -BinMDataXtd_AxisDriver::BinMDataXtd_AxisDriver - (const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Axis)->Name()) -{ -} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= - -Handle(TDF_Attribute) BinMDataXtd_AxisDriver::NewEmpty() const -{ - return new TDataXtd_Axis(); -} - -//======================================================================= -//function : Paste -//purpose : persistent -> transient (retrieve) -//======================================================================= - -Standard_Boolean BinMDataXtd_AxisDriver::Paste - (const BinObjMgt_Persistent&, - const Handle(TDF_Attribute)&, - BinObjMgt_RRelocationTable& ) const -{return Standard_True;} - -//======================================================================= -//function : Paste -//purpose : transient -> persistent (store) -//======================================================================= - -void BinMDataXtd_AxisDriver::Paste (const Handle(TDF_Attribute)&, - BinObjMgt_Persistent&, - BinObjMgt_SRelocationTable& ) const -{} - diff --git a/src/BinMDataXtd/BinMDataXtd_PlacementDriver.cxx b/src/BinMDataXtd/BinMDataXtd_PlacementDriver.cxx deleted file mode 100644 index 51ff6b349c..0000000000 --- a/src/BinMDataXtd/BinMDataXtd_PlacementDriver.cxx +++ /dev/null @@ -1,70 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMDataXtd_PlacementDriver,BinMDF_ADriver) - -//======================================================================= -//function : BinMDataXtd_PlacementDriver -//purpose : -//======================================================================= -BinMDataXtd_PlacementDriver::BinMDataXtd_PlacementDriver - (const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Placement)->Name()) -{ -} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= - -Handle(TDF_Attribute) BinMDataXtd_PlacementDriver::NewEmpty() const -{ - return new TDataXtd_Placement(); -} - -//======================================================================= -//function : Paste -//purpose : persistent -> transient (retrieve) -//======================================================================= - -Standard_Boolean BinMDataXtd_PlacementDriver::Paste - (const BinObjMgt_Persistent&, - const Handle(TDF_Attribute)&, - BinObjMgt_RRelocationTable& ) const -{return Standard_True;} - -//======================================================================= -//function : Paste -//purpose : transient -> persistent (store) -//======================================================================= - -void BinMDataXtd_PlacementDriver::Paste (const Handle(TDF_Attribute)&, - BinObjMgt_Persistent&, - BinObjMgt_SRelocationTable& ) const -{} - - diff --git a/src/BinMDataXtd/BinMDataXtd_PlacementDriver.hxx b/src/BinMDataXtd/BinMDataXtd_PlacementDriver.hxx deleted file mode 100644 index 8378a0fe89..0000000000 --- a/src/BinMDataXtd/BinMDataXtd_PlacementDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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 _BinMDataXtd_PlacementDriver_HeaderFile -#define _BinMDataXtd_PlacementDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMDataXtd_PlacementDriver; -DEFINE_STANDARD_HANDLE(BinMDataXtd_PlacementDriver, BinMDF_ADriver) - -//! Placement attribute Driver. -class BinMDataXtd_PlacementDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMDataXtd_PlacementDriver(const Handle(Message_Messenger)& theMessageDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMDataXtd_PlacementDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMDataXtd_PlacementDriver_HeaderFile diff --git a/src/BinMDataXtd/BinMDataXtd_PlaneDriver.cxx b/src/BinMDataXtd/BinMDataXtd_PlaneDriver.cxx deleted file mode 100644 index 75beee8412..0000000000 --- a/src/BinMDataXtd/BinMDataXtd_PlaneDriver.cxx +++ /dev/null @@ -1,69 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMDataXtd_PlaneDriver,BinMDF_ADriver) - -//======================================================================= -//function : BinMDataXtd_PlaneDriver -//purpose : -//======================================================================= -BinMDataXtd_PlaneDriver::BinMDataXtd_PlaneDriver - (const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Plane)->Name()) -{ -} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= - -Handle(TDF_Attribute) BinMDataXtd_PlaneDriver::NewEmpty() const -{ - return new TDataXtd_Plane(); -} - -//======================================================================= -//function : Paste -//purpose : persistent -> transient (retrieve) -//======================================================================= - -Standard_Boolean BinMDataXtd_PlaneDriver::Paste - (const BinObjMgt_Persistent&, - const Handle(TDF_Attribute)&, - BinObjMgt_RRelocationTable& ) const -{return Standard_True;} - -//======================================================================= -//function : Paste -//purpose : transient -> persistent (store) -//======================================================================= - -void BinMDataXtd_PlaneDriver::Paste (const Handle(TDF_Attribute)&, - BinObjMgt_Persistent&, - BinObjMgt_SRelocationTable& ) const -{} - diff --git a/src/BinMDataXtd/BinMDataXtd_PlaneDriver.hxx b/src/BinMDataXtd/BinMDataXtd_PlaneDriver.hxx deleted file mode 100644 index 19b6fb42ee..0000000000 --- a/src/BinMDataXtd/BinMDataXtd_PlaneDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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 _BinMDataXtd_PlaneDriver_HeaderFile -#define _BinMDataXtd_PlaneDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMDataXtd_PlaneDriver; -DEFINE_STANDARD_HANDLE(BinMDataXtd_PlaneDriver, BinMDF_ADriver) - -//! Plane attribute Driver. -class BinMDataXtd_PlaneDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMDataXtd_PlaneDriver(const Handle(Message_Messenger)& theMessageDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMDataXtd_PlaneDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMDataXtd_PlaneDriver_HeaderFile diff --git a/src/BinMDataXtd/BinMDataXtd_PointDriver.cxx b/src/BinMDataXtd/BinMDataXtd_PointDriver.cxx deleted file mode 100644 index 8371af9b7e..0000000000 --- a/src/BinMDataXtd/BinMDataXtd_PointDriver.cxx +++ /dev/null @@ -1,70 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMDataXtd_PointDriver,BinMDF_ADriver) - -//======================================================================= -//function : BinMDataXtd_PointDriver -//purpose : -//======================================================================= -BinMDataXtd_PointDriver::BinMDataXtd_PointDriver - (const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Point)->Name()) -{ -} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= - -Handle(TDF_Attribute) BinMDataXtd_PointDriver::NewEmpty() const -{ - return new TDataXtd_Point(); -} - -//======================================================================= -//function : Paste -//purpose : persistent -> transient (retrieve) -//======================================================================= - -Standard_Boolean BinMDataXtd_PointDriver::Paste - (const BinObjMgt_Persistent&, - const Handle(TDF_Attribute)&, - BinObjMgt_RRelocationTable& ) const -{return Standard_True;} - -//======================================================================= -//function : Paste -//purpose : transient -> persistent (store) -//======================================================================= - -void BinMDataXtd_PointDriver::Paste (const Handle(TDF_Attribute)&, - BinObjMgt_Persistent&, - BinObjMgt_SRelocationTable& ) const -{} - - diff --git a/src/BinMDataXtd/BinMDataXtd_PointDriver.hxx b/src/BinMDataXtd/BinMDataXtd_PointDriver.hxx deleted file mode 100644 index 4c8ddadc50..0000000000 --- a/src/BinMDataXtd/BinMDataXtd_PointDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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 _BinMDataXtd_PointDriver_HeaderFile -#define _BinMDataXtd_PointDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMDataXtd_PointDriver; -DEFINE_STANDARD_HANDLE(BinMDataXtd_PointDriver, BinMDF_ADriver) - -//! Point attribute Driver. -class BinMDataXtd_PointDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMDataXtd_PointDriver(const Handle(Message_Messenger)& theMessageDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMDataXtd_PointDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMDataXtd_PointDriver_HeaderFile diff --git a/src/BinMDataXtd/BinMDataXtd_ShapeDriver.cxx b/src/BinMDataXtd/BinMDataXtd_ShapeDriver.cxx deleted file mode 100644 index 56960196e3..0000000000 --- a/src/BinMDataXtd/BinMDataXtd_ShapeDriver.cxx +++ /dev/null @@ -1,68 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMDataXtd_ShapeDriver,BinMDF_ADriver) - -//======================================================================= -//function : BinMDataXtd_ShapeDriver -//purpose : -//======================================================================= -BinMDataXtd_ShapeDriver::BinMDataXtd_ShapeDriver - (const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Shape)->Name()) -{ -} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= - -Handle(TDF_Attribute) BinMDataXtd_ShapeDriver::NewEmpty() const -{ - return new TDataXtd_Shape(); -} - -//======================================================================= -//function : Paste -//purpose : persistent -> transient (retrieve) -//======================================================================= - -Standard_Boolean BinMDataXtd_ShapeDriver::Paste - (const BinObjMgt_Persistent&, - const Handle(TDF_Attribute)&, - BinObjMgt_RRelocationTable& ) const -{return Standard_True;} - -//======================================================================= -//function : Paste -//purpose : transient -> persistent (store) -//======================================================================= - -void BinMDataXtd_ShapeDriver::Paste (const Handle(TDF_Attribute)&, - BinObjMgt_Persistent&, - BinObjMgt_SRelocationTable& ) const -{} diff --git a/src/BinMDataXtd/BinMDataXtd_ShapeDriver.hxx b/src/BinMDataXtd/BinMDataXtd_ShapeDriver.hxx deleted file mode 100644 index cb8b06ec5d..0000000000 --- a/src/BinMDataXtd/BinMDataXtd_ShapeDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2004-05-13 -// Created by: Sergey ZARITCHNY -// Copyright (c) 2004-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 _BinMDataXtd_ShapeDriver_HeaderFile -#define _BinMDataXtd_ShapeDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMDataXtd_ShapeDriver; -DEFINE_STANDARD_HANDLE(BinMDataXtd_ShapeDriver, BinMDF_ADriver) - -//! Shape attribute Driver. -class BinMDataXtd_ShapeDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMDataXtd_ShapeDriver(const Handle(Message_Messenger)& theMessageDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMDataXtd_ShapeDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMDataXtd_ShapeDriver_HeaderFile diff --git a/src/BinMDataXtd/FILES b/src/BinMDataXtd/FILES index a66405e9f8..fb15e5951d 100644 --- a/src/BinMDataXtd/FILES +++ b/src/BinMDataXtd/FILES @@ -1,21 +1,11 @@ BinMDataXtd.cxx BinMDataXtd.hxx -BinMDataXtd_AxisDriver.cxx -BinMDataXtd_AxisDriver.hxx BinMDataXtd_ConstraintDriver.cxx BinMDataXtd_ConstraintDriver.hxx BinMDataXtd_GeometryDriver.cxx BinMDataXtd_GeometryDriver.hxx BinMDataXtd_PatternStdDriver.cxx BinMDataXtd_PatternStdDriver.hxx -BinMDataXtd_PlacementDriver.cxx -BinMDataXtd_PlacementDriver.hxx -BinMDataXtd_PlaneDriver.cxx -BinMDataXtd_PlaneDriver.hxx -BinMDataXtd_PointDriver.cxx -BinMDataXtd_PointDriver.hxx -BinMDataXtd_ShapeDriver.cxx -BinMDataXtd_ShapeDriver.hxx BinMDataXtd_PresentationDriver.hxx BinMDataXtd_PresentationDriver.cxx BinMDataXtd_PositionDriver.hxx diff --git a/src/BinMXCAFDoc/BinMXCAFDoc.cxx b/src/BinMXCAFDoc/BinMXCAFDoc.cxx index 930ccd6e80..b458ebe82d 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc.cxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc.cxx @@ -18,32 +18,18 @@ #include #include #include -#include #include #include -#include #include -#include -#include #include -#include -#include #include -#include #include #include -#include #include -#include #include #include -#include -#include -#include -#include #include #include -#include #include #include @@ -54,7 +40,6 @@ void BinMXCAFDoc::AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable, const Handle(Message_Messenger)& theMsgDrv) { - theDriverTable->AddDriver( new BinMXCAFDoc_AreaDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_CentroidDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_ColorDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_GraphNodeDriver(theMsgDrv)); @@ -73,25 +58,11 @@ void BinMXCAFDoc::AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable, theDriverTable->AddDriver( aLocationDriver); theDriverTable->AddDriver( new BinMXCAFDoc_AssemblyItemRefDriver(theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_VolumeDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_DatumDriver (theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_GeomToleranceDriver (theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_DimensionDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_DimTolDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_MaterialDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_VisMaterialDriver (theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_NoteBalloonDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_NoteBinDataDriver (theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_NoteCommentDriver (theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_ViewDriver (theMsgDrv)); - - theDriverTable->AddDriver( new BinMXCAFDoc_ColorToolDriver (theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_DocumentToolDriver(theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_LayerToolDriver (theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_ShapeToolDriver (theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_DimTolToolDriver (theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_MaterialToolDriver(theMsgDrv)); theDriverTable->AddDriver( new BinMXCAFDoc_VisMaterialToolDriver(theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_NotesToolDriver (theMsgDrv)); - theDriverTable->AddDriver( new BinMXCAFDoc_ViewToolDriver (theMsgDrv)); } diff --git a/src/BinMXCAFDoc/BinMXCAFDoc.hxx b/src/BinMXCAFDoc/BinMXCAFDoc.hxx index bfd6213584..503c243da9 100644 --- a/src/BinMXCAFDoc/BinMXCAFDoc.hxx +++ b/src/BinMXCAFDoc/BinMXCAFDoc.hxx @@ -22,26 +22,13 @@ class BinMDF_ADriverTable; class Message_Messenger; -class BinMXCAFDoc_AreaDriver; class BinMXCAFDoc_CentroidDriver; -class BinMXCAFDoc_ClippingPlaneToolDriver; class BinMXCAFDoc_ColorDriver; class BinMXCAFDoc_GraphNodeDriver; class BinMXCAFDoc_LocationDriver; -class BinMXCAFDoc_VolumeDriver; class BinMXCAFDoc_DatumDriver; -class BinMXCAFDoc_GeomToleranceDriver; -class BinMXCAFDoc_DimensionDriver; class BinMXCAFDoc_DimTolDriver; class BinMXCAFDoc_MaterialDriver; -class BinMXCAFDoc_ColorToolDriver; -class BinMXCAFDoc_DocumentToolDriver; -class BinMXCAFDoc_LayerToolDriver; -class BinMXCAFDoc_ShapeToolDriver; -class BinMXCAFDoc_DimTolToolDriver; -class BinMXCAFDoc_MaterialToolDriver; -class BinMXCAFDoc_ViewDriver; -class BinMXCAFDoc_ViewToolDriver; @@ -69,26 +56,13 @@ private: -friend class BinMXCAFDoc_AreaDriver; friend class BinMXCAFDoc_CentroidDriver; -friend class BinMXCAFDoc_ClippingPlaneToolDriver; friend class BinMXCAFDoc_ColorDriver; friend class BinMXCAFDoc_GraphNodeDriver; friend class BinMXCAFDoc_LocationDriver; -friend class BinMXCAFDoc_VolumeDriver; friend class BinMXCAFDoc_DatumDriver; -friend class BinMXCAFDoc_GeomToleranceDriver; -friend class BinMXCAFDoc_DimensionDriver; friend class BinMXCAFDoc_DimTolDriver; friend class BinMXCAFDoc_MaterialDriver; -friend class BinMXCAFDoc_ColorToolDriver; -friend class BinMXCAFDoc_DocumentToolDriver; -friend class BinMXCAFDoc_LayerToolDriver; -friend class BinMXCAFDoc_ShapeToolDriver; -friend class BinMXCAFDoc_DimTolToolDriver; -friend class BinMXCAFDoc_MaterialToolDriver; -friend class BinMXCAFDoc_ViewDriver; -friend class BinMXCAFDoc_ViewToolDriver; }; diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.cxx deleted file mode 100644 index bbb29fe55b..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.cxx +++ /dev/null @@ -1,69 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_AreaDriver,BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_AreaDriver::BinMXCAFDoc_AreaDriver(const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_Area)->Name()) { -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_AreaDriver::NewEmpty() const { - return new XCAFDoc_Area(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_AreaDriver::Paste(const BinObjMgt_Persistent& theSource, - const Handle(TDF_Attribute)& theTarget, - BinObjMgt_RRelocationTable& ) const -{ - Handle(XCAFDoc_Area) anAtt = Handle(XCAFDoc_Area)::DownCast(theTarget); - Standard_Real aValue; - Standard_Boolean isOk = theSource >> aValue; - if(isOk) - anAtt->Set(aValue); - return isOk; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_AreaDriver::Paste(const Handle(TDF_Attribute)& theSource, - BinObjMgt_Persistent& theTarget, - BinObjMgt_SRelocationTable& ) const -{ - Handle(XCAFDoc_Area) anAtt = Handle(XCAFDoc_Area)::DownCast(theSource); - theTarget << anAtt->Get(); -} - diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.hxx deleted file mode 100644 index 4e2e2e1ae5..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_AreaDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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 _BinMXCAFDoc_AreaDriver_HeaderFile -#define _BinMXCAFDoc_AreaDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMXCAFDoc_AreaDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_AreaDriver, BinMDF_ADriver) - - -class BinMXCAFDoc_AreaDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_AreaDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, BinObjMgt_Persistent& theTarget, BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_AreaDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMXCAFDoc_AreaDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ClippingPlaneToolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_ClippingPlaneToolDriver.cxx deleted file mode 100644 index 9727b5cd08..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ClippingPlaneToolDriver.cxx +++ /dev/null @@ -1,65 +0,0 @@ -// Created on: 2016-11-30 -// Created by: Irina KRYLOVA -// Copyright (c) 2016 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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_ClippingPlaneToolDriver, BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_ClippingPlaneToolDriver::BinMXCAFDoc_ClippingPlaneToolDriver - (const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_ClippingPlaneTool)->Name()) -{ -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_ClippingPlaneToolDriver::NewEmpty() const -{ - return new XCAFDoc_ClippingPlaneTool(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_ClippingPlaneToolDriver::Paste - (const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - return Standard_True; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_ClippingPlaneToolDriver::Paste - (const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const { -} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ClippingPlaneToolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_ClippingPlaneToolDriver.hxx deleted file mode 100644 index 2eaf2309d8..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ClippingPlaneToolDriver.hxx +++ /dev/null @@ -1,50 +0,0 @@ -// Created on: 2016-11-30 -// Created by: Irina KRYLOVA -// Copyright (c) 2016 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 _BinMXCAFDoc_ClippingPlaneToolDriver_HeaderFile -#define _BinMXCAFDoc_ClippingPlaneToolDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMXCAFDoc_ClippingPlaneToolDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_ClippingPlaneToolDriver, BinMDF_ADriver) - - -class BinMXCAFDoc_ClippingPlaneToolDriver : public BinMDF_ADriver -{ -public: - - Standard_EXPORT BinMXCAFDoc_ClippingPlaneToolDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste(const BinObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste(const Handle(TDF_Attribute)& theSource, BinObjMgt_Persistent& theTarget, BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_ClippingPlaneToolDriver, BinMDF_ADriver) - -}; -#endif // _BinMXCAFDoc_ClippingPlaneToolDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ColorToolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_ColorToolDriver.cxx deleted file mode 100644 index 604a1fa03b..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ColorToolDriver.cxx +++ /dev/null @@ -1,61 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_ColorToolDriver,BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_ColorToolDriver::BinMXCAFDoc_ColorToolDriver(const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_ColorTool)->Name()) { -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_ColorToolDriver::NewEmpty() const { - return new XCAFDoc_ColorTool(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_ColorToolDriver::Paste(const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - return Standard_True; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_ColorToolDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const { -} - diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ColorToolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_ColorToolDriver.hxx deleted file mode 100644 index d18e4fcc52..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ColorToolDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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 _BinMXCAFDoc_ColorToolDriver_HeaderFile -#define _BinMXCAFDoc_ColorToolDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMXCAFDoc_ColorToolDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_ColorToolDriver, BinMDF_ADriver) - - -class BinMXCAFDoc_ColorToolDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_ColorToolDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, BinObjMgt_Persistent& theTarget, BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_ColorToolDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMXCAFDoc_ColorToolDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_DimTolToolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_DimTolToolDriver.cxx deleted file mode 100644 index 0044d1ec7d..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_DimTolToolDriver.cxx +++ /dev/null @@ -1,65 +0,0 @@ -// Created on: 2008-12-10 -// Created by: Pavel TELKOV -// Copyright (c) 2008-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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_DimTolToolDriver,BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_DimTolToolDriver::BinMXCAFDoc_DimTolToolDriver - (const Handle(Message_Messenger)& theMsgDriver) -: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_DimTolTool)->Name()) -{ -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_DimTolToolDriver::NewEmpty() const -{ - return new XCAFDoc_DimTolTool(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_DimTolToolDriver::Paste - (const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - return Standard_True; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_DimTolToolDriver::Paste - (const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const { -} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_DimTolToolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_DimTolToolDriver.hxx deleted file mode 100644 index ae484d6d6e..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_DimTolToolDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2008-12-10 -// Created by: Pavel TELKOV -// Copyright (c) 2008-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 _BinMXCAFDoc_DimTolToolDriver_HeaderFile -#define _BinMXCAFDoc_DimTolToolDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMXCAFDoc_DimTolToolDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_DimTolToolDriver, BinMDF_ADriver) - - -class BinMXCAFDoc_DimTolToolDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_DimTolToolDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, BinObjMgt_Persistent& theTarget, BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_DimTolToolDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMXCAFDoc_DimTolToolDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_DimensionDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_DimensionDriver.cxx deleted file mode 100644 index 7c780f1e3f..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_DimensionDriver.cxx +++ /dev/null @@ -1,68 +0,0 @@ -// Created on: -// Created by: -// Copyright (c) 2015 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. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_DimensionDriver,BinMDF_ADriver) - -//======================================================================= -//function : Constructor -//purpose : -//======================================================================= -BinMXCAFDoc_DimensionDriver::BinMXCAFDoc_DimensionDriver (const Handle(Message_Messenger)& theMsgDriver) -: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_Dimension)->Name()) -{ -} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_DimensionDriver::NewEmpty() const -{ - return new XCAFDoc_Dimension(); -} - -//======================================================================= -//function : Paste -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_DimensionDriver::Paste (const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - //Handle(XCAFDoc_Dimension) anAtt = Handle(XCAFDoc_Dimension)::DownCast(theTarget); - return Standard_True; -} - -//======================================================================= -//function : Paste -//purpose : -//======================================================================= -void BinMXCAFDoc_DimensionDriver::Paste (const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const -{ - //Handle(XCAFDoc_Dimension) anAtt = Handle(XCAFDoc_Dimension)::DownCast(theSource); -} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_DimensionDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_DimensionDriver.hxx deleted file mode 100644 index 665dcfb89c..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_DimensionDriver.hxx +++ /dev/null @@ -1,56 +0,0 @@ -// Created on: -// Created by: -// Copyright (c) 20015 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 _BinMXCAFDoc_DimensionDriver_HeaderFile -#define _BinMXCAFDoc_DimensionDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include - -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - -class BinMXCAFDoc_DimensionDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_DimensionDriver, BinMDF_ADriver) - -class BinMXCAFDoc_DimensionDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_DimensionDriver (const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, - const Handle(TDF_Attribute)& theTarget, - BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, - BinObjMgt_Persistent& theTarget, - BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_DimensionDriver,BinMDF_ADriver) - -}; - -#endif // _BinMXCAFDoc_DimensionDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_DocumentToolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_DocumentToolDriver.cxx deleted file mode 100644 index 59720c1768..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_DocumentToolDriver.cxx +++ /dev/null @@ -1,63 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_DocumentToolDriver,BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_DocumentToolDriver::BinMXCAFDoc_DocumentToolDriver(const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_DocumentTool)->Name()) { -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_DocumentToolDriver::NewEmpty() const { - return new XCAFDoc_DocumentTool(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_DocumentToolDriver::Paste(const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& theTarget, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - Handle(XCAFDoc_DocumentTool) T = Handle(XCAFDoc_DocumentTool)::DownCast(theTarget); - T->Init(); - return Standard_True; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_DocumentToolDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const -{ -} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_DocumentToolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_DocumentToolDriver.hxx deleted file mode 100644 index e59115065e..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_DocumentToolDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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 _BinMXCAFDoc_DocumentToolDriver_HeaderFile -#define _BinMXCAFDoc_DocumentToolDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMXCAFDoc_DocumentToolDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_DocumentToolDriver, BinMDF_ADriver) - - -class BinMXCAFDoc_DocumentToolDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_DocumentToolDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, BinObjMgt_Persistent& theTarget, BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_DocumentToolDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMXCAFDoc_DocumentToolDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_GeomToleranceDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_GeomToleranceDriver.cxx deleted file mode 100644 index e9f81b95bd..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_GeomToleranceDriver.cxx +++ /dev/null @@ -1,68 +0,0 @@ -// Created on: -// Created by: -// Copyright (c) 2015 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. - - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_GeomToleranceDriver,BinMDF_ADriver) - -//======================================================================= -//function : Constructor -//purpose : -//======================================================================= -BinMXCAFDoc_GeomToleranceDriver::BinMXCAFDoc_GeomToleranceDriver (const Handle(Message_Messenger)& theMsgDriver) -: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_GeomTolerance)->Name()) -{ -} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_GeomToleranceDriver::NewEmpty() const -{ - return new XCAFDoc_GeomTolerance(); -} - -//======================================================================= -//function : Paste -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_GeomToleranceDriver::Paste (const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - //Handle(XCAFDoc_GeomTolerance) anAtt = Handle(XCAFDoc_GeomTolerance)::DownCast(theTarget); - return Standard_True; -} - -//======================================================================= -//function : Paste -//purpose : -//======================================================================= -void BinMXCAFDoc_GeomToleranceDriver::Paste (const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const -{ - //Handle(XCAFDoc_GeomTolerance) anAtt = Handle(XCAFDoc_GeomTolerance)::DownCast(theSource); -} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_GeomToleranceDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_GeomToleranceDriver.hxx deleted file mode 100644 index cc4a4c7504..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_GeomToleranceDriver.hxx +++ /dev/null @@ -1,56 +0,0 @@ -// Created on: -// Created by: -// Copyright (c) 20015 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 _BinMXCAFDoc_GeomToleranceDriver_HeaderFile -#define _BinMXCAFDoc_GeomToleranceDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include - -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - -class BinMXCAFDoc_GeomToleranceDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_GeomToleranceDriver, BinMDF_ADriver) - -class BinMXCAFDoc_GeomToleranceDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_GeomToleranceDriver (const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, - const Handle(TDF_Attribute)& theTarget, - BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, - BinObjMgt_Persistent& theTarget, - BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_GeomToleranceDriver,BinMDF_ADriver) - -}; - -#endif // _BinMXCAFDoc_GeomToleranceDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_LayerToolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_LayerToolDriver.cxx deleted file mode 100644 index 6afe0c35ae..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_LayerToolDriver.cxx +++ /dev/null @@ -1,62 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_LayerToolDriver,BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_LayerToolDriver::BinMXCAFDoc_LayerToolDriver(const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_LayerTool)->Name()) { -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_LayerToolDriver::NewEmpty() const { - return new XCAFDoc_LayerTool(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_LayerToolDriver::Paste(const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - return Standard_True; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_LayerToolDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const -{ -} - diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_LayerToolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_LayerToolDriver.hxx deleted file mode 100644 index b336f5b896..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_LayerToolDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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 _BinMXCAFDoc_LayerToolDriver_HeaderFile -#define _BinMXCAFDoc_LayerToolDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMXCAFDoc_LayerToolDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_LayerToolDriver, BinMDF_ADriver) - - -class BinMXCAFDoc_LayerToolDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_LayerToolDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, BinObjMgt_Persistent& theTarget, BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_LayerToolDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMXCAFDoc_LayerToolDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_MaterialToolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_MaterialToolDriver.cxx deleted file mode 100644 index 4adc8f3fee..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_MaterialToolDriver.cxx +++ /dev/null @@ -1,65 +0,0 @@ -// Created on: 2008-12-10 -// Created by: Pavel TELKOV -// Copyright (c) 2008-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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_MaterialToolDriver,BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_MaterialToolDriver::BinMXCAFDoc_MaterialToolDriver - (const Handle(Message_Messenger)& theMsgDriver) -: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_MaterialTool)->Name()) -{ -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_MaterialToolDriver::NewEmpty() const -{ - return new XCAFDoc_MaterialTool(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_MaterialToolDriver::Paste - (const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - return Standard_True; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_MaterialToolDriver::Paste - (const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const { -} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_MaterialToolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_MaterialToolDriver.hxx deleted file mode 100644 index 908fb5b02c..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_MaterialToolDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2008-12-10 -// Created by: Pavel TELKOV -// Copyright (c) 2008-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 _BinMXCAFDoc_MaterialToolDriver_HeaderFile -#define _BinMXCAFDoc_MaterialToolDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMXCAFDoc_MaterialToolDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_MaterialToolDriver, BinMDF_ADriver) - - -class BinMXCAFDoc_MaterialToolDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_MaterialToolDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, BinObjMgt_Persistent& theTarget, BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_MaterialToolDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMXCAFDoc_MaterialToolDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NoteBalloonDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_NoteBalloonDriver.cxx deleted file mode 100644 index cf7bf92180..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_NoteBalloonDriver.cxx +++ /dev/null @@ -1,52 +0,0 @@ -// Created on: 2017-08-10 -// Created by: Eugeny NIKONOV -// Copyright (c) 2005-2017 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. - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_NoteBalloonDriver, BinMXCAFDoc_NoteCommentDriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_NoteBalloonDriver::BinMXCAFDoc_NoteBalloonDriver(const Handle(Message_Messenger)& theMsgDriver) - : BinMXCAFDoc_NoteCommentDriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_NoteBalloon)->Name()) -{ -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_NoteBalloonDriver::NewEmpty() const -{ - return new XCAFDoc_NoteBalloon(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_NoteBalloonDriver::BinMXCAFDoc_NoteBalloonDriver(const Handle(Message_Messenger)& theMsgDriver, - Standard_CString theName) - : BinMXCAFDoc_NoteCommentDriver(theMsgDriver, theName) -{ - -} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NoteBalloonDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_NoteBalloonDriver.hxx deleted file mode 100644 index 516f3a7f04..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_NoteBalloonDriver.hxx +++ /dev/null @@ -1,42 +0,0 @@ -// Created on: 2017-08-10 -// Created by: Sergey NIKONOV -// Copyright (c) 2005-2017 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 _BinMXCAFDoc_NoteBalloonDriver_HeaderFile -#define _BinMXCAFDoc_NoteBalloonDriver_HeaderFile - -#include - -class BinMXCAFDoc_NoteBalloonDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_NoteBalloonDriver, BinMXCAFDoc_NoteCommentDriver) - -class BinMXCAFDoc_NoteBalloonDriver : public BinMXCAFDoc_NoteCommentDriver -{ -public: - - Standard_EXPORT BinMXCAFDoc_NoteBalloonDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_NoteBalloonDriver, BinMXCAFDoc_NoteCommentDriver) - - -protected: - - BinMXCAFDoc_NoteBalloonDriver(const Handle(Message_Messenger)& theMsgDriver, - Standard_CString theName); - -}; - -#endif // _BinMXCAFDoc_NoteCommentDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.cxx deleted file mode 100644 index f100f09e69..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.cxx +++ /dev/null @@ -1,62 +0,0 @@ -// Created on: 2017-02-10 -// Created by: Eugeny NIKONOV -// Copyright (c) 2005-2017 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. - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_NotesToolDriver, BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_NotesToolDriver::BinMXCAFDoc_NotesToolDriver(const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_NotesTool)->Name()) -{ -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_NotesToolDriver::NewEmpty() const -{ - return new XCAFDoc_NotesTool(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_NotesToolDriver::Paste(const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - return Standard_True; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_NotesToolDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const -{ -} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.hxx deleted file mode 100644 index 61129f014f..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.hxx +++ /dev/null @@ -1,54 +0,0 @@ -// Created on: 2017-02-10 -// Created by: Sergey NIKONOV -// Copyright (c) 2005-2017 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 _BinMXCAFDoc_NotesToolDriver_HeaderFile -#define _BinMXCAFDoc_NotesToolDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include - -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - -class BinMXCAFDoc_NotesToolDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_NotesToolDriver, BinMDF_ADriver) - -class BinMXCAFDoc_NotesToolDriver : public BinMDF_ADriver -{ -public: - - Standard_EXPORT BinMXCAFDoc_NotesToolDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, - const Handle(TDF_Attribute)& theTarget, - BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT void Paste (const Handle(TDF_Attribute)& theSource, - BinObjMgt_Persistent& theTarget, - BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_NotesToolDriver, BinMDF_ADriver) - -}; - -#endif // _BinMXCAFDoc_NotesToolDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ShapeToolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_ShapeToolDriver.cxx deleted file mode 100644 index 6b2897f613..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ShapeToolDriver.cxx +++ /dev/null @@ -1,63 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_ShapeToolDriver,BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_ShapeToolDriver::BinMXCAFDoc_ShapeToolDriver(const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_ShapeTool)->Name()) -{ -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_ShapeToolDriver::NewEmpty() const { - return new XCAFDoc_ShapeTool(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_ShapeToolDriver::Paste(const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - return Standard_True; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_ShapeToolDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const -{ -} - diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ShapeToolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_ShapeToolDriver.hxx deleted file mode 100644 index 94a4b4041f..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ShapeToolDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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 _BinMXCAFDoc_ShapeToolDriver_HeaderFile -#define _BinMXCAFDoc_ShapeToolDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMXCAFDoc_ShapeToolDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_ShapeToolDriver, BinMDF_ADriver) - - -class BinMXCAFDoc_ShapeToolDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_ShapeToolDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, BinObjMgt_Persistent& theTarget, BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_ShapeToolDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMXCAFDoc_ShapeToolDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ViewDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_ViewDriver.cxx deleted file mode 100644 index 1708c4447c..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ViewDriver.cxx +++ /dev/null @@ -1,63 +0,0 @@ -// Created on: 2016-10-24 -// Created by: Irina KRYLOVA -// Copyright (c) 2016 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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_ViewDriver, BinMDF_ADriver) - -//======================================================================= -//function : Constructor -//purpose : -//======================================================================= -BinMXCAFDoc_ViewDriver::BinMXCAFDoc_ViewDriver (const Handle(Message_Messenger)& theMsgDriver) -: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_View)->Name()) -{ -} - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_ViewDriver::NewEmpty() const -{ - return new XCAFDoc_View(); -} - -//======================================================================= -//function : Paste -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_ViewDriver::Paste (const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - return Standard_True; -} - -//======================================================================= -//function : Paste -//purpose : -//======================================================================= -void BinMXCAFDoc_ViewDriver::Paste (const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const -{ -} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ViewDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_ViewDriver.hxx deleted file mode 100644 index 0c011114cd..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ViewDriver.hxx +++ /dev/null @@ -1,56 +0,0 @@ -// Created on: 2016-10-24 -// Created by: Irina KRYLOVA -// Copyright (c) 2016 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 _BinMXCAFDoc_ViewDriver_HeaderFile -#define _BinMXCAFDoc_ViewDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include - -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - -class BinMXCAFDoc_ViewDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_ViewDriver, BinMDF_ADriver) - -class BinMXCAFDoc_ViewDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_ViewDriver (const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, - const Handle(TDF_Attribute)& theTarget, - BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, - BinObjMgt_Persistent& theTarget, - BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_ViewDriver, BinMDF_ADriver) - -}; - -#endif // _BinMXCAFDoc_ViewDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ViewToolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_ViewToolDriver.cxx deleted file mode 100644 index bd80bc39ba..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ViewToolDriver.cxx +++ /dev/null @@ -1,65 +0,0 @@ -// Created on: 2016-10-24 -// Created by: Irina KRYLOVA -// Copyright (c) 2016 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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_ViewToolDriver, BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_ViewToolDriver::BinMXCAFDoc_ViewToolDriver - (const Handle(Message_Messenger)& theMsgDriver) -: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_ViewTool)->Name()) -{ -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_ViewToolDriver::NewEmpty() const -{ - return new XCAFDoc_ViewTool(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_ViewToolDriver::Paste - (const BinObjMgt_Persistent& /*theSource*/, - const Handle(TDF_Attribute)& /*theTarget*/, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - return Standard_True; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_ViewToolDriver::Paste - (const Handle(TDF_Attribute)& /*theSource*/, - BinObjMgt_Persistent& /*theTarget*/, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const { -} diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_ViewToolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_ViewToolDriver.hxx deleted file mode 100644 index 46430fb798..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_ViewToolDriver.hxx +++ /dev/null @@ -1,52 +0,0 @@ -// Created on: 2016-10-24 -// Created by: Irina KRYLOVA -// Copyright (c) 2016 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 _BinMXCAFDoc_ViewToolDriver_HeaderFile -#define _BinMXCAFDoc_ViewToolDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMXCAFDoc_ViewToolDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_ViewToolDriver, BinMDF_ADriver) - - -class BinMXCAFDoc_ViewToolDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_ViewToolDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, BinObjMgt_Persistent& theTarget, BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_ViewToolDriver, BinMDF_ADriver) - -}; -#endif // _BinMXCAFDoc_ViewToolDriver_HeaderFile diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.cxx deleted file mode 100644 index d40dccf8e8..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.cxx +++ /dev/null @@ -1,69 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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. - - -#include -#include -#include -#include -#include -#include - -IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_VolumeDriver,BinMDF_ADriver) - -//======================================================================= -//function : -//purpose : -//======================================================================= -BinMXCAFDoc_VolumeDriver::BinMXCAFDoc_VolumeDriver(const Handle(Message_Messenger)& theMsgDriver) - : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_Volume)->Name()) { -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Handle(TDF_Attribute) BinMXCAFDoc_VolumeDriver::NewEmpty() const { - return new XCAFDoc_Volume(); -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -Standard_Boolean BinMXCAFDoc_VolumeDriver::Paste(const BinObjMgt_Persistent& theSource, - const Handle(TDF_Attribute)& theTarget, - BinObjMgt_RRelocationTable& /*theRelocTable*/) const -{ - Handle(XCAFDoc_Volume) anAtt = Handle(XCAFDoc_Volume)::DownCast(theTarget); - Standard_Real aVol; - Standard_Boolean isOk = theSource >> aVol; - if(isOk) - anAtt->Set(aVol); - return isOk; -} - -//======================================================================= -//function : -//purpose : -//======================================================================= -void BinMXCAFDoc_VolumeDriver::Paste(const Handle(TDF_Attribute)& theSource, - BinObjMgt_Persistent& theTarget, - BinObjMgt_SRelocationTable& /*theRelocTable*/) const -{ - Handle(XCAFDoc_Volume) anAtt = Handle(XCAFDoc_Volume)::DownCast(theSource); - theTarget << anAtt->Get(); -} - diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.hxx deleted file mode 100644 index 8741d36c83..0000000000 --- a/src/BinMXCAFDoc/BinMXCAFDoc_VolumeDriver.hxx +++ /dev/null @@ -1,72 +0,0 @@ -// Created on: 2005-05-17 -// Created by: Eugeny NAPALKOV -// Copyright (c) 2005-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 _BinMXCAFDoc_VolumeDriver_HeaderFile -#define _BinMXCAFDoc_VolumeDriver_HeaderFile - -#include -#include - -#include -#include -#include -#include -class Message_Messenger; -class TDF_Attribute; -class BinObjMgt_Persistent; - - -class BinMXCAFDoc_VolumeDriver; -DEFINE_STANDARD_HANDLE(BinMXCAFDoc_VolumeDriver, BinMDF_ADriver) - - -class BinMXCAFDoc_VolumeDriver : public BinMDF_ADriver -{ - -public: - - - Standard_EXPORT BinMXCAFDoc_VolumeDriver(const Handle(Message_Messenger)& theMsgDriver); - - Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT virtual Standard_Boolean Paste (const BinObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, BinObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE; - - Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, BinObjMgt_Persistent& theTarget, BinObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(BinMXCAFDoc_VolumeDriver,BinMDF_ADriver) - -protected: - - - - -private: - - - - -}; - - - - - - - -#endif // _BinMXCAFDoc_VolumeDriver_HeaderFile diff --git a/src/BinMXCAFDoc/FILES b/src/BinMXCAFDoc/FILES index 22daf02e37..68f84fabf9 100644 --- a/src/BinMXCAFDoc/FILES +++ b/src/BinMXCAFDoc/FILES @@ -2,58 +2,28 @@ BinMXCAFDoc.cxx BinMXCAFDoc.hxx BinMXCAFDoc_AssemblyItemRefDriver.cxx BinMXCAFDoc_AssemblyItemRefDriver.hxx -BinMXCAFDoc_AreaDriver.cxx -BinMXCAFDoc_AreaDriver.hxx BinMXCAFDoc_CentroidDriver.cxx BinMXCAFDoc_CentroidDriver.hxx -BinMXCAFDoc_ClippingPlaneToolDriver.cxx -BinMXCAFDoc_ClippingPlaneToolDriver.hxx BinMXCAFDoc_ColorDriver.cxx BinMXCAFDoc_ColorDriver.hxx -BinMXCAFDoc_ColorToolDriver.cxx -BinMXCAFDoc_ColorToolDriver.hxx BinMXCAFDoc_DatumDriver.cxx BinMXCAFDoc_DatumDriver.hxx -BinMXCAFDoc_DimensionDriver.cxx -BinMXCAFDoc_DimensionDriver.hxx BinMXCAFDoc_DimTolDriver.cxx BinMXCAFDoc_DimTolDriver.hxx -BinMXCAFDoc_DimTolToolDriver.cxx -BinMXCAFDoc_DimTolToolDriver.hxx -BinMXCAFDoc_DocumentToolDriver.cxx -BinMXCAFDoc_DocumentToolDriver.hxx -BinMXCAFDoc_GeomToleranceDriver.cxx -BinMXCAFDoc_GeomToleranceDriver.hxx BinMXCAFDoc_GraphNodeDriver.cxx BinMXCAFDoc_GraphNodeDriver.hxx -BinMXCAFDoc_LayerToolDriver.cxx -BinMXCAFDoc_LayerToolDriver.hxx BinMXCAFDoc_LocationDriver.cxx BinMXCAFDoc_LocationDriver.hxx BinMXCAFDoc_LocationDriver.lxx BinMXCAFDoc_MaterialDriver.cxx BinMXCAFDoc_MaterialDriver.hxx -BinMXCAFDoc_MaterialToolDriver.cxx -BinMXCAFDoc_MaterialToolDriver.hxx BinMXCAFDoc_NoteDriver.cxx BinMXCAFDoc_NoteDriver.hxx -BinMXCAFDoc_NoteBalloonDriver.cxx -BinMXCAFDoc_NoteBalloonDriver.hxx BinMXCAFDoc_NoteCommentDriver.cxx BinMXCAFDoc_NoteCommentDriver.hxx BinMXCAFDoc_NoteBinDataDriver.cxx BinMXCAFDoc_NoteBinDataDriver.hxx -BinMXCAFDoc_NotesToolDriver.cxx -BinMXCAFDoc_NotesToolDriver.hxx -BinMXCAFDoc_ShapeToolDriver.cxx -BinMXCAFDoc_ShapeToolDriver.hxx -BinMXCAFDoc_ViewDriver.cxx -BinMXCAFDoc_ViewDriver.hxx -BinMXCAFDoc_ViewToolDriver.cxx -BinMXCAFDoc_ViewToolDriver.hxx BinMXCAFDoc_VisMaterialDriver.cxx BinMXCAFDoc_VisMaterialDriver.hxx BinMXCAFDoc_VisMaterialToolDriver.cxx BinMXCAFDoc_VisMaterialToolDriver.hxx -BinMXCAFDoc_VolumeDriver.cxx -BinMXCAFDoc_VolumeDriver.hxx diff --git a/src/DDF/DDF_BasicCommands.cxx b/src/DDF/DDF_BasicCommands.cxx index de9dbb8607..a3994bdedd 100644 --- a/src/DDF/DDF_BasicCommands.cxx +++ b/src/DDF/DDF_BasicCommands.cxx @@ -54,6 +54,7 @@ #include #include #include +#include //======================================================================= //function : Children @@ -114,6 +115,37 @@ static Standard_Integer DDF_Attributes (Draw_Interpretor& di, return 0; } +//======================================================================= +//function : SetEmptyAttribute +//purpose : Adds an empty attribute to the label by its dynamic type. +//======================================================================= + +static Standard_Integer DDF_SetEmptyAttribute (Draw_Interpretor& di, + Standard_Integer n, + const char** a) +{ + if (n != 4) return 1; + + Handle(TDF_Data) DF; + + if (!DDF::GetDF (a[1], DF)) return 1; + + TDF_Label lab; + TDF_Tool::Label(DF,a[2],lab); + + if (lab.IsNull()) return 1; + + Handle(TDF_Attribute) anAttrByType = TDF_DerivedAttribute::Attribute(a[3]); + if (anAttrByType.IsNull()) { + di<<"DDF: Not registered attribute type '"<ID()); + return 0; + } di<<"DDF: The format of GUID is invalid\n"; return 1; } @@ -297,12 +335,16 @@ void DDF::BasicCommands (Draw_Interpretor& theCommands) " Returns the list of label attributes: Attributes DF label", __FILE__, DDF_Attributes, g); + theCommands.Add ("SetEmptyAttribute", + "Sets an empty attribute by its type (like TDataStd_Tick): SetEmptyAttribute DF label type", + __FILE__, DDF_SetEmptyAttribute, g); + theCommands.Add ("ForgetAll", "Forgets all attributes from the label: ForgetAll DF Label", __FILE__, DDF_ForgetAll, g); theCommands.Add ("ForgetAtt", - "Forgets the specified by guid attribute from the label: ForgetAtt DF Label guid", + "Forgets the specified by guid attribute or type from the label: ForgetAtt DF Label guid_or_type", __FILE__, DDF_ForgetAttribute, g); theCommands.Add ("Label", diff --git a/src/TDF/FILES b/src/TDF/FILES index 581f1bcf9a..b6f97ecf00 100755 --- a/src/TDF/FILES +++ b/src/TDF/FILES @@ -60,6 +60,8 @@ TDF_DeltaOnRemoval.cxx TDF_DeltaOnRemoval.hxx TDF_DeltaOnResume.cxx TDF_DeltaOnResume.hxx +TDF_DerivedAttribute.cxx +TDF_DerivedAttribute.hxx TDF_DoubleMapIteratorOfAttributeDoubleMap.hxx TDF_DoubleMapIteratorOfGUIDProgIDMap.hxx TDF_DoubleMapIteratorOfLabelDoubleMap.hxx diff --git a/src/TDF/TDF_DerivedAttribute.cxx b/src/TDF/TDF_DerivedAttribute.cxx new file mode 100644 index 0000000000..1a852bcc5f --- /dev/null +++ b/src/TDF/TDF_DerivedAttribute.cxx @@ -0,0 +1,162 @@ +// Copyright (c) 2020 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. + +#include + +#include +#include +#include + +namespace TDF_DerivedAttributeGlobals +{ + + //! Data for the derived attribute correct creation + struct CreatorData + { + TDF_DerivedAttribute::NewDerived myCreator; + Standard_CString myNameSpace; + Standard_CString myTypeName; + }; + + //! List that contains the methods that create all registered derived attributes + static NCollection_List& Creators() + { + static NCollection_List THE_CREATORS_LIST; + return THE_CREATORS_LIST; + } + //! Global map of the string-type of derived attribute -> instance of such attribute + static NCollection_DataMap& Attributes() + { + static NCollection_DataMap THE_DERIVED; + return THE_DERIVED; + } + + //! Global map of the string-type of derived attribute -> type name to identify this attribute + static NCollection_DataMap& Types() + { + static NCollection_DataMap THE_DERIVED_TYPES; + return THE_DERIVED_TYPES; + } + + //! To minimize simultaneous access to global "DERIVED" maps from parallel threads + static Standard_Mutex& Mutex() + { + static Standard_Mutex THE_DERIVED_MUTEX; + return THE_DERIVED_MUTEX; + } +} // namespace TDF_DerivedAttributeGlobals + +//======================================================================= +// function : Register +// purpose : Registers a derived by the pointer to a method that creates a new derived attribute instance +//======================================================================= +TDF_DerivedAttribute::NewDerived TDF_DerivedAttribute::Register (NewDerived theNewAttributeFunction, + Standard_CString theNameSpace, + Standard_CString theTypeName) +{ + TDF_DerivedAttributeGlobals::CreatorData aData = {theNewAttributeFunction, theNameSpace, theTypeName}; + Standard_Mutex::Sentry aSentry (TDF_DerivedAttributeGlobals::Mutex()); + TDF_DerivedAttributeGlobals::Creators().Append (aData); + return theNewAttributeFunction; +} + +//======================================================================= +// function : Initialize +// purpose : Checks synchronization and performs initialization of derived attributes maps if needed +//======================================================================= +static void Initialize() +{ + if (!TDF_DerivedAttributeGlobals::Creators().IsEmpty()) + { // initialization + NCollection_List::Iterator aCreator; + for (aCreator.Initialize (TDF_DerivedAttributeGlobals::Creators()); aCreator.More(); aCreator.Next()) + { + Handle(TDF_Attribute) aDerived = aCreator.Value().myCreator(); + Standard_CString aDerivedDynamicType = aDerived->DynamicType()->Name(); + + TCollection_AsciiString aTypeName; + if (aCreator.Value().myNameSpace != NULL) + { + if (aCreator.Value().myNameSpace[0] != '\0') + { + aTypeName = aCreator.Value().myNameSpace; + aTypeName += ':'; + } + } + if (aCreator.Value().myTypeName == NULL) + { + aTypeName += aDerivedDynamicType; + } + else + { + aTypeName += aCreator.Value().myTypeName; + } + + // persistent storage of types strings: they are not changed like maps on resize + static NCollection_List THE_TYPES_STORAGE; + THE_TYPES_STORAGE.Append(aTypeName); + TDF_DerivedAttributeGlobals::Types().Bind (aDerivedDynamicType, &(THE_TYPES_STORAGE.Last())); + TDF_DerivedAttributeGlobals::Attributes().Bind (aDerivedDynamicType, aDerived); + } + TDF_DerivedAttributeGlobals::Creators().Clear(); + } +} + +//======================================================================= +// function : Attribute +// purpose : +//======================================================================= +Handle(TDF_Attribute) TDF_DerivedAttribute::Attribute (Standard_CString theType) +{ + Standard_Mutex::Sentry aSentry (TDF_DerivedAttributeGlobals::Mutex()); + Initialize(); + if (const Handle(TDF_Attribute)* aResult = TDF_DerivedAttributeGlobals::Attributes().Seek (theType)) + { + return *aResult; + } + + static const Handle(TDF_Attribute) aNullAttrib; + return aNullAttrib; +} + +//======================================================================= +// function : TypeName +// purpose : +//======================================================================= +const TCollection_AsciiString& TDF_DerivedAttribute::TypeName (Standard_CString theType) +{ + Standard_Mutex::Sentry aSentry (TDF_DerivedAttributeGlobals::Mutex()); + Initialize(); + if (TCollection_AsciiString *const* aResult = TDF_DerivedAttributeGlobals::Types().Seek (theType)) + { + return **aResult; + } + + static const TCollection_AsciiString anEmpty; + return anEmpty; +} + +//======================================================================= +// function : Attributes +// purpose : +//======================================================================= +void TDF_DerivedAttribute::Attributes (NCollection_List& theList) +{ + Standard_Mutex::Sentry aSentry (TDF_DerivedAttributeGlobals::Mutex()); + Initialize(); + NCollection_DataMap::Iterator anAttrIter; + for (anAttrIter.Initialize (TDF_DerivedAttributeGlobals::Attributes()); anAttrIter.More(); anAttrIter.Next()) + { + theList.Append (anAttrIter.Value()); + } +} diff --git a/src/TDF/TDF_DerivedAttribute.hxx b/src/TDF/TDF_DerivedAttribute.hxx new file mode 100644 index 0000000000..3bd8df1e4b --- /dev/null +++ b/src/TDF/TDF_DerivedAttribute.hxx @@ -0,0 +1,73 @@ +// Copyright (c) 2020 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 _TDF_DerivedAttribute_HeaderFile +#define _TDF_DerivedAttribute_HeaderFile + +#include +#include + +class TCollection_AsciiString; + +//! @def DEFINE_DERIVED_ATTRIBUTE +//! Defines declaration of Handle method and declares methods for serialization +//! of derived attribute +#define DEFINE_DERIVED_ATTRIBUTE(Class, Base) \ + DEFINE_STANDARD_RTTIEXT(Class, Base); \ + Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; + +//! @def IMPLEMENT_DERIVED_ATTRIBUTE +//! Defines implementation of Handle method, serialization methods and registers the derived attribute +#define IMPLEMENT_DERIVED_ATTRIBUTE(Class, Base) \ + IMPLEMENT_STANDARD_RTTIEXT(Class, Base) \ + static Handle(TDF_Attribute) TDF_DERIVED_New##Class() { return new Class(); } \ + static TDF_DerivedAttribute::NewDerived TDF_DERIVED_##Class( \ + TDF_DerivedAttribute::Register(TDF_DERIVED_New##Class)); \ + Handle(TDF_Attribute) Class::NewEmpty() const { return TDF_DERIVED_##Class(); } \ + + +//! @def IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE +//! Defines implementation of Handle method and registers the derived attribute +#define IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(Class, Base, NameSpace, TypeName) \ + IMPLEMENT_STANDARD_RTTIEXT(Class, Base) \ + static Handle(TDF_Attribute) TDF_DERIVED_New##Class() { return new Class(); } \ + static TDF_DerivedAttribute::NewDerived TDF_DERIVED_##Class( \ + TDF_DerivedAttribute::Register(TDF_DERIVED_New##Class, NameSpace, TypeName)); \ + Handle(TDF_Attribute) Class::NewEmpty() const { return TDF_DERIVED_##Class(); } \ + +//! Class provides global access (through static methods) to all derived attributres information. +//! It is used internally by macros for registration of derived attributes and driver-tables +//! for getting this data. +class TDF_DerivedAttribute +{ +public: + /// A function of derived attribute that returns a new attribute instance + typedef Handle(TDF_Attribute) (*NewDerived) (); + + //! Registers a derived by the pointer to a method that creates a new derived attribute instance + Standard_EXPORT static NewDerived Register (NewDerived theNewAttributeFunction, + Standard_CString theNameSpace = NULL, + Standard_CString theTypeName = NULL); + + //! Returns the derived registered attribute by its type. + Standard_EXPORT static Handle(TDF_Attribute) Attribute (Standard_CString theType); + + //! Returns the type name of the registered attribute by its type. + Standard_EXPORT static const TCollection_AsciiString& TypeName (Standard_CString theType); + + //! Returns all the derived registered attributes list. + Standard_EXPORT static void Attributes (NCollection_List& theList); + +}; + +#endif // _TDF_DerivedAttribute_HeaderFile diff --git a/src/TDataStd/FILES b/src/TDataStd/FILES index e4a26f6853..9e00969dee 100644 --- a/src/TDataStd/FILES +++ b/src/TDataStd/FILES @@ -14,6 +14,10 @@ TDataStd_Comment.cxx TDataStd_Comment.hxx TDataStd_Current.cxx TDataStd_Current.hxx +TDataStd_GenericEmpty.cxx +TDataStd_GenericEmpty.hxx +TDataStd_GenericExtString.cxx +TDataStd_GenericExtString.hxx TDataStd_DataMapIteratorOfDataMapOfStringByte.hxx TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfInteger.hxx TDataStd_DataMapIteratorOfDataMapOfStringHArray1OfReal.hxx diff --git a/src/TDataStd/TDataStd_Comment.cxx b/src/TDataStd/TDataStd_Comment.cxx index cc2d0f72c8..cfc36ab55a 100644 --- a/src/TDataStd/TDataStd_Comment.cxx +++ b/src/TDataStd/TDataStd_Comment.cxx @@ -17,23 +17,9 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include -IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Comment,TDF_Attribute) - -#define lid1 45 -#define lid2 36 +IMPLEMENT_DERIVED_ATTRIBUTE(TDataStd_Comment, TDataStd_GenericExtString) //======================================================================= //function : GetID @@ -46,8 +32,6 @@ const Standard_GUID& TDataStd_Comment::GetID () return TDataStd_CommentID; } - - //======================================================================= //function : Set //purpose : @@ -65,7 +49,6 @@ Handle(TDataStd_Comment) TDataStd_Comment::Set (const TDF_Label& L, return A; } - //======================================================================= //function : Set //purpose : @@ -81,78 +64,51 @@ Handle(TDataStd_Comment) TDataStd_Comment::Set (const TDF_Label& L) return A; } - //======================================================================= //function : TDataStd_Comment //purpose : //======================================================================= -TDataStd_Comment::TDataStd_Comment () { } - +TDataStd_Comment::TDataStd_Comment () { + myID = GetID(); +} //======================================================================= //function : Set -//purpose : +//purpose : //======================================================================= -void TDataStd_Comment::Set (const TCollection_ExtendedString& S) + +void TDataStd_Comment::Set (const TCollection_ExtendedString& S) { // OCC2932 correction if(myString == S) return; Backup(); - myString = S; } - - //======================================================================= -//function : Get -//purpose : -//======================================================================= -const TCollection_ExtendedString& TDataStd_Comment::Get () const -{ - return myString; -} - -//======================================================================= -//function : ID -//purpose : +//function : SetID +//purpose : //======================================================================= -const Standard_GUID& TDataStd_Comment::ID () const { return GetID(); } - - -//======================================================================= -//function : NewEmpty -//purpose : -//======================================================================= - -Handle(TDF_Attribute) TDataStd_Comment::NewEmpty () const +void TDataStd_Comment::SetID( const Standard_GUID& theGuid) { - return new TDataStd_Comment(); + if(myID == theGuid) return; + + Backup(); + myID = theGuid; } //======================================================================= -//function : Restore -//purpose : +//function : SetID +//purpose : sets default ID //======================================================================= -void TDataStd_Comment::Restore(const Handle(TDF_Attribute)& with) +void TDataStd_Comment::SetID() { - myString = Handle(TDataStd_Comment)::DownCast (with)->Get (); - return; -} - -//======================================================================= -//function : Paste -//purpose : -//======================================================================= - -void TDataStd_Comment::Paste (const Handle(TDF_Attribute)& into, - const Handle(TDF_RelocationTable)& /*RT*/) const -{ - Handle(TDataStd_Comment)::DownCast (into)->Set (myString); + Backup(); + myID = GetID(); } //======================================================================= @@ -163,24 +119,6 @@ void TDataStd_Comment::Paste (const Handle(TDF_Attribute)& into, Standard_OStream& TDataStd_Comment::Dump (Standard_OStream& anOS) const { TDF_Attribute::Dump(anOS); - anOS << "Comment=|"< -#include - -#include -#include -#include -#include -class Standard_GUID; -class TDF_Label; -class TCollection_ExtendedString; -class TDF_Attribute; -class TDF_RelocationTable; - +#include class TDataStd_Comment; -DEFINE_STANDARD_HANDLE(TDataStd_Comment, TDF_Attribute) +DEFINE_STANDARD_HANDLE(TDataStd_Comment, TDataStd_GenericExtString) //! Comment attribute. may be associated to any label //! to store user comment. -class TDataStd_Comment : public TDF_Attribute +class TDataStd_Comment : public TDataStd_GenericExtString { public: @@ -58,50 +46,19 @@ public: Standard_EXPORT static Handle(TDataStd_Comment) Set (const TDF_Label& label, const TCollection_ExtendedString& string); Standard_EXPORT TDataStd_Comment(); - - Standard_EXPORT void Set (const TCollection_ExtendedString& S); - - //! Returns the comment attribute. - Standard_EXPORT const TCollection_ExtendedString& Get() const; - - Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE; - - Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE; - - Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE; - - Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const Standard_OVERRIDE; - + Standard_EXPORT void Set (const TCollection_ExtendedString& S) Standard_OVERRIDE; + + //! Sets the explicit user defined GUID to the attribute. + Standard_EXPORT void SetID (const Standard_GUID& guid) Standard_OVERRIDE; + + //! Sets default GUID for the attribute. + Standard_EXPORT void SetID() Standard_OVERRIDE; + Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE; - Standard_EXPORT Standard_Boolean AfterRetrieval (const Standard_Boolean forceIt = Standard_False) Standard_OVERRIDE; - - //! Dumps the content of me into the stream - Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; - - - - - DEFINE_STANDARD_RTTIEXT(TDataStd_Comment,TDF_Attribute) - -protected: - - - - -private: - - - TCollection_ExtendedString myString; - + DEFINE_DERIVED_ATTRIBUTE(TDataStd_Comment, TDataStd_GenericExtString) }; - - - - - - #endif // _TDataStd_Comment_HeaderFile diff --git a/src/TDataStd/TDataStd_Directory.cxx b/src/TDataStd/TDataStd_Directory.cxx index b592f252d8..6746a4b1dc 100644 --- a/src/TDataStd/TDataStd_Directory.cxx +++ b/src/TDataStd/TDataStd_Directory.cxx @@ -21,13 +21,12 @@ #include #include #include -#include #include #include #include #include -IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Directory,TDF_Attribute) +IMPLEMENT_DERIVED_ATTRIBUTE(TDataStd_Directory,TDataStd_GenericEmpty) //======================================================================= //function : Find @@ -115,7 +114,6 @@ TDataStd_Directory::TDataStd_Directory() { } - //======================================================================= //function : ID //purpose : @@ -130,38 +128,10 @@ const Standard_GUID& TDataStd_Directory::ID() const //purpose : //======================================================================= -Handle(TDF_Attribute) TDataStd_Directory::NewEmpty () const -{ - return new TDataStd_Directory(); -} - -//======================================================================= -//function : Restore -//purpose : -//======================================================================= - -void TDataStd_Directory::Restore(const Handle(TDF_Attribute)&) -{ -} - -//======================================================================= -//function : Paste -//purpose : -//======================================================================= - -void TDataStd_Directory::Paste (const Handle(TDF_Attribute)&, - const Handle(TDF_RelocationTable)& ) const -{ -} - -//======================================================================= -//function : References -//purpose : -//======================================================================= - -void TDataStd_Directory::References (const Handle(TDF_DataSet)&) const -{ -} +//Handle(TDF_Attribute) TDataStd_Directory::NewEmpty () const +//{ +// return new TDataStd_Directory(); +//} //======================================================================= //function : Dump @@ -173,14 +143,3 @@ Standard_OStream& TDataStd_Directory::Dump (Standard_OStream& anOS) const anOS << "Directory"; return anOS; } - -//======================================================================= -//function : DumpJson -//purpose : -//======================================================================= -void TDataStd_Directory::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const -{ - OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream) - - OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute) -} diff --git a/src/TDataStd/TDataStd_Directory.hxx b/src/TDataStd/TDataStd_Directory.hxx index 726f974afa..82523c301b 100644 --- a/src/TDataStd/TDataStd_Directory.hxx +++ b/src/TDataStd/TDataStd_Directory.hxx @@ -20,7 +20,7 @@ #include #include -#include +#include #include #include class TDF_Label; @@ -31,13 +31,13 @@ class TDF_DataSet; class TDataStd_Directory; -DEFINE_STANDARD_HANDLE(TDataStd_Directory, TDF_Attribute) +DEFINE_STANDARD_HANDLE(TDataStd_Directory, TDataStd_GenericEmpty) //! Associates a directory in the data framework with //! a TDataStd_TagSource attribute. //! You can create a new directory label and add //! sub-directory or object labels to it, -class TDataStd_Directory : public TDF_Attribute +class TDataStd_Directory : public TDataStd_GenericEmpty { public: @@ -51,7 +51,7 @@ public: //! and the attribute found is set as D. Standard_EXPORT static Standard_Boolean Find (const TDF_Label& current, Handle(TDataStd_Directory)& D); - //! Creates an enpty Directory attribute, located at + //! Creates an empty Directory attribute, located at //!