Added possibility to inherit existing attributes if the same persistent fields are used. All methods that allow controlling the data model changes or getting some callbacks may be overridden in successor. They may have same GUIDs as a base class or new ones.
Special macros IMPLEMENT_DERIVED_ATTRIBUTE and IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE must be used instead of standard Handle macro definition IMPLEMENT_STANDARD_RTTIEXT to register new derived attributes.
Using this improvement several existing attributes from TDataStd, TDataXtd and XCAFDoc packages become inherited from other base attribute-classes. XML and Bin drivers of these attributes are removed. New base attribute classes are added: TDataStd_GenericEmpty and TDataStd_GenericExtString.
This improvement does not change both present formats Bin and XML documents. The obsolete Standard scheme is not changed at all.
#include <BinMDF_ADriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TDF_Attribute.hxx>
IMPLEMENT_STANDARD_RTTIEXT(BinMDF_ADriver,Standard_Transient)
{
if (theName)
myTypeName = theName;
-}
\ No newline at end of file
+}
+
+//=======================================================================
+//function : SourceType
+//purpose :
+//=======================================================================
+
+const Handle(Standard_Type)& BinMDF_ADriver::SourceType () const
+{
+ return NewEmpty() -> DynamicType();
+}
+
//! 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;
//! <aRelocTable> 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)
#include <TDF_Attribute.hxx>
-//=======================================================================
-//function : SourceType
-//purpose :
-//=======================================================================
-
-inline const Handle(Standard_Type)& BinMDF_ADriver::SourceType () const
-{
- return NewEmpty() -> DynamicType();
-}
-
//=======================================================================
//function : TypeName
//purpose :
#include <BinMDF_ADriver.hxx>
#include <BinMDF_ADriverTable.hxx>
#include <BinMDF_DataMapIteratorOfTypeADriverMap.hxx>
+#include <BinMDF_DerivedDriver.hxx>
#include <BinMDF_StringIdMap.hxx>
#include <Standard_NoSuchObject.hxx>
#include <Standard_Type.hxx>
#include <TCollection_HAsciiString.hxx>
+#include <TDF_DerivedAttribute.hxx>
IMPLEMENT_STANDARD_RTTIEXT(BinMDF_ADriverTable,Standard_Transient)
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.
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());
+ }
+ }
+ }
}
//! Adds a translation driver <theDriver>.
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.
//! Gets a driver <theDriver> according to <theType>.
//! 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 <theTypeId>.
//! 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);
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);
//=======================================================================
inline Handle(BinMDF_ADriver) BinMDF_ADriverTable::GetDriver
- (const Standard_Integer theTypeId) const
+ (const Standard_Integer theTypeId)
{
Handle(BinMDF_ADriver) aDriver;
if (myMapId.IsBound2(theTypeId)) {
--- /dev/null
+// 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 <BinMDF_DerivedDriver.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(BinMDF_DerivedDriver, BinMDF_ADriver)
--- /dev/null
+// 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 <BinMDF_ADriver.hxx>
+
+//! 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
BinMDF_TagSourceDriver.hxx
BinMDF_TypeADriverMap.hxx
BinMDF_TypeIdMap.hxx
+BinMDF_DerivedDriver.cxx
+BinMDF_DerivedDriver.hxx
#include <BinMDataStd_BooleanArrayDriver.hxx>
#include <BinMDataStd_BooleanListDriver.hxx>
#include <BinMDataStd_ByteArrayDriver.hxx>
-#include <BinMDataStd_CommentDriver.hxx>
-#include <BinMDataStd_DirectoryDriver.hxx>
#include <BinMDataStd_ExpressionDriver.hxx>
#include <BinMDataStd_ExtStringArrayDriver.hxx>
#include <BinMDataStd_ExtStringListDriver.hxx>
#include <BinMDataStd_IntegerListDriver.hxx>
#include <BinMDataStd_IntPackedMapDriver.hxx>
#include <BinMDataStd_NamedDataDriver.hxx>
-#include <BinMDataStd_NameDriver.hxx>
-#include <BinMDataStd_NoteBookDriver.hxx>
+#include <BinMDataStd_GenericExtStringDriver.hxx>
#include <BinMDataStd_RealArrayDriver.hxx>
#include <BinMDataStd_RealDriver.hxx>
#include <BinMDataStd_RealListDriver.hxx>
#include <BinMDataStd_ReferenceArrayDriver.hxx>
#include <BinMDataStd_ReferenceListDriver.hxx>
-#include <BinMDataStd_RelationDriver.hxx>
-#include <BinMDataStd_TickDriver.hxx>
+#include <BinMDataStd_GenericEmptyDriver.hxx>
#include <BinMDataStd_TreeNodeDriver.hxx>
#include <BinMDataStd_UAttributeDriver.hxx>
#include <BinMDataStd_VariableDriver.hxx>
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) );
}
-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;
+++ /dev/null
-// 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 <BinMDataStd_CommentDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_Comment.hxx>
-#include <TDF_Attribute.hxx>
-
-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;
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMDataStd_DirectoryDriver.hxx>
-#include <BinMDF_ADriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_Directory.hxx>
-#include <TDF_Attribute.hxx>
-
-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
-{}
-
-
-
+++ /dev/null
-// Created on: 2004-05-13
-// Created by: Sergey ZARITCHNY <szy@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
--- /dev/null
+// 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 <BinMDataStd_GenericEmptyDriver.hxx>
+#include <BinMDF_ADriver.hxx>
+#include <BinObjMgt_Persistent.hxx>
+#include <BinObjMgt_RRelocationTable.hxx>
+#include <BinObjMgt_SRelocationTable.hxx>
+#include <Message_Messenger.hxx>
+#include <Standard_Type.hxx>
+#include <TDataStd_GenericEmpty.hxx>
+#include <TDF_Attribute.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_GenericEmptyDriver,BinMDF_ADriver)
+
+//=======================================================================
+//function : BinMDataStd_GenericEmptyDriver
+//purpose :
+//=======================================================================
+BinMDataStd_GenericEmptyDriver::BinMDataStd_GenericEmptyDriver(const Handle(Message_Messenger)& theMsgDriver)
+: BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataStd_GenericEmpty)->Name())
+{}
+
+//=======================================================================
+//function : NewEmpty
+//purpose :
+//=======================================================================
+Handle(TDF_Attribute) BinMDataStd_GenericEmptyDriver::NewEmpty() const
+{
+ 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<TDataStd_GenericEmpty>();
+}
+
+//=======================================================================
+//function : Paste
+//purpose : persistent -> transient (retrieve)
+//=======================================================================
+Standard_Boolean BinMDataStd_GenericEmptyDriver::Paste(const BinObjMgt_Persistent&,
+ const Handle(TDF_Attribute)&,
+ BinObjMgt_RRelocationTable& ) const
+{
+ return Standard_True;
+}
+
+//=======================================================================
+//function : Paste
+//purpose : transient -> persistent (store)
+//=======================================================================
+void BinMDataStd_GenericEmptyDriver::Paste(const Handle(TDF_Attribute)&,
+ BinObjMgt_Persistent&,
+ BinObjMgt_SRelocationTable& ) const
+{
+}
--- /dev/null
+// 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 _BinMDataStd_GenericEmptyDriver_HeaderFile
+#define _BinMDataStd_GenericEmptyDriver_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <BinMDF_ADriver.hxx>
+#include <Standard_Boolean.hxx>
+#include <BinObjMgt_RRelocationTable.hxx>
+#include <BinObjMgt_SRelocationTable.hxx>
+class Message_Messenger;
+class TDF_Attribute;
+class BinObjMgt_Persistent;
+
+
+class BinMDataStd_GenericEmptyDriver;
+DEFINE_STANDARD_HANDLE(BinMDataStd_GenericEmptyDriver, BinMDF_ADriver)
+
+//! GenericEmpty attribute driver.
+class BinMDataStd_GenericEmptyDriver : public BinMDF_ADriver
+{
+
+public:
+
+
+ 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;
+
+ Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
+
+
+
+
+ DEFINE_STANDARD_RTTIEXT(BinMDataStd_GenericEmptyDriver,BinMDF_ADriver)
+
+protected:
+
+
+
+
+private:
+
+
+
+
+};
+
+
+
+
+
+
+
+#endif // _BinMDataStd_GenericEmptyDriver_HeaderFile
--- /dev/null
+// 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 <BinMDataStd_GenericExtStringDriver.hxx>
+#include <BinObjMgt_Persistent.hxx>
+#include <Message_Messenger.hxx>
+#include <Standard_Type.hxx>
+#include <TDataStd_Name.hxx>
+#include <TDF_Attribute.hxx>
+#include <BinMDataStd.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_GenericExtStringDriver,BinMDF_ADriver)
+
+//=======================================================================
+//function : BinMDataStd_GenericExtStringDriver
+//purpose :
+//=======================================================================
+BinMDataStd_GenericExtStringDriver::BinMDataStd_GenericExtStringDriver
+ (const Handle(Message_Messenger)& theMessageDriver)
+ : BinMDF_ADriver (theMessageDriver, STANDARD_TYPE(TDataStd_GenericExtString)->Name())
+{
+}
+
+//=======================================================================
+//function : NewEmpty
+//purpose :
+//=======================================================================
+
+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<TDataStd_GenericExtString>();
+ return aSourceType;
+}
+
+//=======================================================================
+//function : Paste
+//purpose : persistent -> transient (retrieve)
+//=======================================================================
+
+Standard_Boolean BinMDataStd_GenericExtStringDriver::Paste
+ (const BinObjMgt_Persistent& Source,
+ const Handle(TDF_Attribute)& Target,
+ BinObjMgt_RRelocationTable& RelocTable) const
+{
+ Handle(TDataStd_GenericExtString) aStrAttr = Handle(TDataStd_GenericExtString)::DownCast(Target);
+ TCollection_ExtendedString aStr;
+ Standard_Boolean ok = Source >> aStr;
+ if (ok)
+ 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);
+ ok = Standard_True;
+ } else {
+ aStrAttr->SetID(aGuid);
+ }
+ }
+ return ok;
+}
+
+//=======================================================================
+//function : Paste
+//purpose : transient -> persistent (store)
+//=======================================================================
+
+void BinMDataStd_GenericExtStringDriver::Paste
+ (const Handle(TDF_Attribute)& Source,
+ BinObjMgt_Persistent& Target,
+ BinObjMgt_SRelocationTable& /*RelocTable*/) const
+{
+ Handle(TDataStd_GenericExtString) aStrAttr = Handle(TDataStd_GenericExtString)::DownCast(Source);
+ Target << aStrAttr->Get();
+ // process user defined guid
+ Target << aStrAttr->ID();
+}
--- /dev/null
+// 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 _BinMDataStd_GenericExtStringDriver_HeaderFile
+#define _BinMDataStd_GenericExtStringDriver_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <BinMDF_ADriver.hxx>
+#include <Standard_Boolean.hxx>
+#include <BinObjMgt_RRelocationTable.hxx>
+#include <BinObjMgt_SRelocationTable.hxx>
+class Message_Messenger;
+class TDF_Attribute;
+class BinObjMgt_Persistent;
+
+
+class BinMDataStd_GenericExtStringDriver;
+DEFINE_STANDARD_HANDLE(BinMDataStd_GenericExtStringDriver, BinMDF_ADriver)
+
+//! TDataStd_Name attribute Driver.
+class BinMDataStd_GenericExtStringDriver : public BinMDF_ADriver
+{
+
+public:
+
+
+ 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;
+
+ //! transient -> persistent (store)
+ Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
+
+
+
+
+ DEFINE_STANDARD_RTTIEXT(BinMDataStd_GenericExtStringDriver,BinMDF_ADriver)
+
+protected:
+
+
+
+
+private:
+
+
+
+
+};
+
+
+
+
+
+
+
+#endif // _BinMDataStd_GenericExtStringDriver_HeaderFile
ok = theSource >> aGuid;
if (!ok) {
theSource.SetPosition(aPos);
- anAtt->SetID(TDataStd_Integer::GetID());
ok = Standard_True;
} else {
anAtt->SetID(aGuid);
+++ /dev/null
-// Created on: 2002-11-19
-// Created by: Edward AGAPOV (eap)
-// Copyright (c) 2002-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 <BinMDataStd_NameDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_Name.hxx>
-#include <TDF_Attribute.hxx>
-#include <BinMDataStd.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_NameDriver,BinMDF_ADriver)
-
-//=======================================================================
-//function : BinMDataStd_NameDriver
-//purpose :
-//=======================================================================
-BinMDataStd_NameDriver::BinMDataStd_NameDriver
- (const Handle(Message_Messenger)& theMessageDriver)
- : BinMDF_ADriver (theMessageDriver, STANDARD_TYPE(TDataStd_Name)->Name())
-{
-}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) BinMDataStd_NameDriver::NewEmpty() const
-{
- return new TDataStd_Name;
-}
-
-//=======================================================================
-//function : Paste
-//purpose : persistent -> transient (retrieve)
-//=======================================================================
-
-Standard_Boolean BinMDataStd_NameDriver::Paste
- (const BinObjMgt_Persistent& Source,
- const Handle(TDF_Attribute)& Target,
- BinObjMgt_RRelocationTable& RelocTable) const
-{
- Handle(TDataStd_Name) aName = Handle(TDataStd_Name)::DownCast(Target);
- TCollection_ExtendedString aStr;
- Standard_Boolean ok = Source >> aStr;
- if (ok)
- aName->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);
- }
- } else
- aName->SetID(TDataStd_Name::GetID());
- return ok;
-}
-
-//=======================================================================
-//function : Paste
-//purpose : transient -> persistent (store)
-//=======================================================================
-
-void BinMDataStd_NameDriver::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();
- // process user defined guid
- if(aName->ID() != TDataStd_Name::GetID())
- Target << aName->ID();
-}
+++ /dev/null
-// Created on: 2002-11-19
-// Created by: Edward AGAPOV
-// Copyright (c) 2002-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_NameDriver_HeaderFile
-#define _BinMDataStd_NameDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class BinObjMgt_Persistent;
-
-
-class BinMDataStd_NameDriver;
-DEFINE_STANDARD_HANDLE(BinMDataStd_NameDriver, BinMDF_ADriver)
-
-//! TDataStd_Name attribute Driver.
-class BinMDataStd_NameDriver : public BinMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT BinMDataStd_NameDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() 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;
-
- //! transient -> persistent (store)
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(BinMDataStd_NameDriver,BinMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _BinMDataStd_NameDriver_HeaderFile
+++ /dev/null
-// 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 <BinMDataStd_NoteBookDriver.hxx>
-#include <BinMDF_ADriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_NoteBook.hxx>
-#include <TDF_Attribute.hxx>
-
-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
-{}
-
-
+++ /dev/null
-// Created on: 2004-05-13
-// Created by: Sergey ZARITCHNY <szy@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMDataStd_RelationDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_Relation.hxx>
-#include <TDataStd_Variable.hxx>
-#include <TDF_Attribute.hxx>
-#include <TDF_ListIteratorOfAttributeList.hxx>
-
-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;
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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.
-
-
-#include <BinMDataStd_TickDriver.hxx>
-#include <BinMDF_ADriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_Tick.hxx>
-#include <TDF_Attribute.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(BinMDataStd_TickDriver,BinMDF_ADriver)
-
-//=======================================================================
-//function : BinMDataStd_TickDriver
-//purpose :
-//=======================================================================
-BinMDataStd_TickDriver::BinMDataStd_TickDriver(const Handle(Message_Messenger)& theMsgDriver)
-: BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataStd_Tick)->Name())
-{
-}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) BinMDataStd_TickDriver::NewEmpty() const
-{
- return new TDataStd_Tick();
-}
-
-//=======================================================================
-//function : Paste
-//purpose : persistent -> transient (retrieve)
-//=======================================================================
-Standard_Boolean BinMDataStd_TickDriver::Paste(const BinObjMgt_Persistent&,
- const Handle(TDF_Attribute)&,
- BinObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose : transient -> persistent (store)
-//=======================================================================
-void BinMDataStd_TickDriver::Paste(const Handle(TDF_Attribute)&,
- BinObjMgt_Persistent&,
- BinObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
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
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
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
// modified 13.04.2009 Sergey Zaritchny
#include <BinMDataXtd.hxx>
-#include <BinMDataXtd_AxisDriver.hxx>
#include <BinMDataXtd_ConstraintDriver.hxx>
#include <BinMDataXtd_GeometryDriver.hxx>
#include <BinMDataXtd_PatternStdDriver.hxx>
-#include <BinMDataXtd_PlacementDriver.hxx>
-#include <BinMDataXtd_PlaneDriver.hxx>
-#include <BinMDataXtd_PointDriver.hxx>
-#include <BinMDataXtd_ShapeDriver.hxx>
#include <BinMDF_ADriverTable.hxx>
#include <Message_Messenger.hxx>
#include <BinMDataXtd_PresentationDriver.hxx>
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) );
#include <Standard_Integer.hxx>
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.
-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;
};
+++ /dev/null
-// 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 <BinMDataXtd_AxisDriver.hxx>
-#include <BinMDF_ADriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataXtd_Axis.hxx>
-#include <TDF_Attribute.hxx>
-
-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
-{}
-
+++ /dev/null
-// Created on: 2004-05-13
-// Created by: Sergey ZARITCHNY <szy@opencascade.com>
-// 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_AxisDriver_HeaderFile
-#define _BinMDataXtd_AxisDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class BinObjMgt_Persistent;
-
-
-class BinMDataXtd_AxisDriver;
-DEFINE_STANDARD_HANDLE(BinMDataXtd_AxisDriver, BinMDF_ADriver)
-
-//! Axis attribute Driver.
-class BinMDataXtd_AxisDriver : public BinMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT BinMDataXtd_AxisDriver(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_AxisDriver,BinMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _BinMDataXtd_AxisDriver_HeaderFile
+++ /dev/null
-// 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 <BinMDataXtd_PlacementDriver.hxx>
-#include <BinMDF_ADriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataXtd_Placement.hxx>
-#include <TDF_Attribute.hxx>
-
-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
-{}
-
-
+++ /dev/null
-// Created on: 2004-05-13
-// Created by: Sergey ZARITCHNY <szy@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMDataXtd_PlaneDriver.hxx>
-#include <BinMDF_ADriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataXtd_Plane.hxx>
-#include <TDF_Attribute.hxx>
-
-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
-{}
-
+++ /dev/null
-// Created on: 2004-05-13
-// Created by: Sergey ZARITCHNY <szy@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMDataXtd_PointDriver.hxx>
-#include <BinMDF_ADriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataXtd_Point.hxx>
-#include <TDF_Attribute.hxx>
-
-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
-{}
-
-
+++ /dev/null
-// Created on: 2004-05-13
-// Created by: Sergey ZARITCHNY <szy@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMDataXtd_ShapeDriver.hxx>
-#include <BinMDF_ADriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataXtd_Shape.hxx>
-#include <TDF_Attribute.hxx>
-
-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
-{}
+++ /dev/null
-// Created on: 2004-05-13
-// Created by: Sergey ZARITCHNY <szy@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
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
#include <BinMNaming_NamedShapeDriver.hxx>
#include <BinMXCAFDoc.hxx>
#include <BinMXCAFDoc_AssemblyItemRefDriver.hxx>
-#include <BinMXCAFDoc_AreaDriver.hxx>
#include <BinMXCAFDoc_CentroidDriver.hxx>
#include <BinMXCAFDoc_ColorDriver.hxx>
-#include <BinMXCAFDoc_ColorToolDriver.hxx>
#include <BinMXCAFDoc_DatumDriver.hxx>
-#include <BinMXCAFDoc_GeomToleranceDriver.hxx>
-#include <BinMXCAFDoc_DimensionDriver.hxx>
#include <BinMXCAFDoc_DimTolDriver.hxx>
-#include <BinMXCAFDoc_DimTolToolDriver.hxx>
-#include <BinMXCAFDoc_DocumentToolDriver.hxx>
#include <BinMXCAFDoc_GraphNodeDriver.hxx>
-#include <BinMXCAFDoc_LayerToolDriver.hxx>
#include <BinMXCAFDoc_LocationDriver.hxx>
#include <BinMXCAFDoc_MaterialDriver.hxx>
-#include <BinMXCAFDoc_MaterialToolDriver.hxx>
#include <BinMXCAFDoc_NoteDriver.hxx>
-#include <BinMXCAFDoc_NoteBalloonDriver.hxx>
#include <BinMXCAFDoc_NoteBinDataDriver.hxx>
#include <BinMXCAFDoc_NoteCommentDriver.hxx>
-#include <BinMXCAFDoc_NotesToolDriver.hxx>
-#include <BinMXCAFDoc_ShapeToolDriver.hxx>
-#include <BinMXCAFDoc_ViewDriver.hxx>
-#include <BinMXCAFDoc_ViewToolDriver.hxx>
#include <BinMXCAFDoc_VisMaterialDriver.hxx>
#include <BinMXCAFDoc_VisMaterialToolDriver.hxx>
-#include <BinMXCAFDoc_VolumeDriver.hxx>
#include <Message_Messenger.hxx>
#include <TNaming_NamedShape.hxx>
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));
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));
}
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;
-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;
};
+++ /dev/null
-// 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 <BinMXCAFDoc_AreaDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_Area.hxx>
-
-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();
-}
-
+++ /dev/null
-// Created on: 2005-05-17
-// Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_ClippingPlaneToolDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_ClippingPlaneTool.hxx>
-
-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 {
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_ColorToolDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_ColorTool.hxx>
-
-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 {
-}
-
+++ /dev/null
-// Created on: 2005-05-17
-// Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_DimTolToolDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_DimTolTool.hxx>
-
-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 {
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_DimensionDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TCollection_HAsciiString.hxx>
-#include <TColStd_Array1OfReal.hxx>
-#include <TColStd_HArray1OfReal.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_Dimension.hxx>
-
-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);
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_DocumentToolDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_DocumentTool.hxx>
-
-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
-{
-}
+++ /dev/null
-// Created on: 2005-05-17
-// Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_GeomToleranceDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TCollection_HAsciiString.hxx>
-#include <TColStd_Array1OfReal.hxx>
-#include <TColStd_HArray1OfReal.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_GeomTolerance.hxx>
-
-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);
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_LayerToolDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_LayerTool.hxx>
-
-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
-{
-}
-
+++ /dev/null
-// Created on: 2005-05-17
-// Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_MaterialToolDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_MaterialTool.hxx>
-
-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 {
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <BinMXCAFDoc_NoteBalloonDriver.hxx>
-#include <XCAFDoc_NoteBalloon.hxx>
-
-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)
-{
-
-}
+++ /dev/null
-// 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 <BinMXCAFDoc_NoteCommentDriver.hxx>
-
-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
+++ /dev/null
-// 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 <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <BinMXCAFDoc_NotesToolDriver.hxx>
-#include <XCAFDoc_NotesTool.hxx>
-
-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
-{
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_ShapeToolDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_ShapeTool.hxx>
-
-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
-{
-}
-
+++ /dev/null
-// Created on: 2005-05-17
-// Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_ViewDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_View.hxx>
-
-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
-{
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_ViewToolDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_ViewTool.hxx>
-
-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 {
-}
+++ /dev/null
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
+++ /dev/null
-// 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 <BinMXCAFDoc_VolumeDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_Volume.hxx>
-
-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();
-}
-
+++ /dev/null
-// Created on: 2005-05-17
-// Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
-// 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 <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-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
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
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
#include <TDF_Tool.hxx>
+#include <TDF_DerivedAttribute.hxx>
//=======================================================================
//function : Children
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 '"<<a[3]<<"'\n";
+ return 1;
+ }
+
+ lab.AddAttribute(anAttrByType);
+
+ return 0;
+}
+
//=======================================================================
//function : ForgetAll
//=======================================================================
//function : ForgetAttribute
-//purpose : "ForgetAtt dfname Label guid"
+//purpose : "ForgetAtt dfname Label guid_or_type"
//=======================================================================
static Standard_Integer DDF_ForgetAttribute(Draw_Interpretor& di,
if (aLabel.IsNull()) return 1;
if (!Standard_GUID::CheckGUIDFormat(a[3]))
{
+ // check this may be derived attribute by its type
+ Handle(TDF_Attribute) anAttrByType = TDF_DerivedAttribute::Attribute(a[3]);
+ if (!anAttrByType.IsNull()) {
+ aLabel.ForgetAttribute(anAttrByType->ID());
+ return 0;
+ }
di<<"DDF: The format of GUID is invalid\n";
return 1;
}
" 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",
TDF_DeltaOnRemoval.hxx
TDF_DeltaOnResume.cxx
TDF_DeltaOnResume.hxx
+TDF_DerivedAttribute.cxx
+TDF_DerivedAttribute.hxx
TDF_DoubleMapIteratorOfAttributeDoubleMap.hxx
TDF_DoubleMapIteratorOfGUIDProgIDMap.hxx
TDF_DoubleMapIteratorOfLabelDoubleMap.hxx
--- /dev/null
+// 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 <TDF_DerivedAttribute.hxx>
+
+#include <NCollection_DataMap.hxx>
+#include <Standard_Mutex.hxx>
+#include <TCollection_AsciiString.hxx>
+
+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<CreatorData>& Creators()
+ {
+ static NCollection_List<CreatorData> THE_CREATORS_LIST;
+ return THE_CREATORS_LIST;
+ }
+ //! Global map of the string-type of derived attribute -> instance of such attribute
+ static NCollection_DataMap<Standard_CString, Handle(TDF_Attribute)>& Attributes()
+ {
+ static NCollection_DataMap<Standard_CString, Handle(TDF_Attribute)> THE_DERIVED;
+ return THE_DERIVED;
+ }
+
+ //! Global map of the string-type of derived attribute -> type name to identify this attribute
+ static NCollection_DataMap<Standard_CString, TCollection_AsciiString*>& Types()
+ {
+ static NCollection_DataMap<Standard_CString, TCollection_AsciiString*> 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<TDF_DerivedAttributeGlobals::CreatorData>::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<TCollection_AsciiString> 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<Handle(TDF_Attribute)>& theList)
+{
+ Standard_Mutex::Sentry aSentry (TDF_DerivedAttributeGlobals::Mutex());
+ Initialize();
+ NCollection_DataMap<Standard_CString, Handle(TDF_Attribute)>::Iterator anAttrIter;
+ for (anAttrIter.Initialize (TDF_DerivedAttributeGlobals::Attributes()); anAttrIter.More(); anAttrIter.Next())
+ {
+ theList.Append (anAttrIter.Value());
+ }
+}
--- /dev/null
+// 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 <NCollection_List.hxx>
+#include <TDF_Attribute.hxx>
+
+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<Handle(TDF_Attribute)>& theList);
+
+};
+
+#endif // _TDF_DerivedAttribute_HeaderFile
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
#include <TDataStd_Comment.hxx>
#include <Standard_Dump.hxx>
-#include <Standard_GUID.hxx>
-#include <Standard_Type.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TDataStd_Integer.hxx>
-#include <TDataStd_Real.hxx>
-#include <TDF_Attribute.hxx>
-#include <TDF_ChildIDIterator.hxx>
-#include <TDF_ChildIterator.hxx>
#include <TDF_Label.hxx>
-#include <TDF_RelocationTable.hxx>
-#include <TDF_Tool.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Comment,TDF_Attribute)
-
-#define lid1 45
-#define lid2 36
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataStd_Comment, TDataStd_GenericExtString)
//=======================================================================
//function : GetID
return TDataStd_CommentID;
}
-
-
//=======================================================================
//function : Set
//purpose :
return A;
}
-
//=======================================================================
//function : Set
//purpose :
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 :
-//=======================================================================
-
-const Standard_GUID& TDataStd_Comment::ID () const { return GetID(); }
-
-
//=======================================================================
-//function : NewEmpty
-//purpose :
+//function : SetID
+//purpose :
//=======================================================================
-Handle(TDF_Attribute) TDataStd_Comment::NewEmpty () const
+void TDataStd_Comment::SetID( const Standard_GUID& theGuid)
{
- return new TDataStd_Comment();
-}
+ if(myID == theGuid) return;
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void TDataStd_Comment::Restore(const Handle(TDF_Attribute)& with)
-{
- myString = Handle(TDataStd_Comment)::DownCast (with)->Get ();
- return;
+ Backup();
+ myID = theGuid;
}
//=======================================================================
-//function : Paste
-//purpose :
+//function : SetID
+//purpose : sets default ID
//=======================================================================
-void TDataStd_Comment::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)& /*RT*/) const
+void TDataStd_Comment::SetID()
{
- Handle(TDataStd_Comment)::DownCast (into)->Set (myString);
+ Backup();
+ myID = GetID();
}
//=======================================================================
Standard_OStream& TDataStd_Comment::Dump (Standard_OStream& anOS) const
{
TDF_Attribute::Dump(anOS);
- anOS << "Comment=|"<<myString<<"|";
+ anOS << "Comment=|"<<Get()<<"|";
return anOS;
}
-Standard_Boolean TDataStd_Comment::
-AfterRetrieval(const Standard_Boolean)
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void TDataStd_Comment::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-
- OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myString)
-}
#ifndef _TDataStd_Comment_HeaderFile
#define _TDataStd_Comment_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TCollection_ExtendedString.hxx>
-#include <TDF_Attribute.hxx>
-#include <Standard_OStream.hxx>
-#include <Standard_Boolean.hxx>
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
+#include <TDataStd_GenericExtString.hxx>
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:
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 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;
-
-
+ Standard_EXPORT void Set (const TCollection_ExtendedString& S) Standard_OVERRIDE;
- DEFINE_STANDARD_RTTIEXT(TDataStd_Comment,TDF_Attribute)
+ //! Sets the explicit user defined GUID to the attribute.
+ Standard_EXPORT void SetID (const Standard_GUID& guid) Standard_OVERRIDE;
-protected:
-
-
-
-
-private:
-
-
- TCollection_ExtendedString myString;
+ //! Sets default GUID for the attribute.
+ Standard_EXPORT void SetID() Standard_OVERRIDE;
+ Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
+
+ DEFINE_DERIVED_ATTRIBUTE(TDataStd_Comment, TDataStd_GenericExtString)
};
-
-
-
-
-
-
#endif // _TDataStd_Comment_HeaderFile
#include <Standard_GUID.hxx>
#include <Standard_Type.hxx>
#include <TDataStd.hxx>
-#include <TDF_Attribute.hxx>
#include <TDF_DataSet.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
#include <TDF_TagSource.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Directory,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataStd_Directory,TDataStd_GenericEmpty)
//=======================================================================
//function : Find
{
}
-
//=======================================================================
//function : ID
//purpose :
//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
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)
-}
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_OStream.hxx>
class TDF_Label;
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:
//! 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
//! <label>. Raises if <label> has attribute
Standard_EXPORT static Handle(TDataStd_Directory) New (const TDF_Label& label);
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 virtual void References (const Handle(TDF_DataSet)& DS) const Standard_OVERRIDE;
-
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const 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_Directory,TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(TDataStd_Directory,TDataStd_GenericEmpty)
protected:
myExpression = EXPR->GetExpression();
Handle(TDataStd_Variable) V;
+ myVariables.Clear();
for (TDF_ListIteratorOfAttributeList it (EXPR->GetVariables()); it.More(); it.Next()) {
V = Handle(TDataStd_Variable)::DownCast(it.Value());
myVariables.Append(V);
#include <TCollection_ExtendedString.hxx>
#include <TDF_AttributeList.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDF_DerivedAttribute.hxx>
#include <Standard_OStream.hxx>
class Standard_GUID;
class TDF_Label;
Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE;
-
-
DEFINE_STANDARD_RTTIEXT(TDataStd_Expression,TDF_Attribute)
protected:
-
-
-
-private:
-
-
TCollection_ExtendedString myExpression;
TDF_AttributeList myVariables;
-
-
};
--- /dev/null
+// 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 <TDataStd_GenericEmpty.hxx>
+#include <Standard_Dump.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(TDataStd_GenericEmpty,TDF_Attribute)
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void TDataStd_GenericEmpty::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+}
--- /dev/null
+// 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 _TDataStd_GenericEmpty_HeaderFile
+#define _TDataStd_GenericEmpty_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <TDF_DerivedAttribute.hxx>
+
+class Standard_GUID;
+class TDF_Label;
+class TDF_Attribute;
+class TDF_RelocationTable;
+
+class TDataStd_GenericEmpty;
+DEFINE_STANDARD_HANDLE(TDataStd_GenericEmpty, TDF_Attribute)
+
+//! An ancestor attibute for all attributes which have no fields.
+//! If an attribute inherits this one it should not have drivers for persistence.
+class TDataStd_GenericEmpty : public TDF_Attribute
+{
+
+public:
+
+ Standard_EXPORT void Restore (const Handle(TDF_Attribute)&) Standard_OVERRIDE {};
+
+ Standard_EXPORT void Paste (const Handle(TDF_Attribute)&, const Handle(TDF_RelocationTable)&) const 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_GenericEmpty,TDF_Attribute)
+
+};
+
+#endif // _TDataStd_GenericEmpty_HeaderFile
--- /dev/null
+// 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 <TDataStd_GenericExtString.hxx>
+#include <Standard_Dump.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(TDataStd_GenericExtString,TDF_Attribute)
+
+//=======================================================================
+//function : Set
+//purpose :
+//=======================================================================
+void TDataStd_GenericExtString::Set (const TCollection_ExtendedString& S)
+{
+ if(myString == S) return;
+
+ Backup();
+ myString = S;
+}
+
+//=======================================================================
+//function : Get
+//purpose :
+//=======================================================================
+const TCollection_ExtendedString& TDataStd_GenericExtString::Get () const
+{
+ return myString;
+}
+
+//=======================================================================
+//function : SetID
+//purpose :
+//=======================================================================
+void TDataStd_GenericExtString::SetID( const Standard_GUID& theGuid)
+{
+ if(myID == theGuid) return;
+
+ Backup();
+ myID = theGuid;
+}
+
+//=======================================================================
+//function : ID
+//purpose :
+//=======================================================================
+const Standard_GUID& TDataStd_GenericExtString::ID () const { return myID; }
+
+//=======================================================================
+//function : Restore
+//purpose :
+//=======================================================================
+void TDataStd_GenericExtString::Restore(const Handle(TDF_Attribute)& with)
+{
+ Handle(TDataStd_GenericExtString) anAtt = Handle(TDataStd_GenericExtString)::DownCast (with);
+ myString = anAtt->Get();
+ myID = anAtt->ID();
+}
+
+//=======================================================================
+//function : Paste
+//purpose :
+//=======================================================================
+void TDataStd_GenericExtString::Paste (const Handle(TDF_Attribute)& into,
+ const Handle(TDF_RelocationTable)&/* RT*/) const
+{
+ Handle(TDataStd_GenericExtString) anAtt = Handle(TDataStd_GenericExtString)::DownCast (into);
+ anAtt->Set(myString);
+ anAtt->SetID(myID);
+}
+
+//=======================================================================
+//function : DumpJson
+//purpose :
+//=======================================================================
+void TDataStd_GenericExtString::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
+{
+ OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
+ OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
+ OCCT_DUMP_FIELD_VALUE_STRING (theOStream, Get())
+ OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
+}
--- /dev/null
+// 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 _TDataStd_GenericExtString_HeaderFile
+#define _TDataStd_GenericExtString_HeaderFile
+
+#include <TDF_DerivedAttribute.hxx>
+#include <TCollection_ExtendedString.hxx>
+#include <Standard_GUID.hxx>
+
+class Standard_GUID;
+class TDF_Label;
+class TDF_RelocationTable;
+
+class TDataStd_GenericExtString;
+DEFINE_STANDARD_HANDLE(TDataStd_GenericExtString, TDF_Attribute)
+
+//! An ancestor attibute for all attributes which have TCollection_ExtendedString field.
+//! If an attribute inherits this one it should not have drivers for persistence.
+//! Also this attribute provides functionality to have on the same label same attributes with different IDs.
+class TDataStd_GenericExtString : public TDF_Attribute
+{
+
+public:
+
+ //! Sets <S> as name. Raises if <S> is not a valid name.
+ Standard_EXPORT virtual void Set (const TCollection_ExtendedString& S);
+
+ //! Sets the explicit user defined GUID to the attribute.
+ Standard_EXPORT void SetID (const Standard_GUID& guid) Standard_OVERRIDE;
+
+ //! Returns the name contained in this name attribute.
+ Standard_EXPORT virtual const TCollection_ExtendedString& Get() const;
+
+ //! Returns the ID of the attribute.
+ Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
+
+ Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
+
+ Standard_EXPORT void Paste (const Handle(TDF_Attribute)& into, const Handle(TDF_RelocationTable)& RT) const 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_GenericExtString,TDF_Attribute)
+
+protected:
+ //! A string field of the attribute, participated in persistence.
+ TCollection_ExtendedString myString;
+ //! A private GUID of the attribute.
+ Standard_GUID myID;
+
+};
+
+#endif // _TDataStd_GenericExtString_HeaderFile
// commercial license or contractual agreement.
#include <TDataStd_Name.hxx>
-
-#include <Standard_DomainError.hxx>
-#include <Standard_Dump.hxx>
-#include <Standard_GUID.hxx>
-#include <Standard_Type.hxx>
-#include <TCollection_AsciiString.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <TDF_Attribute.hxx>
-#include <TDF_ChildIterator.hxx>
#include <TDF_Label.hxx>
-#include <TDF_ListIteratorOfAttributeList.hxx>
-#include <TDF_RelocationTable.hxx>
-#include <TDF_Tool.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Name,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataStd_Name,TDataStd_GenericExtString)
//=======================================================================
//function : GetID
Handle(TDataStd_Name) N;
if (!label.FindAttribute(theGuid, N)) {
N = new TDataStd_Name ();
- N->SetID(theGuid);
+ N->SetID (theGuid);
label.AddAttribute(N);
}
N->Set (theString);
{
return SetAttr(label, theString, theGuid);
}
+
//=======================================================================
//function : TDataStd_Name
-//purpose : Empty Constructor
+//purpose :
//=======================================================================
-
-TDataStd_Name::TDataStd_Name () : myID(GetID())
-{}
+TDataStd_Name::TDataStd_Name()
+{
+ myID = GetID();
+}
//=======================================================================
//function : Set
myString = S;
}
-
-
-//=======================================================================
-//function : Get
-//purpose :
-//=======================================================================
-const TCollection_ExtendedString& TDataStd_Name::Get () const
-{
- return myString;
-}
-
//=======================================================================
//function : SetID
//purpose :
//=======================================================================
-
void TDataStd_Name::SetID( const Standard_GUID& theGuid)
{
if(myID == theGuid) return;
//function : SetID
//purpose : sets default ID
//=======================================================================
+
void TDataStd_Name::SetID()
{
Backup();
}
// TDF_Attribute methods
-//=======================================================================
-//function : ID
-//purpose :
-//=======================================================================
-
-const Standard_GUID& TDataStd_Name::ID () const { return myID; }
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) TDataStd_Name::NewEmpty () const
-{
- return new TDataStd_Name();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void TDataStd_Name::Restore(const Handle(TDF_Attribute)& with)
-{
- Handle(TDataStd_Name) anAtt = Handle(TDataStd_Name)::DownCast (with);
- myString = anAtt->Get();
- myID = anAtt->ID();
-}
-
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void TDataStd_Name::Paste (const Handle(TDF_Attribute)& into,
- const Handle(TDF_RelocationTable)&/* RT*/) const
-{
- Handle(TDataStd_Name) anAtt = Handle(TDataStd_Name)::DownCast (into);
- anAtt->Set (myString);
- anAtt->SetID(myID);
-}
-
//=======================================================================
//function : Dump
//purpose :
anOS << sguid << std::endl;
return anOS;
}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void TDataStd_Name::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-
- OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myString)
- OCCT_DUMP_FIELD_VALUE_GUID (theOStream, myID)
-}
#ifndef _TDataStd_Name_HeaderFile
#define _TDataStd_Name_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TCollection_ExtendedString.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericExtString.hxx>
#include <Standard_OStream.hxx>
-#include <Standard_GUID.hxx>
class Standard_DomainError;
class TDF_Label;
class TDataStd_Name;
-DEFINE_STANDARD_HANDLE(TDataStd_Name, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(TDataStd_Name, TDataStd_GenericExtString)
//! Used to define a name attribute containing a string which specifies the name.
-class TDataStd_Name : public TDF_Attribute
+class TDataStd_Name : public TDataStd_GenericExtString
{
public:
-
//! class methods working on the name itself
//! ========================================
//! The Name attribute is returned.
Standard_EXPORT static Handle(TDataStd_Name) Set (const TDF_Label& label, const Standard_GUID& guid,
const TCollection_ExtendedString& string);
+
Standard_EXPORT TDataStd_Name();
//! Sets <S> as name. Raises if <S> is not a valid name.
- Standard_EXPORT void Set (const TCollection_ExtendedString& S);
+ 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;
- //! Returns the name contained in this name 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 virtual Standard_OStream& Dump (Standard_OStream& anOS) const 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_Name,TDF_Attribute)
-
-protected:
-
-
-
-
-private:
-
- TCollection_ExtendedString myString;
- Standard_GUID myID;
+ DEFINE_DERIVED_ATTRIBUTE(TDataStd_Name, TDataStd_GenericExtString)
};
#include <Standard_Type.hxx>
#include <TDataStd_Integer.hxx>
#include <TDataStd_Real.hxx>
-#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
#include <TDF_TagSource.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataStd_NoteBook,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataStd_NoteBook,TDataStd_GenericEmpty)
//=======================================================================
//function : Find
{ return GetID(); }
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) TDataStd_NoteBook::NewEmpty () const
-{
- return new TDataStd_NoteBook();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void TDataStd_NoteBook::Restore(const Handle(TDF_Attribute)& )
-{
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void TDataStd_NoteBook::Paste (const Handle(TDF_Attribute)& ,
- const Handle(TDF_RelocationTable)& ) const
-{
-}
-
//=======================================================================
//function : Dump
//purpose :
anOS << "NoteBook";
return anOS;
}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void TDataStd_NoteBook::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-}
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
class TDataStd_NoteBook;
-DEFINE_STANDARD_HANDLE(TDataStd_NoteBook, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(TDataStd_NoteBook, TDataStd_GenericEmpty)
//! NoteBook Object attribute
-class TDataStd_NoteBook : public TDF_Attribute
+class TDataStd_NoteBook : public TDataStd_GenericEmpty
{
public:
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 virtual Standard_OStream& Dump (Standard_OStream& anOS) const 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_NoteBook,TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(TDataStd_NoteBook, TDataStd_GenericEmpty)
protected:
#include <Standard_Real.hxx>
#include <TDataStd_RealEnum.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDF_DerivedAttribute.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_OStream.hxx>
#include <Standard_GUID.hxx>
protected:
-
-
-
-private:
-
-
Standard_Real myValue;
//! An obsolete field that will be removed in next versions.
TDataStd_RealEnum myDimension;
Standard_GUID myID;
-
};
#include <TDF_ListIteratorOfAttributeList.hxx>
#include <TDF_RelocationTable.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Relation,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataStd_Relation,TDF_Attribute)
//=======================================================================
//function : GetID
{
}
-
-//=======================================================================
-//function : Name
-//purpose :
-//=======================================================================
-TCollection_ExtendedString TDataStd_Relation::Name () const
-{
- return myRelation; // ->String();
-}
-
//=======================================================================
//function : SetRelation
//purpose :
void TDataStd_Relation::SetRelation(const TCollection_ExtendedString& R)
{
- // OCC2932 correction
- if(myRelation == R) return;
-
- Backup();
- myRelation = R;
+ SetExpression(R);
}
//=======================================================================
const TCollection_ExtendedString& TDataStd_Relation::GetRelation() const
{
- return myRelation;
-}
-
-//=======================================================================
-//function : GetVariables
-//purpose :
-//=======================================================================
-
-TDF_AttributeList& TDataStd_Relation::GetVariables()
-{
- return myVariables;
+ return GetExpression();
}
//=======================================================================
return GetID();
}
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void TDataStd_Relation::Restore(const Handle(TDF_Attribute)& With)
-{
- Handle(TDataStd_Relation) REL = Handle(TDataStd_Relation)::DownCast (With);
- myRelation = REL->GetRelation();
- Handle(TDataStd_Variable) V;
- myVariables.Clear();
- for (TDF_ListIteratorOfAttributeList it (REL->GetVariables()); it.More(); it.Next()) {
- V = Handle(TDataStd_Variable)::DownCast(it.Value());
- myVariables.Append(V);
- }
-}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) TDataStd_Relation::NewEmpty() const
-{
- return new TDataStd_Relation();
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void TDataStd_Relation::Paste(const Handle(TDF_Attribute)& Into,
- const Handle(TDF_RelocationTable)& RT) const
-{
- Handle(TDataStd_Relation) REL = Handle(TDataStd_Relation)::DownCast (Into);
- REL->SetRelation(myRelation);
- Handle(TDataStd_Variable) V1;
- for (TDF_ListIteratorOfAttributeList it (myVariables); it.More(); it.Next()) {
- V1 = Handle(TDataStd_Variable)::DownCast(it.Value());
- Handle(TDF_Attribute) V2;
- RT->HasRelocation (V1,V2);
- REL->GetVariables().Append(V2);
- }
-}
-
//=======================================================================
//function : Dump
//purpose :
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
- OCCT_DUMP_FIELD_VALUE_STRING (theOStream, myRelation)
+ OCCT_DUMP_FIELD_VALUE_STRING (theOStream, GetRelation())
for (TDF_AttributeList::Iterator aVariableIt (myVariables); aVariableIt.More(); aVariableIt.Next())
{
const Handle(TDF_Attribute)& aVariable = aVariableIt.Value();
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, aVariable.get())
}
-}
+}
\ No newline at end of file
#ifndef _TDataStd_Relation_HeaderFile
#define _TDataStd_Relation_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TCollection_ExtendedString.hxx>
-#include <TDF_AttributeList.hxx>
-#include <TDF_Attribute.hxx>
-#include <Standard_OStream.hxx>
-class Standard_GUID;
-class TDF_Label;
-class TCollection_ExtendedString;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
+#include <TDataStd_Expression.hxx>
class TDataStd_Relation;
-DEFINE_STANDARD_HANDLE(TDataStd_Relation, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(TDataStd_Relation, TDataStd_Expression)
//! Relation attribute.
//! ==================
//!
//! Warning: To be consistent, each Variable referenced by the
//! relation must have its equivalent in the string
-class TDataStd_Relation : public TDF_Attribute
+class TDataStd_Relation : public TDataStd_Expression
{
public:
Standard_EXPORT TDataStd_Relation();
- //! build and return the relation name
- Standard_EXPORT TCollection_ExtendedString Name() const;
-
Standard_EXPORT void SetRelation (const TCollection_ExtendedString& E);
Standard_EXPORT const TCollection_ExtendedString& GetRelation() const;
- Standard_EXPORT TDF_AttributeList& GetVariables();
-
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 virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
-
- DEFINE_STANDARD_RTTIEXT(TDataStd_Relation,TDF_Attribute)
-
-protected:
-
-
-
-
-private:
-
-
- TCollection_ExtendedString myRelation;
- TDF_AttributeList myVariables;
-
-
+ DEFINE_DERIVED_ATTRIBUTE(TDataStd_Relation,TDataStd_Expression)
};
-
-
-
-
-
-
#endif // _TDataStd_Relation_HeaderFile
#include <TDataStd_Tick.hxx>
-#include <Standard_Dump.hxx>
-#include <Standard_GUID.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
#include <TDF_Label.hxx>
-#include <TDF_RelocationTable.hxx>
+#include <Standard_GUID.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataStd_Tick,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataStd_Tick,TDataStd_GenericEmpty)
//=======================================================================
//function : GetID
return GetID();
}
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) TDataStd_Tick::NewEmpty() const
-{
- return new TDataStd_Tick();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-void TDataStd_Tick::Restore (const Handle(TDF_Attribute)& )
-{
- // There are no fields in this attribute.
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-void TDataStd_Tick::Paste(const Handle(TDF_Attribute)& ,
- const Handle(TDF_RelocationTable)& ) const
-{
- // There are no fields in this attribute.
-}
-
//=======================================================================
//function : Dump
//purpose :
anOS << "Tick";
return anOS;
}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void TDataStd_Tick::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-}
#ifndef _TDataStd_Tick_HeaderFile
#define _TDataStd_Tick_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <Standard_OStream.hxx>
class Standard_GUID;
class TDF_Label;
class TDataStd_Tick;
-DEFINE_STANDARD_HANDLE(TDataStd_Tick, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(TDataStd_Tick, TDataStd_GenericEmpty)
//! Defines a boolean attribute.
//! If it exists at a label - true,
//! Otherwise - false.
-class TDataStd_Tick : public TDF_Attribute
+class TDataStd_Tick : public TDataStd_GenericEmpty
{
public:
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 virtual Standard_OStream& Dump (Standard_OStream& anOS) const 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_Tick,TDF_Attribute)
-
-protected:
-
-
-
-
-private:
-
-
+ DEFINE_DERIVED_ATTRIBUTE(TDataStd_Tick, TDataStd_GenericEmpty)
};
#include <TopoDS.hxx>
#include <TopoDS_Edge.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataXtd_Axis,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataXtd_Axis, TDataStd_GenericEmpty)
//=======================================================================
//function : GetID
const Standard_GUID& TDataXtd_Axis::ID() const { return GetID(); }
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) TDataXtd_Axis::NewEmpty () const
-{
- return new TDataXtd_Axis();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void TDataXtd_Axis::Restore (const Handle(TDF_Attribute)&) { }
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void TDataXtd_Axis::Paste (const Handle(TDF_Attribute)&, const Handle(TDF_RelocationTable)&) const { }
-
-
//=======================================================================
//function : Dump
//purpose :
#ifndef _TDataXtd_Axis_HeaderFile
#define _TDataXtd_Axis_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TDF_Attribute.hxx>
-#include <Standard_OStream.hxx>
-class Standard_GUID;
+#include <TDataStd_GenericEmpty.hxx>
class TDF_Label;
class gp_Lin;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
class TDataXtd_Axis;
-DEFINE_STANDARD_HANDLE(TDataXtd_Axis, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(TDataXtd_Axis, TDataStd_GenericEmpty)
//! The basis to define an axis attribute.
//!
//! Warning: Use TDataXtd_Geometry attribute to retrieve the
//! gp_Lin of the Axis attribute
-class TDataXtd_Axis : public TDF_Attribute
+class TDataXtd_Axis : public TDataStd_GenericEmpty
{
public:
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 virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
-
-
- DEFINE_STANDARD_RTTIEXT(TDataXtd_Axis,TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(TDataXtd_Axis, TDataStd_GenericEmpty)
protected:
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataXtd_Placement,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataXtd_Placement,TDataStd_GenericEmpty)
//=======================================================================
//function : GetID
const Standard_GUID& TDataXtd_Placement::ID () const { return GetID(); }
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) TDataXtd_Placement::NewEmpty() const
-{
- return new TDataXtd_Placement();
-}
-
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void TDataXtd_Placement::Restore (const Handle(TDF_Attribute)&)
-{
-
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void TDataXtd_Placement::Paste(const Handle(TDF_Attribute)&,
- const Handle(TDF_RelocationTable)&) const
-{
-
-}
-
//=======================================================================
//function : Dump
//purpose :
#ifndef _TDataXtd_Placement_HeaderFile
#define _TDataXtd_Placement_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TDF_Attribute.hxx>
-#include <Standard_OStream.hxx>
-class Standard_GUID;
+#include <TDataStd_GenericEmpty.hxx>
class TDF_Label;
-class TDF_Attribute;
-class TDF_RelocationTable;
-
class TDataXtd_Placement;
-DEFINE_STANDARD_HANDLE(TDataXtd_Placement, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(TDataXtd_Placement, TDataStd_GenericEmpty)
-class TDataXtd_Placement : public TDF_Attribute
+class TDataXtd_Placement : public TDataStd_GenericEmpty
{
public:
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 virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
-
-
- DEFINE_STANDARD_RTTIEXT(TDataXtd_Placement,TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(TDataXtd_Placement, TDataStd_GenericEmpty)
protected:
#include <TopoDS.hxx>
#include <TopoDS_Face.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataXtd_Plane,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataXtd_Plane, TDataStd_GenericEmpty)
//=======================================================================
//function : GetID
const Standard_GUID& TDataXtd_Plane::ID() const { return GetID(); }
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) TDataXtd_Plane::NewEmpty () const
-{
- return new TDataXtd_Plane();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void TDataXtd_Plane::Restore(const Handle(TDF_Attribute)&) {}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void TDataXtd_Plane::Paste (const Handle(TDF_Attribute)&, const Handle(TDF_RelocationTable)&) const { }
-
-
//=======================================================================
//function : Dump
//purpose :
#ifndef _TDataXtd_Plane_HeaderFile
#define _TDataXtd_Plane_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TDF_Attribute.hxx>
-#include <Standard_OStream.hxx>
-class Standard_GUID;
+#include <TDataStd_GenericEmpty.hxx>
class TDF_Label;
class gp_Pln;
-class TDF_Attribute;
-class TDF_RelocationTable;
class TDataXtd_Plane;
-DEFINE_STANDARD_HANDLE(TDataXtd_Plane, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(TDataXtd_Plane, TDataStd_GenericEmpty)
//! The basis to define a plane attribute.
//! Warning: Use TDataXtd_Geometry attribute to retrieve the
//! gp_Pln of the Plane attribute
-class TDataXtd_Plane : public TDF_Attribute
+class TDataXtd_Plane : public TDataStd_GenericEmpty
{
public:
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 virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
-
-
- DEFINE_STANDARD_RTTIEXT(TDataXtd_Plane,TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(TDataXtd_Plane, TDataStd_GenericEmpty)
protected:
#include <TopoDS.hxx>
#include <TopoDS_Vertex.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataXtd_Point,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataXtd_Point, TDataStd_GenericEmpty)
//=======================================================================
//function : GetID
const Standard_GUID& TDataXtd_Point::ID() const { return GetID ();}
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) TDataXtd_Point::NewEmpty () const
-{
- return new TDataXtd_Point();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void TDataXtd_Point::Restore(const Handle(TDF_Attribute)&)
-{
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void TDataXtd_Point::Paste (const Handle(TDF_Attribute)&, const Handle(TDF_RelocationTable)&) const
-{
-}
-
//=======================================================================
//function : Dump
//purpose :
#ifndef _TDataXtd_Point_HeaderFile
#define _TDataXtd_Point_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TDF_Attribute.hxx>
-#include <Standard_OStream.hxx>
-class Standard_GUID;
+#include <TDataStd_GenericEmpty.hxx>
class TDF_Label;
class gp_Pnt;
-class TDF_Attribute;
-class TDF_RelocationTable;
class TDataXtd_Point;
-DEFINE_STANDARD_HANDLE(TDataXtd_Point, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(TDataXtd_Point, TDataStd_GenericEmpty)
//! The basis to define a point attribute.
//!
//! Warning: Use TDataXtd_Geometry attribute to retrieve the
//! gp_Pnt of the Point attribute
-class TDataXtd_Point : public TDF_Attribute
+class TDataXtd_Point : public TDataStd_GenericEmpty
{
public:
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 virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
-
-
- DEFINE_STANDARD_RTTIEXT(TDataXtd_Point,TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(TDataXtd_Point, TDataStd_GenericEmpty)
protected:
#include <TopoDS_Shape.hxx>
#include <TopoDS_Solid.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(TDataXtd_Shape,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(TDataXtd_Shape, TDataStd_GenericEmpty)
//=======================================================================
//function : Find
{ return GetID(); }
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) TDataXtd_Shape::NewEmpty () const
-{
- return new TDataXtd_Shape();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void TDataXtd_Shape::Restore(const Handle(TDF_Attribute)& )
-{
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void TDataXtd_Shape::Paste (const Handle(TDF_Attribute)&,
- const Handle(TDF_RelocationTable)&) const
-{
-}
-
//=======================================================================
//function : References
//purpose :
#ifndef _TDataXtd_Shape_HeaderFile
#define _TDataXtd_Shape_HeaderFile
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <TDF_Attribute.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_OStream.hxx>
-class TDF_Label;
+#include <TDataStd_GenericEmpty.hxx>
class TopoDS_Shape;
-class Standard_GUID;
-class TDF_Attribute;
-class TDF_RelocationTable;
class TDF_DataSet;
class TDataXtd_Shape;
-DEFINE_STANDARD_HANDLE(TDataXtd_Shape, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(TDataXtd_Shape, TDataStd_GenericEmpty)
//! A Shape is associated in the framework with :
//! a NamedShape attribute
-class TDataXtd_Shape : public TDF_Attribute
+class TDataXtd_Shape : public TDataStd_GenericEmpty
{
public:
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 virtual void References (const Handle(TDF_DataSet)& DS) const Standard_OVERRIDE;
Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
-
-
- DEFINE_STANDARD_RTTIEXT(TDataXtd_Shape,TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(TDataXtd_Shape, TDataStd_GenericEmpty)
protected:
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Area,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_Area,TDataStd_Real,"xcaf","Area")
//=======================================================================
//function : Constructor
void XCAFDoc_Area::Set (const Standard_Real V)
{
- Backup();
- myValue = V;
+ TDataStd_Real::Set(V);
}
//=======================================================================
//purpose :
//=======================================================================
-Standard_Real XCAFDoc_Area::Get() const { return myValue; }
+Standard_Real XCAFDoc_Area::Get() const
+{
+ return TDataStd_Real::Get();
+}
//=======================================================================
//function : Get
return Standard_True;
}
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_Area::NewEmpty () const
-{
- return new XCAFDoc_Area();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_Area::Restore(const Handle(TDF_Attribute)& With)
-{
- Handle(XCAFDoc_Area) R = Handle(XCAFDoc_Area)::DownCast (With);
- myValue = R->Get();
-}
-
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void XCAFDoc_Area::Paste (const Handle(TDF_Attribute)& Into,
- const Handle(TDF_RelocationTable)& /* RT */) const
-{
- Handle(XCAFDoc_Area) R = Handle(XCAFDoc_Area)::DownCast (Into);
- R->Set(myValue);
-}
-
//=======================================================================
//function : Dump
//purpose :
#include <Standard_Type.hxx>
#include <Standard_Real.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_Real.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_OStream.hxx>
class Standard_GUID;
class XCAFDoc_Area;
-DEFINE_STANDARD_HANDLE(XCAFDoc_Area, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_Area, TDataStd_Real)
//! attribute to store area
-class XCAFDoc_Area : public TDF_Attribute
+class XCAFDoc_Area : public TDataStd_Real
{
public:
//! returns false if no such attribute at the <label>
Standard_EXPORT static Standard_Boolean Get (const TDF_Label& label, Standard_Real& area);
- 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 virtual Standard_OStream& Dump (Standard_OStream& anOS) const 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(XCAFDoc_Area,TDF_Attribute)
-
-protected:
-
-
-
-
-private:
-
-
- Standard_Real myValue;
-
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_Area,TDataStd_Real)
};
#include <TDF_ChildIDIterator.hxx>
#include <XCAFDoc.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ClippingPlaneTool, TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_ClippingPlaneTool,TDataStd_GenericEmpty,"xcaf","ClippingPlaneTool")
//=======================================================================
//function : BaseLabel
return GetID();
}
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_ClippingPlaneTool::Restore(const Handle(TDF_Attribute)& /*with*/)
-{
-}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_ClippingPlaneTool::NewEmpty() const
-{
- return new XCAFDoc_ClippingPlaneTool;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void XCAFDoc_ClippingPlaneTool::Paste(const Handle(TDF_Attribute)& /*into*/,
- const Handle(TDF_RelocationTable)& /*RT*/) const
-{
-}
-
//=======================================================================
//function : XCAFDoc_ClippingPlaneTool
//purpose :
XCAFDoc_ClippingPlaneTool::XCAFDoc_ClippingPlaneTool()
{
}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void XCAFDoc_ClippingPlaneTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-}
-
#include <gp_Pln.hxx>
#include <TDF_LabelSequence.hxx>
+#include <TDataStd_GenericEmpty.hxx>
class XCAFDoc_ClippingPlaneTool;
-DEFINE_STANDARD_HANDLE(XCAFDoc_ClippingPlaneTool, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_ClippingPlaneTool, TDataStd_GenericEmpty)
//! Provide tool for management of ClippingPlane section of document.
//! Provide tool to store, retrieve, remove and modify clipping planes.
//! Each clipping plane consists of gp_Pln and its name.
-class XCAFDoc_ClippingPlaneTool : public TDF_Attribute
+class XCAFDoc_ClippingPlaneTool : public TDataStd_GenericEmpty
{
public:
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;
-
- //! 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(XCAFDoc_ClippingPlaneTool, TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_ClippingPlaneTool, TDataStd_GenericEmpty)
};
#endif // _XCAFDoc_ClippingPlaneTool_HeaderFile
#include <XCAFDoc_GraphNode.hxx>
#include <XCAFDoc_ShapeTool.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ColorTool,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_ColorTool,TDataStd_GenericEmpty,"xcaf","ColorTool")
static Standard_Boolean XCAFDoc_ColorTool_AutoNaming = Standard_True;
return GetID();
}
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_ColorTool::Restore(const Handle(TDF_Attribute)& /*with*/)
-{
-}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_ColorTool::NewEmpty() const
-{
- return new XCAFDoc_ColorTool;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void XCAFDoc_ColorTool::Paste (const Handle(TDF_Attribute)& /*into*/,
- const Handle(TDF_RelocationTable)& /*RT*/) const
-{
-}
-
-/**/
-
//=======================================================================
//function : XCAFDoc_ColorTool
//purpose :
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <Standard_Boolean.hxx>
#include <TDF_LabelSequence.hxx>
#include <XCAFDoc_ColorType.hxx>
class XCAFDoc_ColorTool;
-DEFINE_STANDARD_HANDLE(XCAFDoc_ColorTool, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_ColorTool, TDataStd_GenericEmpty)
//! Provides tools to store and retrieve attributes (colors)
//! of TopoDS_Shape in and from TDocStd_Document
//! A Document is intended to hold different
//! attributes of ONE shape and it's sub-shapes
//! Provide tools for management of Colors section of document.
-class XCAFDoc_ColorTool : public TDF_Attribute
+class XCAFDoc_ColorTool : public TDataStd_GenericEmpty
{
public:
//! Returns current auto-naming mode; TRUE by default.
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;
-
//! 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(XCAFDoc_ColorTool,TDF_Attribute)
-
-protected:
-
-
-
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_ColorTool,TDataStd_GenericEmpty)
private:
#include <XCAFDoc_ShapeTool.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_DimTolTool,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_DimTolTool,TDataStd_GenericEmpty,"xcaf","DimTolTool")
//=======================================================================
//function : XCAFDoc_DimTolTool
}
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_DimTolTool::Restore(const Handle(TDF_Attribute)& /*with*/)
-{
-}
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_DimTolTool::NewEmpty() const
-{
- return new XCAFDoc_DimTolTool;
-}
-
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void XCAFDoc_DimTolTool::Paste(const Handle(TDF_Attribute)& /*into*/,
- const Handle(TDF_RelocationTable)& /*RT*/) const
-{
-}
-
//=======================================================================
//function : GetGDTPresentations
//purpose :
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <Standard_Boolean.hxx>
#include <TDF_LabelSequence.hxx>
#include <Standard_Integer.hxx>
class XCAFDoc_DimTolTool;
-DEFINE_STANDARD_HANDLE(XCAFDoc_DimTolTool, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_DimTolTool, TDataStd_GenericEmpty)
//! Attribute containing GD&T section of XCAF document.
//! Provide tools for GD&T section management.
-class XCAFDoc_DimTolTool : public TDF_Attribute
+class XCAFDoc_DimTolTool : public TDataStd_GenericEmpty
{
public:
Standard_EXPORT void Unlock(const TDF_Label& theViewL) 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;
+
//! 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(XCAFDoc_DimTolTool,TDF_Attribute)
-
-protected:
-
-
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_DimTolTool,TDataStd_GenericEmpty)
private:
#include <TNaming_Tool.hxx>
#include <TDataStd_Name.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Dimension,TDF_Attribute)
-
+IMPLEMENT_DERIVED_ATTRIBUTE(XCAFDoc_Dimension,TDataStd_GenericEmpty)
enum ChildLab
{
ChildLab_Type = 1,
{
return GetID();
}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_Dimension::Restore(const Handle(TDF_Attribute)& /*With*/)
-{
-}
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_Dimension::NewEmpty() const
-{
- return new XCAFDoc_Dimension();
-}
-
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void XCAFDoc_Dimension::Paste(const Handle(TDF_Attribute)& /*Into*/,
- const Handle(TDF_RelocationTable)& /*RT*/) const
-{
-}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void XCAFDoc_Dimension::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-}
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
class Standard_GUID;
class TDF_Label;
class TDF_Attribute;
#endif
class XCAFDoc_Dimension;
-DEFINE_STANDARD_HANDLE(XCAFDoc_Dimension, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_Dimension, TDataStd_GenericEmpty)
//! Attribute that identifies a dimension in the GD&T table.
//! Its parent label is used as a container to store data provided
//! by XCAFDimTolObjects_DimensionObject.
-class XCAFDoc_Dimension : public TDF_Attribute
+class XCAFDoc_Dimension : public TDataStd_GenericEmpty
{
public:
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;
-
//! Updates parent's label and its sub-labels with data taken from theDimensionObject.
//! Old data associated with the label will be lost.
Standard_EXPORT void SetObject (const Handle(XCAFDimTolObjects_DimensionObject)& theDimensionObject);
- //! Returns dimension object data taken from the paren's label and its sub-labels.
+ //! Returns dimension object data taken from the parent's label and its sub-labels.
Standard_EXPORT Handle(XCAFDimTolObjects_DimensionObject) GetObject() const;
- //! 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(XCAFDoc_Dimension,TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_Dimension,TDataStd_GenericEmpty)
};
#include <XCAFDoc_ViewTool.hxx>
#include <XCAFDoc_VisMaterialTool.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_DocumentTool,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_DocumentTool,TDataStd_GenericEmpty,"xcaf","DocumentTool")
//=======================================================================
//function : GetID
return GetID();
}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_DocumentTool::Restore(const Handle(TDF_Attribute)& /* with */)
-{
-}
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_DocumentTool::NewEmpty() const
-{
- return new XCAFDoc_DocumentTool;
-}
-
-
//=======================================================================
-//function : Paste
+//function : AfterRetrieval
//purpose :
//=======================================================================
-void XCAFDoc_DocumentTool::Paste (const Handle(TDF_Attribute)& /* into */,
- const Handle(TDF_RelocationTable)& /* RT */) const
+Standard_Boolean XCAFDoc_DocumentTool::AfterRetrieval (const Standard_Boolean /* forceIt */)
{
+ Init();
+ return Standard_True;
}
Handle(TDataStd_TreeNode) aRootNode;
return RootL.FindAttribute (aRefGuid, aRootNode);
}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void XCAFDoc_DocumentTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-}
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <Standard_Boolean.hxx>
class Standard_GUID;
class TDF_Label;
class XCAFDoc_DocumentTool;
-DEFINE_STANDARD_HANDLE(XCAFDoc_DocumentTool, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_DocumentTool, TDataStd_GenericEmpty)
//! Defines sections structure of an XDE document.
//! attribute marking CAF document as being DECAF document.
//! Creates the sections structure of the document.
-class XCAFDoc_DocumentTool : public TDF_Attribute
+class XCAFDoc_DocumentTool : public TDataStd_GenericEmpty
{
public:
Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
- Standard_EXPORT void Restore (const Handle(TDF_Attribute)& with) Standard_OVERRIDE;
+ //! To init this derived attribute after the attribute restore using the base restore-methods
+ Standard_EXPORT Standard_Boolean AfterRetrieval (const Standard_Boolean forceIt = Standard_False) 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;
-
- //! 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(XCAFDoc_DocumentTool,TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_DocumentTool,TDataStd_GenericEmpty)
};
#endif // _XCAFDoc_DocumentTool_HeaderFile
#include <TCollection_ExtendedString.hxx>
#include <TDataStd_Name.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_GeomTolerance,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(XCAFDoc_GeomTolerance,TDataStd_GenericEmpty)
enum ChildLab
{
{
return GetID();
}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_GeomTolerance::Restore(const Handle(TDF_Attribute)& /*With*/)
-{
-}
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_GeomTolerance::NewEmpty() const
-{
- return new XCAFDoc_GeomTolerance();
-}
-
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void XCAFDoc_GeomTolerance::Paste(const Handle(TDF_Attribute)& /*Into*/,
- const Handle(TDF_RelocationTable)& /*RT*/) const
-{
-}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void XCAFDoc_GeomTolerance::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-}
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
class Standard_GUID;
class TDF_Label;
class TDF_Attribute;
#endif
class XCAFDoc_GeomTolerance;
-DEFINE_STANDARD_HANDLE(XCAFDoc_GeomTolerance, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_GeomTolerance, TDataStd_GenericEmpty)
//! Attribute to store dimension and tolerance
-class XCAFDoc_GeomTolerance : public TDF_Attribute
+class XCAFDoc_GeomTolerance : public TDataStd_GenericEmpty
{
public:
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;
-
- //! 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(XCAFDoc_GeomTolerance,TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_GeomTolerance,TDataStd_GenericEmpty)
};
#endif
#include <XCAFDoc_GraphNode.hxx>
#include <XCAFDoc_ShapeTool.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_LayerTool,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_LayerTool,TDataStd_GenericEmpty,"xcaf","LayerTool")
//=======================================================================
//function : Constructor
return GetID();
}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_LayerTool::Restore(const Handle(TDF_Attribute)& /* with */)
-{
-}
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_LayerTool::NewEmpty() const
-{
- return new XCAFDoc_LayerTool;
-}
-
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void XCAFDoc_LayerTool::Paste(const Handle(TDF_Attribute)& /* into */,
- const Handle(TDF_RelocationTable)& /* RT */) const
-{
-}
-
//=======================================================================
//function : DumpJson
//purpose :
OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
OCCT_DUMP_FIELD_VALUES_DUMPED (theOStream, theDepth, myShapeTool.get())
-}
+}
\ No newline at end of file
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <Standard_Boolean.hxx>
#include <TDF_LabelSequence.hxx>
#include <TColStd_HSequenceOfExtendedString.hxx>
class XCAFDoc_LayerTool;
-DEFINE_STANDARD_HANDLE(XCAFDoc_LayerTool, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_LayerTool, TDataStd_GenericEmpty)
//! Provides tools to store and retrieve attributes (Layers)
//! of TopoDS_Shape in and from TDocStd_Document
//! A Document is intended to hold different
//! attributes of ONE shape and it's sub-shapes
//! Provide tools for management of Layers section of document.
-class XCAFDoc_LayerTool : public TDF_Attribute
+class XCAFDoc_LayerTool : public TDataStd_GenericEmpty
{
public:
Standard_EXPORT Handle(TColStd_HSequenceOfExtendedString) GetLayers (const TopoDS_Shape& Sh);
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;
-
+
//! 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(XCAFDoc_LayerTool,TDF_Attribute)
-
-protected:
-
-
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_LayerTool,TDataStd_GenericEmpty)
private:
#include <XCAFDoc_Material.hxx>
#include <XCAFDoc_ShapeTool.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_MaterialTool,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_MaterialTool,TDataStd_GenericEmpty,"xcaf","MaterialTool")
//=======================================================================
//function : XCAFDoc_MaterialTool
return GetID();
}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_MaterialTool::Restore(const Handle(TDF_Attribute)& /*with*/)
-{
-}
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_MaterialTool::NewEmpty() const
-{
- return new XCAFDoc_MaterialTool;
-}
-
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void XCAFDoc_MaterialTool::Paste(const Handle(TDF_Attribute)& /*into*/,
- const Handle(TDF_RelocationTable)& /*RT*/) const
-{
-}
-
//=======================================================================
//function : DumpJson
//purpose :
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <Standard_Boolean.hxx>
#include <TDF_LabelSequence.hxx>
#include <Standard_Real.hxx>
class XCAFDoc_MaterialTool;
-DEFINE_STANDARD_HANDLE(XCAFDoc_MaterialTool, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_MaterialTool, TDataStd_GenericEmpty)
//! Provides tools to store and retrieve attributes (materials)
//! of TopoDS_Shape in and from TDocStd_Document
//! A Document is intended to hold different
//! attributes of ONE shape and it's sub-shapes
//! Provide tools for management of Materialss section of document.
-class XCAFDoc_MaterialTool : public TDF_Attribute
+class XCAFDoc_MaterialTool : public TDataStd_GenericEmpty
{
public:
Standard_EXPORT static Standard_Real GetDensityForShape (const TDF_Label& ShapeL);
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;
-
+
//! 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(XCAFDoc_MaterialTool,TDF_Attribute)
-
-protected:
-
-
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_MaterialTool,TDataStd_GenericEmpty)
private:
#include <Standard_Type.hxx>
#include <TCollection_ExtendedString.hxx>
#include <OSD_File.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDF_DerivedAttribute.hxx>
#include <TDF_LabelSequence.hxx>
#include <XCAFNoteObjects_NoteObject.hxx>
#include <Standard_GUID.hxx>
#include <TDF_Label.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment)
+IMPLEMENT_DERIVED_ATTRIBUTE(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment)
// =======================================================================
// function : GetID
{
return GetID();
}
-
-// =======================================================================
-// function : NewEmpty
-// purpose :
-// =======================================================================
-Handle(TDF_Attribute)
-XCAFDoc_NoteBalloon::NewEmpty() const
-{
- return new XCAFDoc_NoteBalloon();
-}
{
public:
- DEFINE_STANDARD_RTTIEXT(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment)
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment)
//! Returns default attribute GUID
Standard_EXPORT static const Standard_GUID& GetID();
// Overrides TDF_Attribute virtuals
Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
};
DEFINE_STANDARD_HANDLE(XCAFDoc_NoteBalloon, XCAFDoc_NoteComment)
}
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NotesTool, TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(XCAFDoc_NotesTool, XCAFDoc_NoteComment)
enum NotesTool_RootLabels
{
return GetID();
}
-// =======================================================================
-// function : NewEmpty
-// purpose :
-// =======================================================================
-Handle(TDF_Attribute)
-XCAFDoc_NotesTool::NewEmpty() const
-{
- return new XCAFDoc_NotesTool();
-}
-
-// =======================================================================
-// function : Restore
-// purpose :
-// =======================================================================
-void
-XCAFDoc_NotesTool::Restore(const Handle(TDF_Attribute)& /*theAttr*/)
-{
-}
-
-// =======================================================================
-// function : Paste
-// purpose :
-// =======================================================================
-void
-XCAFDoc_NotesTool::Paste(const Handle(TDF_Attribute)& /*theAttrInto*/,
- const Handle(TDF_RelocationTable)& /*theRT*/) const
-{
-}
-
// =======================================================================
// function : Dump
// purpose :
;
return theOS;
}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void XCAFDoc_NotesTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-}
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <TDF_LabelSequence.hxx>
class OSD_File;
//! }
//! }
//! \endcode
-class XCAFDoc_NotesTool : public TDF_Attribute
+class XCAFDoc_NotesTool : public TDataStd_GenericEmpty
{
public:
- DEFINE_STANDARD_RTTIEXT(XCAFDoc_NotesTool, TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_NotesTool, TDataStd_GenericEmpty)
//! Returns default attribute GUID
Standard_EXPORT static const Standard_GUID& GetID();
// Overrides TDF_Attribute virtuals
Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
- Standard_EXPORT void Restore(const Handle(TDF_Attribute)& theAttrFrom) Standard_OVERRIDE;
- Standard_EXPORT void Paste(const Handle(TDF_Attribute)& theAttrInto,
- const Handle(TDF_RelocationTable)& theRT) const Standard_OVERRIDE;
Standard_EXPORT Standard_OStream& Dump(Standard_OStream& theOS) const 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_HANDLE(XCAFDoc_NotesTool, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_NotesTool, TDataStd_GenericEmpty)
#endif // _XCAFDoc_NotesTool_HeaderFile
#include <XCAFDoc_Location.hxx>
#include <XCAFDoc_ShapeMapTool.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ShapeTool,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_ShapeTool,TDataStd_GenericEmpty,"xcaf","ShapeTool")
static Standard_Boolean theAutoNaming = Standard_True;
return GetID();
}
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_ShapeTool::Restore(const Handle(TDF_Attribute)& /*with*/)
-{
-}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_ShapeTool::NewEmpty() const
-{
- return new XCAFDoc_ShapeTool;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void XCAFDoc_ShapeTool::Paste (const Handle(TDF_Attribute)& /*into*/,
- const Handle(TDF_RelocationTable)& /*RT*/) const
-{
-}
-
// Auxiliary methods //////////////////////////////////////////////////
//=======================================================================
#include <XCAFDoc_DataMapOfShapeLabel.hxx>
#include <Standard_Boolean.hxx>
#include <TDataStd_NamedData.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <TDF_LabelMap.hxx>
#include <TDF_LabelSequence.hxx>
#include <Standard_Integer.hxx>
class XCAFDoc_ShapeTool;
-DEFINE_STANDARD_HANDLE(XCAFDoc_ShapeTool, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_ShapeTool, TDataStd_GenericEmpty)
//! A tool to store shapes in an XDE
//! document in the form of assembly structure, and to maintain this structure.
//! aLabel = STool->FindShape(aShape [,findInstance]);
//! if (aLabel.IsNull())
//! { ... no label found for this shape ... }
-class XCAFDoc_ShapeTool : public TDF_Attribute
+class XCAFDoc_ShapeTool : public TDataStd_GenericEmpty
{
public:
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;
-
//! Returns True if the label is a label of external references, i.e.
//! there are some reference on the no-step files, which are
//! described in document only their names
//! 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(XCAFDoc_ShapeTool,TDF_Attribute)
-
-protected:
-
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_ShapeTool,TDataStd_GenericEmpty)
private:
#include <XCAFDoc.hxx>
#include <XCAFView_Object.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_View, TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE(XCAFDoc_View, TDataStd_GenericEmpty)
enum ChildLab
{
{
return GetID();
}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-void XCAFDoc_View::Restore(const Handle(TDF_Attribute)& /*With*/)
-{
-}
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XCAFDoc_View::NewEmpty() const
-{
- return new XCAFDoc_View();
-}
-
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-void XCAFDoc_View::Paste(const Handle(TDF_Attribute)& /*Into*/,
- const Handle(TDF_RelocationTable)& /*RT*/) const
-{
-}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void XCAFDoc_View::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-}
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
class Standard_GUID;
class TDF_Label;
class TDF_Attribute;
#endif
class XCAFDoc_View;
-DEFINE_STANDARD_HANDLE(XCAFDoc_View, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_View, TDataStd_GenericEmpty)
//! Attribute to store view
-class XCAFDoc_View : public TDF_Attribute
+class XCAFDoc_View : public TDataStd_GenericEmpty
{
public:
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;
-
//! Updates parent's label and its sub-labels with data taken from theViewObject.
//! Old data associated with the label will be lost.
Standard_EXPORT void SetObject(const Handle(XCAFView_Object)& theViewObject);
//! Returns view object data taken from the paren's label and its sub-labels.
Standard_EXPORT Handle(XCAFView_Object) GetObject() const;
- //! 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(XCAFDoc_View, TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_View, TDataStd_GenericEmpty)
};
#include <XCAFDoc_ShapeTool.hxx>
#include <XCAFDoc_View.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_ViewTool, TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_ViewTool,TDataStd_GenericEmpty,"xcaf","ViewTool")
//=======================================================================
//function : XCAFDoc_ViewTool
{
return GetID();
}
-
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-void XCAFDoc_ViewTool::Restore(const Handle(TDF_Attribute)& /*with*/)
-{
-}
-
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XCAFDoc_ViewTool::NewEmpty() const
-{
- return new XCAFDoc_ViewTool;
-}
-
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-void XCAFDoc_ViewTool::Paste(const Handle(TDF_Attribute)& /*into*/,
- const Handle(TDF_RelocationTable)& /*RT*/) const
-{
-}
-
-//=======================================================================
-//function : DumpJson
-//purpose :
-//=======================================================================
-void XCAFDoc_ViewTool::DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth) const
-{
- OCCT_DUMP_TRANSIENT_CLASS_BEGIN (theOStream)
-
- OCCT_DUMP_BASE_CLASS (theOStream, theDepth, TDF_Attribute)
-}
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_GenericEmpty.hxx>
#include <Standard_Boolean.hxx>
#include <TDF_LabelSequence.hxx>
#include <Standard_Integer.hxx>
class XCAFDoc_ViewTool;
-DEFINE_STANDARD_HANDLE(XCAFDoc_ViewTool, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_ViewTool, TDataStd_GenericEmpty)
//! Provides tools to store and retrieve Views
//! in and from TDocStd_Document
//! with all information about camera and view window.
//! Also each view contain information of displayed shapes and GDTs
//! as sets of shape and GDT labels.
-class XCAFDoc_ViewTool : public TDF_Attribute
+class XCAFDoc_ViewTool : public TDataStd_GenericEmpty
{
public:
Standard_EXPORT void Unlock(const TDF_Label& theViewL) 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;
-
- //! 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(XCAFDoc_ViewTool, TDF_Attribute)
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_ViewTool, TDataStd_GenericEmpty)
};
#endif // _XCAFDoc_ViewTool_HeaderFile
#include <TDF_Label.hxx>
#include <TDF_RelocationTable.hxx>
-IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Volume,TDF_Attribute)
+IMPLEMENT_DERIVED_ATTRIBUTE_WITH_TYPE(XCAFDoc_Volume,TDataStd_Real,"xcaf","Volume")
//=======================================================================
//function : Constructor
void XCAFDoc_Volume::Set (const Standard_Real V)
{
- Backup();
- myValue = V;
+ TDataStd_Real::Set(V);
}
//=======================================================================
//purpose :
//=======================================================================
-Standard_Real XCAFDoc_Volume::Get() const { return myValue; }
+Standard_Real XCAFDoc_Volume::Get() const
+{
+ return TDataStd_Real::Get();
+}
//=======================================================================
//function : Get
return Standard_True;
}
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) XCAFDoc_Volume::NewEmpty () const
-{
- return new XCAFDoc_Volume();
-}
-
-//=======================================================================
-//function : Restore
-//purpose :
-//=======================================================================
-
-void XCAFDoc_Volume::Restore(const Handle(TDF_Attribute)& With)
-{
- Handle(XCAFDoc_Volume) R = Handle(XCAFDoc_Volume)::DownCast (With);
- myValue = R->Get();
-}
-
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
-void XCAFDoc_Volume::Paste (const Handle(TDF_Attribute)& Into,
- const Handle(TDF_RelocationTable)& /* RT */) const
-{
- Handle(XCAFDoc_Volume) R = Handle(XCAFDoc_Volume)::DownCast (Into);
- R->Set(myValue);
-}
-
//=======================================================================
//function : Dump
//purpose :
#include <Standard.hxx>
#include <Standard_Type.hxx>
-#include <Standard_Real.hxx>
-#include <TDF_Attribute.hxx>
+#include <TDataStd_Real.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_OStream.hxx>
class Standard_GUID;
class XCAFDoc_Volume;
-DEFINE_STANDARD_HANDLE(XCAFDoc_Volume, TDF_Attribute)
+DEFINE_STANDARD_HANDLE(XCAFDoc_Volume, TDataStd_Real)
//! attribute to store volume
-class XCAFDoc_Volume : public TDF_Attribute
+class XCAFDoc_Volume : public TDataStd_Real
{
public:
//! returns false if no such attribute at the <label>
Standard_EXPORT static Standard_Boolean Get (const TDF_Label& label, Standard_Real& vol);
- 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 virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
//! Dumps the content of me into the stream
- DEFINE_STANDARD_RTTIEXT(XCAFDoc_Volume,TDF_Attribute)
-
-protected:
-
-
-
-
-private:
-
-
- Standard_Real myValue;
-
+ DEFINE_DERIVED_ATTRIBUTE(XCAFDoc_Volume,TDataStd_Real)
};
XmlMDF_TagSourceDriver.cxx
XmlMDF_TagSourceDriver.hxx
XmlMDF_TypeADriverMap.hxx
+XmlMDF_DerivedDriver.cxx
+XmlMDF_DerivedDriver.hxx
// create element "label"
XmlObjMgt_Element aLabElem = aDoc.createElement (::LabelString());
- // Extraction of the driver subset.
- const XmlMDF_TypeADriverMap& aDriverMap = theDrivers->GetDrivers();
-
// write attributes
Standard_Integer count = 0;
TDF_AttributeIterator itr1 (theLabel);
{
const Handle(TDF_Attribute)& tAtt = itr1.Value();
const Handle(Standard_Type)& aType = tAtt->DynamicType();
- if (aDriverMap.IsBound (aType))
+ Handle(XmlMDF_ADriver) aDriver;
+ if (theDrivers->GetDriver(aType, aDriver))
{
- const Handle(XmlMDF_ADriver)& aDriver = aDriverMap.Find (aType);
count++;
// Add source to relocation table
{
TDF_Label aRootLab = theData->Root();
XmlMDF_MapOfDriver aDriverMap;
- CreateDrvMap (theDrivers, aDriverMap);
+ theDrivers->CreateDrvMap (aDriverMap);
Standard_Integer count = 0;
aDriverTable->AddDriver (new XmlMDF_TagSourceDriver(aMessageDriver));
aDriverTable->AddDriver (new XmlMDF_ReferenceDriver(aMessageDriver));
}
-
-//=======================================================================
-//function : CreateDrvMap
-//purpose :
-//=======================================================================
-
-void XmlMDF::CreateDrvMap (const Handle(XmlMDF_ADriverTable)& theDrivers,
- XmlMDF_MapOfDriver& theAsciiDriverMap)
-{
- const XmlMDF_TypeADriverMap& aDriverMap = theDrivers->GetDrivers();
- XmlMDF_DataMapIteratorOfTypeADriverMap anIter (aDriverMap);
- while (anIter.More()) {
- const Handle(XmlMDF_ADriver)& aDriver = anIter.Value();
- const TCollection_AsciiString aTypeName = aDriver -> TypeName();
- if (theAsciiDriverMap.IsBound (aTypeName) == Standard_False)
- theAsciiDriverMap.Bind (aTypeName, aDriver);
- else
- aDriver -> myMessageDriver->Send
- (TCollection_ExtendedString ("Warning: skipped driver name: \"")
- + aTypeName + '\"', Message_Warning);
- anIter.Next();
- }
-}
XmlMDF_ADriver::XmlMDF_ADriver (const Handle(Message_Messenger)& theMsgDriver,
const Standard_CString theNS,
const Standard_CString theName)
- : myMessageDriver (theMsgDriver)
+: myNamespace(theNS == NULL ? "" : theNS),
+ myMessageDriver (theMsgDriver)
{
if (theNS != NULL)
if (theNS[0] != '\0') {
if (myTypeName.Length() == 0 || aString [myTypeName.Length() - 1] == ':')
(TCollection_AsciiString&)myTypeName += SourceType() -> Name();
return myTypeName;
-}
\ No newline at end of file
+}
//! Returns the type of source object,
//! inheriting from Attribute from TDF.
- Standard_EXPORT Handle(Standard_Type) SourceType() const;
+ Standard_EXPORT virtual Handle(Standard_Type) SourceType() const;
//! Returns the full XML tag name (including NS prefix)
Standard_EXPORT const TCollection_AsciiString& TypeName() const;
-
+
+ //! Returns the namespace string
+ const TCollection_AsciiString& Namespace() const { return myNamespace; }
+
//! Translate the contents of <aSource> and put it
//! into <aTarget>, using the relocation table
//! <aRelocTable> to keep the sharings.
//! <aRelocTable> to keep the sharings.
Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& aSource, XmlObjMgt_Persistent& aTarget, XmlObjMgt_SRelocationTable& aRelocTable) const = 0;
+ //! Returns the current message driver of this driver
+ const Handle(Message_Messenger)& MessageDriver() const { return myMessageDriver; }
+
DEFINE_STANDARD_RTTIEXT(XmlMDF_ADriver,Standard_Transient)
protected:
Standard_EXPORT XmlMDF_ADriver(const Handle(Message_Messenger)& theMessageDriver, const Standard_CString theNamespace, const Standard_CString theName = NULL);
TCollection_AsciiString myTypeName;
-
+ TCollection_AsciiString myNamespace;
Handle(Message_Messenger) myMessageDriver;
private:
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
+#include <XmlMDF_ADriverTable.hxx>
-#include <Standard_Type.hxx>
+#include <Message_Messenger.hxx>
+#include <TDF_DerivedAttribute.hxx>
+#include <TDF_AttributeList.hxx>
#include <XmlMDF_ADriver.hxx>
-#include <XmlMDF_ADriverTable.hxx>
+#include <XmlMDF_DerivedDriver.hxx>
IMPLEMENT_STANDARD_RTTIEXT(XmlMDF_ADriverTable,Standard_Transient)
}
//=======================================================================
-//function : GetDrivers
-//purpose :
+//function : AddDerivedDriver
+//purpose :
+//=======================================================================
+void XmlMDF_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(XmlMDF_ADriver) aDriver = new XmlMDF_DerivedDriver (theInstance, myMap (aType));
+ myMap.Bind (anInstanceType, aDriver);
+ return;
+ }
+ }
+ }
+}
+
//=======================================================================
-const XmlMDF_TypeADriverMap& XmlMDF_ADriverTable::GetDrivers() const
+//function : AddDerivedDriver
+//purpose :
+//=======================================================================
+const Handle(Standard_Type)& XmlMDF_ADriverTable::AddDerivedDriver (Standard_CString theDerivedType)
{
- return myMap;
+ if (Handle(TDF_Attribute) anInstance = TDF_DerivedAttribute::Attribute (theDerivedType))
+ {
+ AddDerivedDriver (anInstance);
+ return anInstance->DynamicType();
+ }
+ static const Handle(Standard_Type) aNullType;
+ return aNullType;
}
//=======================================================================
//=======================================================================
Standard_Boolean XmlMDF_ADriverTable::GetDriver
(const Handle(Standard_Type)& aType,
- Handle(XmlMDF_ADriver)& anHDriver) const
+ Handle(XmlMDF_ADriver)& anHDriver)
{
+ if (!myMap.IsBound (aType)) // try to assign driver for derived type
+ {
+ AddDerivedDriver (aType->Name());
+ }
if (myMap.IsBound(aType))
{
anHDriver = myMap.Find(aType);
}
return Standard_False;
}
+
+//=======================================================================
+//function : CreateDrvMap
+//purpose :
+//=======================================================================
+void XmlMDF_ADriverTable::CreateDrvMap (XmlMDF_MapOfDriver& theDriverMap)
+{
+ // add derived drivers not yet registered in the map
+ TDF_AttributeList aDerived;
+ TDF_DerivedAttribute::Attributes (aDerived);
+ for (TDF_AttributeList::Iterator aDerIter (aDerived); aDerIter.More(); aDerIter.Next())
+ {
+ if (!myMap.IsBound (aDerIter.Value()->DynamicType()))
+ {
+ AddDerivedDriver (aDerIter.Value());
+ }
+ }
+
+ // put everything to the map
+ for (XmlMDF_DataMapIteratorOfTypeADriverMap anIter (myMap); anIter.More(); anIter.Next())
+ {
+ const Handle(XmlMDF_ADriver)& aDriver = anIter.Value();
+ const TCollection_AsciiString aTypeName = aDriver->TypeName();
+ if (!theDriverMap.IsBound (aTypeName))
+ {
+ theDriverMap.Bind (aTypeName, aDriver);
+ }
+ else
+ {
+ aDriver->MessageDriver()->Send (TCollection_AsciiString ("Warning: skipped driver name: \"")
+ + aTypeName + "\"", Message_Warning);
+ }
+ }
+}
#include <Standard_Transient.hxx>
#include <Standard_Boolean.hxx>
#include <Standard_Type.hxx>
+#include <XmlMDF_MapOfDriver.hxx>
class XmlMDF_ADriver;
//! Sets a translation driver: <aDriver>.
Standard_EXPORT void AddDriver (const Handle(XmlMDF_ADriver)& anHDriver);
-
- //! Gets a map of drivers.
- Standard_EXPORT const XmlMDF_TypeADriverMap& GetDrivers() const;
-
+
+ //! 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);
+
+ //! Fills the map by all registered drivers.
+ Standard_EXPORT void CreateDrvMap (XmlMDF_MapOfDriver& theDriverMap);
+
//! Gets a driver <aDriver> according to <aType>
//!
//! Returns True if a driver is found; false otherwise.
- Standard_EXPORT Standard_Boolean GetDriver (const Handle(Standard_Type)& aType, Handle(XmlMDF_ADriver)& anHDriver) const;
-
-
+ Standard_EXPORT Standard_Boolean GetDriver (const Handle(Standard_Type)& theType,
+ Handle(XmlMDF_ADriver)& theDriver);
DEFINE_STANDARD_RTTIEXT(XmlMDF_ADriverTable,Standard_Transient)
--- /dev/null
+// 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 <XmlMDF_DerivedDriver.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(XmlMDF_DerivedDriver, XmlMDF_ADriver)
--- /dev/null
+// 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 _XmlMDF_DerivedDriver_HeaderFile
+#define _XmlMDF_DerivedDriver_HeaderFile
+
+#include <XmlMDF_ADriver.hxx>
+#include <TDF_DerivedAttribute.hxx>
+
+//! 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 XmlMDF_DerivedDriver : public XmlMDF_ADriver
+{
+ DEFINE_STANDARD_RTTIEXT(XmlMDF_DerivedDriver, XmlMDF_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
+ XmlMDF_DerivedDriver (const Handle(TDF_Attribute)& theDerivative,
+ const Handle(XmlMDF_ADriver)& theBaseDriver)
+ : XmlMDF_ADriver (theBaseDriver->MessageDriver(), theBaseDriver->Namespace().ToCString()),
+ myDerivative (theDerivative),
+ myBaseDirver(theBaseDriver) {}
+
+ //! Creates a new instance of the derivative attribute
+ virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE { return myDerivative->NewEmpty(); }
+
+ //! Returns the full XML tag name (including NS prefix)
+ const TCollection_AsciiString& TypeName() const
+ {
+ const TCollection_AsciiString& aRegistered = TDF_DerivedAttribute::TypeName (myDerivative->DynamicType()->Name());
+ if (aRegistered.IsEmpty())
+ {
+ return XmlMDF_ADriver::TypeName();
+ }
+ return aRegistered;
+ }
+
+ //! Reuses the base driver to read the base fields
+ virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& theSource,
+ const Handle(TDF_Attribute)& theTarget,
+ XmlObjMgt_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,
+ XmlObjMgt_Persistent& theTarget,
+ XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE
+ {
+ myBaseDirver->Paste (theSource, theTarget, theRelocTable);
+ }
+
+protected:
+ Handle(TDF_Attribute) myDerivative; //!< the derivative attribute that inherits the base
+ Handle(XmlMDF_ADriver) myBaseDirver; //!< the base attribute driver to be reused here
+};
+
+#endif
XmlMDataStd_BooleanListDriver.hxx
XmlMDataStd_ByteArrayDriver.cxx
XmlMDataStd_ByteArrayDriver.hxx
-XmlMDataStd_CommentDriver.cxx
-XmlMDataStd_CommentDriver.hxx
-XmlMDataStd_DirectoryDriver.cxx
-XmlMDataStd_DirectoryDriver.hxx
XmlMDataStd_ExpressionDriver.cxx
XmlMDataStd_ExpressionDriver.hxx
XmlMDataStd_ExtStringArrayDriver.cxx
XmlMDataStd_IntPackedMapDriver.hxx
XmlMDataStd_NamedDataDriver.cxx
XmlMDataStd_NamedDataDriver.hxx
-XmlMDataStd_NameDriver.cxx
-XmlMDataStd_NameDriver.hxx
-XmlMDataStd_NoteBookDriver.cxx
-XmlMDataStd_NoteBookDriver.hxx
+XmlMDataStd_GenericExtStringDriver.cxx
+XmlMDataStd_GenericExtStringDriver.hxx
XmlMDataStd_RealArrayDriver.cxx
XmlMDataStd_RealArrayDriver.hxx
XmlMDataStd_RealDriver.cxx
XmlMDataStd_ReferenceArrayDriver.hxx
XmlMDataStd_ReferenceListDriver.cxx
XmlMDataStd_ReferenceListDriver.hxx
-XmlMDataStd_RelationDriver.cxx
-XmlMDataStd_RelationDriver.hxx
-XmlMDataStd_TickDriver.cxx
-XmlMDataStd_TickDriver.hxx
+XmlMDataStd_GenericEmptyDriver.cxx
+XmlMDataStd_GenericEmptyDriver.hxx
XmlMDataStd_TreeNodeDriver.cxx
XmlMDataStd_TreeNodeDriver.hxx
XmlMDataStd_UAttributeDriver.cxx
#include <XmlMDataStd_BooleanArrayDriver.hxx>
#include <XmlMDataStd_BooleanListDriver.hxx>
#include <XmlMDataStd_ByteArrayDriver.hxx>
-#include <XmlMDataStd_CommentDriver.hxx>
-#include <XmlMDataStd_DirectoryDriver.hxx>
#include <XmlMDataStd_ExpressionDriver.hxx>
#include <XmlMDataStd_ExtStringArrayDriver.hxx>
#include <XmlMDataStd_ExtStringListDriver.hxx>
#include <XmlMDataStd_IntegerListDriver.hxx>
#include <XmlMDataStd_IntPackedMapDriver.hxx>
#include <XmlMDataStd_NamedDataDriver.hxx>
-#include <XmlMDataStd_NameDriver.hxx>
-#include <XmlMDataStd_NoteBookDriver.hxx>
+#include <XmlMDataStd_GenericExtStringDriver.hxx>
#include <XmlMDataStd_RealArrayDriver.hxx>
#include <XmlMDataStd_RealDriver.hxx>
#include <XmlMDataStd_RealListDriver.hxx>
#include <XmlMDataStd_ReferenceArrayDriver.hxx>
#include <XmlMDataStd_ReferenceListDriver.hxx>
-#include <XmlMDataStd_RelationDriver.hxx>
-#include <XmlMDataStd_TickDriver.hxx>
+#include <XmlMDataStd_GenericEmptyDriver.hxx>
#include <XmlMDataStd_TreeNodeDriver.hxx>
#include <XmlMDataStd_UAttributeDriver.hxx>
#include <XmlMDataStd_VariableDriver.hxx>
void XmlMDataStd::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable,
const Handle(Message_Messenger)& anMsgDrv)
{
- aDriverTable-> AddDriver (new XmlMDataStd_DirectoryDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_IntegerArrayDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_RealArrayDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_UAttributeDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_NameDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_CommentDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_IntegerDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_RealDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_VariableDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_ExpressionDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_RelationDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_NoteBookDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_TreeNodeDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_ExtStringArrayDriver(anMsgDrv));
-
- aDriverTable-> AddDriver (new XmlMDataStd_TickDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_IntegerListDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_RealListDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_ExtStringListDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_BooleanListDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_ReferenceListDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_BooleanArrayDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_ReferenceArrayDriver(anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_ByteArrayDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_NamedDataDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_AsciiStringDriver (anMsgDrv));
- aDriverTable-> AddDriver (new XmlMDataStd_IntPackedMapDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_IntegerArrayDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_RealArrayDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_UAttributeDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_GenericExtStringDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_IntegerDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_RealDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_VariableDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_ExpressionDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_TreeNodeDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_ExtStringArrayDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_GenericEmptyDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_IntegerListDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_RealListDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_ExtStringListDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_BooleanListDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_ReferenceListDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_BooleanArrayDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_ReferenceArrayDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_ByteArrayDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_NamedDataDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_AsciiStringDriver (anMsgDrv));
+ aDriverTable-> AddDriver (new XmlMDataStd_IntPackedMapDriver (anMsgDrv));
}
#include <Standard_Integer.hxx>
class XmlMDF_ADriverTable;
class Message_Messenger;
-class XmlMDataStd_NameDriver;
+class XmlMDataStd_GenericExtStringDriver;
class XmlMDataStd_IntegerDriver;
class XmlMDataStd_RealDriver;
class XmlMDataStd_IntegerArrayDriver;
class XmlMDataStd_RealArrayDriver;
class XmlMDataStd_ExtStringArrayDriver;
class XmlMDataStd_UAttributeDriver;
-class XmlMDataStd_DirectoryDriver;
-class XmlMDataStd_CommentDriver;
class XmlMDataStd_VariableDriver;
class XmlMDataStd_ExpressionDriver;
class XmlMDataStd_RelationDriver;
-class XmlMDataStd_NoteBookDriver;
class XmlMDataStd_TreeNodeDriver;
-class XmlMDataStd_TickDriver;
+class XmlMDataStd_GenericEmptyDriver;
class XmlMDataStd_IntegerListDriver;
class XmlMDataStd_RealListDriver;
class XmlMDataStd_ExtStringListDriver;
-friend class XmlMDataStd_NameDriver;
+friend class XmlMDataStd_GenericExtStringDriver;
friend class XmlMDataStd_IntegerDriver;
friend class XmlMDataStd_RealDriver;
friend class XmlMDataStd_IntegerArrayDriver;
friend class XmlMDataStd_RealArrayDriver;
friend class XmlMDataStd_ExtStringArrayDriver;
friend class XmlMDataStd_UAttributeDriver;
-friend class XmlMDataStd_DirectoryDriver;
-friend class XmlMDataStd_CommentDriver;
friend class XmlMDataStd_VariableDriver;
friend class XmlMDataStd_ExpressionDriver;
friend class XmlMDataStd_RelationDriver;
-friend class XmlMDataStd_NoteBookDriver;
friend class XmlMDataStd_TreeNodeDriver;
-friend class XmlMDataStd_TickDriver;
+friend class XmlMDataStd_GenericEmptyDriver;
friend class XmlMDataStd_IntegerListDriver;
friend class XmlMDataStd_RealListDriver;
friend class XmlMDataStd_ExtStringListDriver;
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_Comment.hxx>
-#include <TDF_Attribute.hxx>
-#include <XmlMDataStd_CommentDriver.hxx>
-#include <XmlObjMgt.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_CommentDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMDataStd_CommentDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataStd_CommentDriver::XmlMDataStd_CommentDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMDataStd_CommentDriver::NewEmpty() const
-{
- return (new TDataStd_Comment());
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMDataStd_CommentDriver::Paste
- (const XmlObjMgt_Persistent& theSource,
- const Handle(TDF_Attribute)& theTarget,
- XmlObjMgt_RRelocationTable& ) const
-{
- TCollection_ExtendedString aString;
- if (XmlObjMgt::GetExtendedString (theSource, aString))
- {
- Handle(TDataStd_Comment)::DownCast(theTarget) -> Set (aString);
- return Standard_True;
- }
- myMessageDriver->Send("error retrieving ExtendedString for type TDataStd_Comment", Message_Fail);
- return Standard_False;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-void XmlMDataStd_CommentDriver::Paste (const Handle(TDF_Attribute)& theSource,
- XmlObjMgt_Persistent& theTarget,
- XmlObjMgt_SRelocationTable& ) const
-{
- Handle(TDataStd_Comment) aName= Handle(TDataStd_Comment)::DownCast(theSource);
- XmlObjMgt::SetExtendedString (theTarget, aName -> Get());
-}
+++ /dev/null
-// 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 _XmlMDataStd_CommentDriver_HeaderFile
-#define _XmlMDataStd_CommentDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataStd_CommentDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataStd_CommentDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMDataStd_CommentDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataStd_CommentDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataStd_CommentDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataStd_CommentDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_Directory.hxx>
-#include <TDF_Attribute.hxx>
-#include <XmlMDataStd_DirectoryDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_DirectoryDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMDataStd_DirectoryDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataStd_DirectoryDriver::XmlMDataStd_DirectoryDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
- Handle(TDF_Attribute) XmlMDataStd_DirectoryDriver::NewEmpty() const
-{
- return (new TDataStd_Directory());
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- Standard_Boolean XmlMDataStd_DirectoryDriver::Paste
- (const XmlObjMgt_Persistent&,
- const Handle(TDF_Attribute)&,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- void XmlMDataStd_DirectoryDriver::Paste (const Handle(TDF_Attribute)&,
- XmlObjMgt_Persistent&,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMDataStd_DirectoryDriver_HeaderFile
-#define _XmlMDataStd_DirectoryDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataStd_DirectoryDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataStd_DirectoryDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMDataStd_DirectoryDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataStd_DirectoryDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataStd_DirectoryDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataStd_DirectoryDriver_HeaderFile
--- /dev/null
+// 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 <Message_Messenger.hxx>
+#include <Standard_Type.hxx>
+#include <TDataStd_GenericEmpty.hxx>
+#include <TDF_Attribute.hxx>
+#include <XmlMDataStd_GenericEmptyDriver.hxx>
+#include <XmlObjMgt_Persistent.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_GenericEmptyDriver,XmlMDF_ADriver)
+
+//=======================================================================
+//function : XmlMDataStd_GenericEmptyDriver
+//purpose : Constructor
+//=======================================================================
+XmlMDataStd_GenericEmptyDriver::XmlMDataStd_GenericEmptyDriver(const Handle(Message_Messenger)& theMsgDriver)
+: XmlMDF_ADriver (theMsgDriver, NULL)
+{
+
+}
+
+//=======================================================================
+//function : NewEmpty
+//purpose :
+//=======================================================================
+Handle(TDF_Attribute) XmlMDataStd_GenericEmptyDriver::NewEmpty() const
+{
+ return Handle(TDF_Attribute)(); // this attribute can not be created
+}
+
+//=======================================================================
+//function : SourceType
+//purpose :
+//=======================================================================
+Handle(Standard_Type) XmlMDataStd_GenericEmptyDriver::SourceType() const
+{
+ return Standard_Type::Instance<TDataStd_GenericEmpty>();
+}
+
+//=======================================================================
+//function : Paste
+//purpose :
+//=======================================================================
+Standard_Boolean XmlMDataStd_GenericEmptyDriver::Paste(const XmlObjMgt_Persistent&,
+ const Handle(TDF_Attribute)&,
+ XmlObjMgt_RRelocationTable& ) const
+{
+ return Standard_True;
+}
+
+//=======================================================================
+//function : Paste
+//purpose :
+//=======================================================================
+void XmlMDataStd_GenericEmptyDriver::Paste(const Handle(TDF_Attribute)&,
+ XmlObjMgt_Persistent&,
+ XmlObjMgt_SRelocationTable& ) const
+{
+
+}
--- /dev/null
+// 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 _XmlMDataStd_GenericEmptyDriver_HeaderFile
+#define _XmlMDataStd_GenericEmptyDriver_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <XmlMDF_ADriver.hxx>
+#include <Standard_Boolean.hxx>
+#include <XmlObjMgt_RRelocationTable.hxx>
+#include <XmlObjMgt_SRelocationTable.hxx>
+class Message_Messenger;
+class TDF_Attribute;
+class XmlObjMgt_Persistent;
+
+
+class XmlMDataStd_GenericEmptyDriver;
+DEFINE_STANDARD_HANDLE(XmlMDataStd_GenericEmptyDriver, XmlMDF_ADriver)
+
+
+class XmlMDataStd_GenericEmptyDriver : public XmlMDF_ADriver
+{
+
+public:
+
+
+ Standard_EXPORT XmlMDataStd_GenericEmptyDriver(const Handle(Message_Messenger)& theMessageDriver);
+
+ Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
+
+ Standard_EXPORT virtual Handle(Standard_Type) SourceType() const Standard_OVERRIDE;
+
+ Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
+
+ Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
+
+
+
+
+ DEFINE_STANDARD_RTTIEXT(XmlMDataStd_GenericEmptyDriver,XmlMDF_ADriver)
+
+protected:
+
+
+
+
+private:
+
+
+
+
+};
+
+
+
+
+
+
+
+#endif // _XmlMDataStd_GenericEmptyDriver_HeaderFile
--- /dev/null
+// 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 <Message_Messenger.hxx>
+#include <Standard_Type.hxx>
+#include <TDataStd_GenericExtString.hxx>
+#include <TDF_Attribute.hxx>
+#include <XmlMDataStd_GenericExtStringDriver.hxx>
+#include <XmlObjMgt.hxx>
+#include <XmlObjMgt_Persistent.hxx>
+#include <XmlObjMgt_RRelocationTable.hxx>
+#include <XmlObjMgt_SRelocationTable.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_GenericExtStringDriver,XmlMDF_ADriver)
+IMPLEMENT_DOMSTRING (AttributeIDString, "nameguid")
+//=======================================================================
+//function : XmlMDataStd_GenericExtStringDriver
+//purpose : Constructor
+//=======================================================================
+XmlMDataStd_GenericExtStringDriver::XmlMDataStd_GenericExtStringDriver
+ (const Handle(Message_Messenger)& theMsgDriver)
+ : XmlMDF_ADriver (theMsgDriver, NULL)
+{}
+
+//=======================================================================
+//function : NewEmpty()
+//purpose :
+//=======================================================================
+Handle(TDF_Attribute) XmlMDataStd_GenericExtStringDriver::NewEmpty () const
+{
+ return Handle(TDF_Attribute)(); // this attribute can not be created
+}
+
+//=======================================================================
+//function : SourceType
+//purpose :
+//=======================================================================
+Handle(Standard_Type) XmlMDataStd_GenericExtStringDriver::SourceType() const
+{
+ return Standard_Type::Instance<TDataStd_GenericExtString>();
+}
+
+//=======================================================================
+//function : Paste()
+//purpose :
+//=======================================================================
+Standard_Boolean XmlMDataStd_GenericExtStringDriver::Paste
+ (const XmlObjMgt_Persistent& theSource,
+ const Handle(TDF_Attribute)& theTarget,
+ XmlObjMgt_RRelocationTable& ) const
+{
+ if(!theTarget.IsNull()) {
+ TCollection_ExtendedString aString;
+ if (XmlObjMgt::GetExtendedString (theSource, aString))
+ {
+ Handle(TDataStd_GenericExtString)::DownCast(theTarget)->Set (aString);
+ const XmlObjMgt_Element& anElement = theSource;
+ XmlObjMgt_DOMString aGUIDStr = anElement.getAttribute(::AttributeIDString());
+ if (aGUIDStr.Type() != XmlObjMgt_DOMString::LDOM_NULL) { // user defined GUID case
+ Standard_GUID aGUID = Standard_GUID(Standard_CString(aGUIDStr.GetString()));
+ Handle(TDataStd_GenericExtString)::DownCast(theTarget)->SetID(aGUID);
+ }
+ return Standard_True;
+ }
+ }
+ myMessageDriver->Send("error retrieving ExtendedString for type TDataStd_GenericExtString", Message_Fail);
+ return Standard_False;
+}
+
+//=======================================================================
+//function : Paste()
+//purpose : store
+//=======================================================================
+void XmlMDataStd_GenericExtStringDriver::Paste (const Handle(TDF_Attribute)& theSource,
+ XmlObjMgt_Persistent& theTarget,
+ XmlObjMgt_SRelocationTable& ) const
+{
+ Handle(TDataStd_GenericExtString) aStr = Handle(TDataStd_GenericExtString)::DownCast(theSource);
+ if (aStr.IsNull()) return;
+ XmlObjMgt::SetExtendedString (theTarget, aStr->Get());
+ //convert GUID
+ Standard_Character aGuidStr [Standard_GUID_SIZE_ALLOC];
+ Standard_PCharacter pGuidStr = aGuidStr;
+ aStr->ID().ToCString (pGuidStr);
+ theTarget.Element().setAttribute (::AttributeIDString(), aGuidStr);
+}
--- /dev/null
+// 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 _XmlMDataStd_GenericExtStringDriver_HeaderFile
+#define _XmlMDataStd_GenericExtStringDriver_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+
+#include <XmlMDF_ADriver.hxx>
+#include <Standard_Boolean.hxx>
+#include <XmlObjMgt_RRelocationTable.hxx>
+#include <XmlObjMgt_SRelocationTable.hxx>
+class Message_Messenger;
+class TDF_Attribute;
+class XmlObjMgt_Persistent;
+
+
+class XmlMDataStd_NameDriver;
+DEFINE_STANDARD_HANDLE(XmlMDataStd_GenericExtStringDriver, XmlMDF_ADriver)
+
+//! Attribute Driver.
+class XmlMDataStd_GenericExtStringDriver : public XmlMDF_ADriver
+{
+
+public:
+
+
+ Standard_EXPORT XmlMDataStd_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;
+
+ Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
+
+ Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
+
+
+
+
+ DEFINE_STANDARD_RTTIEXT(XmlMDataStd_GenericExtStringDriver,XmlMDF_ADriver)
+
+protected:
+
+
+
+
+private:
+
+
+
+
+};
+
+
+
+
+
+
+
+#endif // _XmlMDataStd_GenericExtStringDriver_HeaderFile
anInt->Set(aValue);
// attribute id
- Standard_GUID aGUID;
const XmlObjMgt_Element& anElement = theSource;
XmlObjMgt_DOMString aGUIDStr = anElement.getAttribute(::AttributeIDString());
- if (aGUIDStr.Type() == XmlObjMgt_DOMString::LDOM_NULL)
- aGUID = TDataStd_Integer::GetID(); //default case
- else
- aGUID = Standard_GUID(Standard_CString(aGUIDStr.GetString())); // user defined case
-
- Handle(TDataStd_Integer)::DownCast(theTarget)->SetID(aGUID);
+ if (aGUIDStr.Type() != XmlObjMgt_DOMString::LDOM_NULL)
+ {
+ const Standard_GUID aGUID (aGUIDStr.GetString()); // user defined case
+ Handle(TDataStd_Integer)::DownCast(theTarget)->SetID(aGUID);
+ }
return Standard_True;
}
+++ /dev/null
-// Created on: 2001-08-01
-// 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.
-
-
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_Name.hxx>
-#include <TDF_Attribute.hxx>
-#include <XmlMDataStd_NameDriver.hxx>
-#include <XmlObjMgt.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_NameDriver,XmlMDF_ADriver)
-IMPLEMENT_DOMSTRING (AttributeIDString, "nameguid")
-//=======================================================================
-//function : XmlMDataStd_NameDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataStd_NameDriver::XmlMDataStd_NameDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty()
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMDataStd_NameDriver::NewEmpty () const
-{
- return (new TDataStd_Name());
-}
-
-//=======================================================================
-//function : Paste()
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMDataStd_NameDriver::Paste
- (const XmlObjMgt_Persistent& theSource,
- const Handle(TDF_Attribute)& theTarget,
- XmlObjMgt_RRelocationTable& ) const
-{
- if(!theTarget.IsNull()) {
- TCollection_ExtendedString aString;
- if (XmlObjMgt::GetExtendedString (theSource, aString))
- {
- Handle(TDataStd_Name)::DownCast(theTarget) -> Set (aString);
- // attribute id
- Standard_GUID aGUID;
- const XmlObjMgt_Element& anElement = theSource;
- XmlObjMgt_DOMString aGUIDStr = anElement.getAttribute(::AttributeIDString());
- if (aGUIDStr.Type() == XmlObjMgt_DOMString::LDOM_NULL)
- aGUID = TDataStd_Name::GetID(); //default case
- else
- aGUID = Standard_GUID(Standard_CString(aGUIDStr.GetString())); // user defined case
-
- Handle(TDataStd_Name)::DownCast(theTarget)->SetID(aGUID);
- return Standard_True;
- }
- }
- myMessageDriver->Send("error retrieving ExtendedString for type TDataStd_Name", Message_Fail);
- return Standard_False;
-}
-
-//=======================================================================
-//function : Paste()
-//purpose : store
-//=======================================================================
-void XmlMDataStd_NameDriver::Paste (const Handle(TDF_Attribute)& theSource,
- XmlObjMgt_Persistent& theTarget,
- XmlObjMgt_SRelocationTable& ) const
-{
- Handle(TDataStd_Name) aName = Handle(TDataStd_Name)::DownCast(theSource);
- if (aName.IsNull()) return;
- XmlObjMgt::SetExtendedString (theTarget, aName -> Get());
- if(aName->ID() != TDataStd_Name::GetID()) {
- //convert GUID
- Standard_Character aGuidStr [Standard_GUID_SIZE_ALLOC];
- Standard_PCharacter pGuidStr = aGuidStr;
- aName->ID().ToCString (pGuidStr);
- theTarget.Element().setAttribute (::AttributeIDString(), aGuidStr);
- }
-}
+++ /dev/null
-// Created on: 2001-07-09
-// Created by: Julia DOROVSKIKH
-// Copyright (c) 2001-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _XmlMDataStd_NameDriver_HeaderFile
-#define _XmlMDataStd_NameDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataStd_NameDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataStd_NameDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMDataStd_NameDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataStd_NameDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataStd_NameDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataStd_NameDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_NoteBook.hxx>
-#include <TDF_Attribute.hxx>
-#include <XmlMDataStd_NoteBookDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_NoteBookDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMDataStd_NoteBookDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataStd_NoteBookDriver::XmlMDataStd_NoteBookDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
- Handle(TDF_Attribute) XmlMDataStd_NoteBookDriver::NewEmpty() const
-{
- return (new TDataStd_NoteBook());
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- Standard_Boolean XmlMDataStd_NoteBookDriver::Paste
- (const XmlObjMgt_Persistent&,
- const Handle(TDF_Attribute)&,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- void XmlMDataStd_NoteBookDriver::Paste (const Handle(TDF_Attribute)&,
- XmlObjMgt_Persistent&,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMDataStd_NoteBookDriver_HeaderFile
-#define _XmlMDataStd_NoteBookDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataStd_NoteBookDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataStd_NoteBookDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMDataStd_NoteBookDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataStd_NoteBookDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataStd_NoteBookDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataStd_NoteBookDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_Relation.hxx>
-#include <TDataStd_Variable.hxx>
-#include <TDF_Attribute.hxx>
-#include <TDF_ListIteratorOfAttributeList.hxx>
-#include <XmlMDataStd_RelationDriver.hxx>
-#include <XmlObjMgt.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_RelationDriver,XmlMDF_ADriver)
-IMPLEMENT_DOMSTRING (VariablesString, "variables")
-
-//=======================================================================
-//function : XmlMDataStd_RelationDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataStd_RelationDriver::XmlMDataStd_RelationDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMDataStd_RelationDriver::NewEmpty() const
-{
- return (new TDataStd_Relation());
-}
-
-//=======================================================================
-//function : Paste
-//purpose : persistent -> transient (retrieve)
-//=======================================================================
-Standard_Boolean XmlMDataStd_RelationDriver::Paste
- (const XmlObjMgt_Persistent& theSource,
- const Handle(TDF_Attribute)& theTarget,
- XmlObjMgt_RRelocationTable& theRelocTable) const
-{
- Handle(TDataStd_Relation) aC =
- Handle(TDataStd_Relation)::DownCast(theTarget);
- const XmlObjMgt_Element& anElem = theSource;
-
- Standard_Integer aNb;
- TCollection_ExtendedString aMsgString;
-
- // expression
- TCollection_ExtendedString aString;
- if (!XmlObjMgt::GetExtendedString (theSource, aString))
- {
- myMessageDriver->Send("error retrieving ExtendedString for type TDataStd_Relation", Message_Fail);
- return Standard_False;
- }
- aC->SetRelation(aString);
-
- // variables
- XmlObjMgt_DOMString aDOMStr = anElem.getAttribute(::VariablesString());
- if (aDOMStr != NULL)
- {
- Standard_CString aVs = Standard_CString(aDOMStr.GetString());
-
- // first variable
- if (!XmlObjMgt::GetInteger(aVs, aNb))
- {
- aMsgString = TCollection_ExtendedString
- ("XmlMDataStd_RelationDriver: Cannot retrieve reference on first variable from \"")
- + aDOMStr + "\"";
- myMessageDriver->Send (aMsgString, Message_Fail);
- return Standard_False;
- }
- Standard_Integer i = 1;
- while (aNb > 0)
- {
- Handle(TDF_Attribute) aV;
- if (theRelocTable.IsBound(aNb))
- aV = Handle(TDataStd_Variable)::DownCast(theRelocTable.Find(aNb));
- else
- {
- aV = new TDataStd_Variable;
- theRelocTable.Bind(aNb, aV);
- }
- aC->GetVariables().Append(aV);
-
- // next variable
- if (!XmlObjMgt::GetInteger(aVs, aNb)) aNb = 0;
- i++;
- }
- }
-
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose : transient -> persistent (store)
-//=======================================================================
-void XmlMDataStd_RelationDriver::Paste
- (const Handle(TDF_Attribute)& theSource,
- XmlObjMgt_Persistent& theTarget,
- XmlObjMgt_SRelocationTable& theRelocTable) const
-{
- Handle(TDataStd_Relation) aC =
- Handle(TDataStd_Relation)::DownCast(theSource);
- XmlObjMgt_Element& anElem = theTarget;
-
- Standard_Integer aNb;
- Handle(TDF_Attribute) TV;
-
- // expression
- XmlObjMgt::SetExtendedString (theTarget, aC->Name());
-
- // variables
- Standard_Integer nbvar = aC->GetVariables().Extent();
- if (nbvar >= 1)
- {
- TCollection_AsciiString aGsStr;
- TDF_ListIteratorOfAttributeList it;
- Standard_Integer index = 0;
- for (it.Initialize(aC->GetVariables()); it.More(); it.Next())
- {
- index++;
- TV = it.Value();
- if (!TV.IsNull())
- {
- aNb = theRelocTable.FindIndex(TV);
- if (aNb == 0)
- {
- aNb = theRelocTable.Add(TV);
- }
- aGsStr += TCollection_AsciiString(aNb) + " ";
- }
- else aGsStr += "0 ";
- }
- anElem.setAttribute(::VariablesString(), aGsStr.ToCString());
- }
-}
+++ /dev/null
-// 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 _XmlMDataStd_RelationDriver_HeaderFile
-#define _XmlMDataStd_RelationDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataStd_RelationDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataStd_RelationDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMDataStd_RelationDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataStd_RelationDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataStd_RelationDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataStd_RelationDriver_HeaderFile
+++ /dev/null
-// 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.
-
-
-#include <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataStd_Tick.hxx>
-#include <TDF_Attribute.hxx>
-#include <XmlMDataStd_TickDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataStd_TickDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMDataStd_TickDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataStd_TickDriver::XmlMDataStd_TickDriver(const Handle(Message_Messenger)& theMsgDriver)
-: XmlMDF_ADriver (theMsgDriver, NULL)
-{
-
-}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
- Handle(TDF_Attribute) XmlMDataStd_TickDriver::NewEmpty() const
-{
- return (new TDataStd_Tick());
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMDataStd_TickDriver::Paste(const XmlObjMgt_Persistent&,
- const Handle(TDF_Attribute)&,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-void XmlMDataStd_TickDriver::Paste(const Handle(TDF_Attribute)&,
- XmlObjMgt_Persistent&,
- XmlObjMgt_SRelocationTable& ) const
-{
-
-}
+++ /dev/null
-// 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 _XmlMDataStd_TickDriver_HeaderFile
-#define _XmlMDataStd_TickDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataStd_TickDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataStd_TickDriver, XmlMDF_ADriver)
-
-
-class XmlMDataStd_TickDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataStd_TickDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataStd_TickDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataStd_TickDriver_HeaderFile
XmlMDataXtd.cxx
XmlMDataXtd.hxx
-XmlMDataXtd_AxisDriver.cxx
-XmlMDataXtd_AxisDriver.hxx
XmlMDataXtd_ConstraintDriver.cxx
XmlMDataXtd_ConstraintDriver.hxx
XmlMDataXtd_GeometryDriver.cxx
XmlMDataXtd_GeometryDriver.hxx
XmlMDataXtd_PatternStdDriver.cxx
XmlMDataXtd_PatternStdDriver.hxx
-XmlMDataXtd_PlacementDriver.cxx
-XmlMDataXtd_PlacementDriver.hxx
-XmlMDataXtd_PlaneDriver.cxx
-XmlMDataXtd_PlaneDriver.hxx
-XmlMDataXtd_PointDriver.cxx
-XmlMDataXtd_PointDriver.hxx
-XmlMDataXtd_ShapeDriver.cxx
-XmlMDataXtd_ShapeDriver.hxx
XmlMDataXtd_PositionDriver.hxx
XmlMDataXtd_PositionDriver.cxx
XmlMDataXtd_PresentationDriver.hxx
#include <Message_Messenger.hxx>
#include <XmlMDataXtd.hxx>
-#include <XmlMDataXtd_AxisDriver.hxx>
#include <XmlMDataXtd_ConstraintDriver.hxx>
#include <XmlMDataXtd_GeometryDriver.hxx>
#include <XmlMDataXtd_PatternStdDriver.hxx>
-#include <XmlMDataXtd_PlacementDriver.hxx>
-#include <XmlMDataXtd_PlaneDriver.hxx>
-#include <XmlMDataXtd_PointDriver.hxx>
-#include <XmlMDataXtd_ShapeDriver.hxx>
#include <XmlMDataXtd_TriangulationDriver.hxx>
#include <XmlMDF_ADriverTable.hxx>
void XmlMDataXtd::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable,
const Handle(Message_Messenger)& anMsgDrv)
{
- aDriverTable->AddDriver(new XmlMDataXtd_ShapeDriver (anMsgDrv));
- aDriverTable->AddDriver(new XmlMDataXtd_PointDriver (anMsgDrv));
- aDriverTable->AddDriver(new XmlMDataXtd_AxisDriver (anMsgDrv));
- aDriverTable->AddDriver(new XmlMDataXtd_PlaneDriver (anMsgDrv));
aDriverTable->AddDriver(new XmlMDataXtd_GeometryDriver (anMsgDrv));
aDriverTable->AddDriver(new XmlMDataXtd_ConstraintDriver (anMsgDrv));
- aDriverTable->AddDriver(new XmlMDataXtd_PlacementDriver (anMsgDrv));
aDriverTable->AddDriver(new XmlMDataXtd_PatternStdDriver (anMsgDrv));
aDriverTable->AddDriver(new XmlMDataXtd_TriangulationDriver (anMsgDrv));
#include <Standard_Integer.hxx>
class XmlMDF_ADriverTable;
class Message_Messenger;
-class XmlMDataXtd_AxisDriver;
-class XmlMDataXtd_ShapeDriver;
-class XmlMDataXtd_PointDriver;
-class XmlMDataXtd_PlaneDriver;
class XmlMDataXtd_GeometryDriver;
class XmlMDataXtd_ConstraintDriver;
-class XmlMDataXtd_PlacementDriver;
class XmlMDataXtd_PatternStdDriver;
class XmlMDataXtd_TriangulationDriver;
-friend class XmlMDataXtd_AxisDriver;
-friend class XmlMDataXtd_ShapeDriver;
-friend class XmlMDataXtd_PointDriver;
-friend class XmlMDataXtd_PlaneDriver;
friend class XmlMDataXtd_GeometryDriver;
friend class XmlMDataXtd_ConstraintDriver;
-friend class XmlMDataXtd_PlacementDriver;
friend class XmlMDataXtd_PatternStdDriver;
friend class XmlMDataXtd_TriangulationDriver;
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataXtd_Axis.hxx>
-#include <TDF_Attribute.hxx>
-#include <XmlMDataXtd_AxisDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataXtd_AxisDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMDataXtd_AxisDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataXtd_AxisDriver::XmlMDataXtd_AxisDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
- Handle(TDF_Attribute) XmlMDataXtd_AxisDriver::NewEmpty() const
-{
- return (new TDataXtd_Axis());
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- Standard_Boolean XmlMDataXtd_AxisDriver::Paste
- (const XmlObjMgt_Persistent&,
- const Handle(TDF_Attribute)&,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- void XmlMDataXtd_AxisDriver::Paste (const Handle(TDF_Attribute)&,
- XmlObjMgt_Persistent&,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMDataXtd_AxisDriver_HeaderFile
-#define _XmlMDataXtd_AxisDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataXtd_AxisDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataXtd_AxisDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMDataXtd_AxisDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataXtd_AxisDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataXtd_AxisDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataXtd_AxisDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataXtd_Placement.hxx>
-#include <TDF_Attribute.hxx>
-#include <XmlMDataXtd_PlacementDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataXtd_PlacementDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMDataXtd_PlacementDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataXtd_PlacementDriver::XmlMDataXtd_PlacementDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
- Handle(TDF_Attribute) XmlMDataXtd_PlacementDriver::NewEmpty() const
-{
- return (new TDataXtd_Placement());
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- Standard_Boolean XmlMDataXtd_PlacementDriver::Paste
- (const XmlObjMgt_Persistent&,
- const Handle(TDF_Attribute)&,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- void XmlMDataXtd_PlacementDriver::Paste (const Handle(TDF_Attribute)&,
- XmlObjMgt_Persistent&,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMDataXtd_PlacementDriver_HeaderFile
-#define _XmlMDataXtd_PlacementDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataXtd_PlacementDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataXtd_PlacementDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMDataXtd_PlacementDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataXtd_PlacementDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataXtd_PlacementDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataXtd_PlacementDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataXtd_Plane.hxx>
-#include <TDF_Attribute.hxx>
-#include <XmlMDataXtd_PlaneDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataXtd_PlaneDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMDataXtd_PlaneDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataXtd_PlaneDriver::XmlMDataXtd_PlaneDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
- Handle(TDF_Attribute) XmlMDataXtd_PlaneDriver::NewEmpty() const
-{
- return (new TDataXtd_Plane());
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- Standard_Boolean XmlMDataXtd_PlaneDriver::Paste
- (const XmlObjMgt_Persistent&,
- const Handle(TDF_Attribute)&,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- void XmlMDataXtd_PlaneDriver::Paste (const Handle(TDF_Attribute)&,
- XmlObjMgt_Persistent&,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMDataXtd_PlaneDriver_HeaderFile
-#define _XmlMDataXtd_PlaneDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataXtd_PlaneDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataXtd_PlaneDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMDataXtd_PlaneDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataXtd_PlaneDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataXtd_PlaneDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataXtd_PlaneDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataXtd_Point.hxx>
-#include <TDF_Attribute.hxx>
-#include <XmlMDataXtd_PointDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataXtd_PointDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMDataXtd_PointDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataXtd_PointDriver::XmlMDataXtd_PointDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
- Handle(TDF_Attribute) XmlMDataXtd_PointDriver::NewEmpty() const
-{
- return (new TDataXtd_Point());
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- Standard_Boolean XmlMDataXtd_PointDriver::Paste
- (const XmlObjMgt_Persistent&,
- const Handle(TDF_Attribute)&,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- void XmlMDataXtd_PointDriver::Paste (const Handle(TDF_Attribute)&,
- XmlObjMgt_Persistent&,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMDataXtd_PointDriver_HeaderFile
-#define _XmlMDataXtd_PointDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataXtd_PointDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataXtd_PointDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMDataXtd_PointDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataXtd_PointDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataXtd_PointDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataXtd_PointDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDataXtd_Shape.hxx>
-#include <TDF_Attribute.hxx>
-#include <XmlMDataXtd_ShapeDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMDataXtd_ShapeDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMDataXtd_ShapeDriver
-//purpose : Constructor
-//=======================================================================
-XmlMDataXtd_ShapeDriver::XmlMDataXtd_ShapeDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
- Handle(TDF_Attribute) XmlMDataXtd_ShapeDriver::NewEmpty() const
-{
- return (new TDataXtd_Shape());
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- Standard_Boolean XmlMDataXtd_ShapeDriver::Paste
- (const XmlObjMgt_Persistent&,
- const Handle(TDF_Attribute)&,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose :
-//=======================================================================
-
- void XmlMDataXtd_ShapeDriver::Paste (const Handle(TDF_Attribute)&,
- XmlObjMgt_Persistent&,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMDataXtd_ShapeDriver_HeaderFile
-#define _XmlMDataXtd_ShapeDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMDataXtd_ShapeDriver;
-DEFINE_STANDARD_HANDLE(XmlMDataXtd_ShapeDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMDataXtd_ShapeDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMDataXtd_ShapeDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMDataXtd_ShapeDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMDataXtd_ShapeDriver_HeaderFile
XmlMXCAFDoc.hxx
XmlMXCAFDoc_AssemblyItemRefDriver.cxx
XmlMXCAFDoc_AssemblyItemRefDriver.hxx
-XmlMXCAFDoc_AreaDriver.cxx
-XmlMXCAFDoc_AreaDriver.hxx
XmlMXCAFDoc_CentroidDriver.cxx
XmlMXCAFDoc_CentroidDriver.hxx
-XmlMXCAFDoc_ClippingPlaneToolDriver.cxx
-XmlMXCAFDoc_ClippingPlaneToolDriver.hxx
XmlMXCAFDoc_ColorDriver.cxx
XmlMXCAFDoc_ColorDriver.hxx
-XmlMXCAFDoc_ColorToolDriver.cxx
-XmlMXCAFDoc_ColorToolDriver.hxx
XmlMXCAFDoc_DatumDriver.cxx
XmlMXCAFDoc_DatumDriver.hxx
XmlMXCAFDoc_DimTolDriver.cxx
XmlMXCAFDoc_DimTolDriver.hxx
-XmlMXCAFDoc_DimTolToolDriver.cxx
-XmlMXCAFDoc_DimTolToolDriver.hxx
-XmlMXCAFDoc_DocumentToolDriver.cxx
-XmlMXCAFDoc_DocumentToolDriver.hxx
XmlMXCAFDoc_GraphNodeDriver.cxx
XmlMXCAFDoc_GraphNodeDriver.hxx
-XmlMXCAFDoc_LayerToolDriver.cxx
-XmlMXCAFDoc_LayerToolDriver.hxx
XmlMXCAFDoc_LocationDriver.cxx
XmlMXCAFDoc_LocationDriver.hxx
XmlMXCAFDoc_LocationDriver.lxx
XmlMXCAFDoc_MaterialDriver.cxx
XmlMXCAFDoc_MaterialDriver.hxx
-XmlMXCAFDoc_MaterialToolDriver.cxx
-XmlMXCAFDoc_MaterialToolDriver.hxx
XmlMXCAFDoc_NoteDriver.cxx
XmlMXCAFDoc_NoteDriver.hxx
-XmlMXCAFDoc_NoteBalloonDriver.cxx
-XmlMXCAFDoc_NoteBalloonDriver.hxx
XmlMXCAFDoc_NoteCommentDriver.cxx
XmlMXCAFDoc_NoteCommentDriver.hxx
XmlMXCAFDoc_NoteBinDataDriver.cxx
XmlMXCAFDoc_NoteBinDataDriver.hxx
-XmlMXCAFDoc_NotesToolDriver.cxx
-XmlMXCAFDoc_NotesToolDriver.hxx
-XmlMXCAFDoc_ShapeToolDriver.cxx
-XmlMXCAFDoc_ShapeToolDriver.hxx
-XmlMXCAFDoc_ViewToolDriver.cxx
-XmlMXCAFDoc_ViewToolDriver.hxx
XmlMXCAFDoc_VisMaterialDriver.cxx
XmlMXCAFDoc_VisMaterialDriver.hxx
XmlMXCAFDoc_VisMaterialToolDriver.cxx
XmlMXCAFDoc_VisMaterialToolDriver.hxx
-XmlMXCAFDoc_VolumeDriver.cxx
-XmlMXCAFDoc_VolumeDriver.hxx
#include <XmlMNaming_NamedShapeDriver.hxx>
#include <XmlMXCAFDoc.hxx>
#include <XmlMXCAFDoc_AssemblyItemRefDriver.hxx>
-#include <XmlMXCAFDoc_AreaDriver.hxx>
#include <XmlMXCAFDoc_CentroidDriver.hxx>
-#include <XmlMXCAFDoc_ClippingPlaneToolDriver.hxx>
#include <XmlMXCAFDoc_ColorDriver.hxx>
-#include <XmlMXCAFDoc_ColorToolDriver.hxx>
#include <XmlMXCAFDoc_DatumDriver.hxx>
#include <XmlMXCAFDoc_DimTolDriver.hxx>
-#include <XmlMXCAFDoc_DimTolToolDriver.hxx>
-#include <XmlMXCAFDoc_DocumentToolDriver.hxx>
#include <XmlMXCAFDoc_GraphNodeDriver.hxx>
-#include <XmlMXCAFDoc_LayerToolDriver.hxx>
#include <XmlMXCAFDoc_LocationDriver.hxx>
#include <XmlMXCAFDoc_MaterialDriver.hxx>
#include <XmlMXCAFDoc_VisMaterialDriver.hxx>
-#include <XmlMXCAFDoc_NotesToolDriver.hxx>
-#include <XmlMXCAFDoc_NoteBalloonDriver.hxx>
#include <XmlMXCAFDoc_NoteCommentDriver.hxx>
#include <XmlMXCAFDoc_NoteBinDataDriver.hxx>
-#include <XmlMXCAFDoc_MaterialToolDriver.hxx>
#include <XmlMXCAFDoc_VisMaterialToolDriver.hxx>
-#include <XmlMXCAFDoc_ShapeToolDriver.hxx>
-#include <XmlMXCAFDoc_ViewToolDriver.hxx>
-#include <XmlMXCAFDoc_VolumeDriver.hxx>
//=======================================================================
//function : AddDrivers
void XmlMXCAFDoc::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable,
const Handle(Message_Messenger)& anMsgDrv)
{
- aDriverTable -> AddDriver (new XmlMXCAFDoc_AreaDriver (anMsgDrv));
aDriverTable -> AddDriver (new XmlMXCAFDoc_CentroidDriver (anMsgDrv));
aDriverTable -> AddDriver (new XmlMXCAFDoc_ColorDriver (anMsgDrv));
aDriverTable -> AddDriver (new XmlMXCAFDoc_GraphNodeDriver (anMsgDrv));
aDriverTable -> AddDriver (aLocationDriver);
aDriverTable -> AddDriver (new XmlMXCAFDoc_AssemblyItemRefDriver(anMsgDrv));
- aDriverTable -> AddDriver (new XmlMXCAFDoc_VolumeDriver (anMsgDrv));
aDriverTable -> AddDriver (new XmlMXCAFDoc_DatumDriver (anMsgDrv));
aDriverTable -> AddDriver (new XmlMXCAFDoc_DimTolDriver (anMsgDrv));
aDriverTable -> AddDriver (new XmlMXCAFDoc_MaterialDriver (anMsgDrv));
aDriverTable -> AddDriver (new XmlMXCAFDoc_VisMaterialDriver(anMsgDrv));
- aDriverTable -> AddDriver (new XmlMXCAFDoc_NoteBalloonDriver(anMsgDrv));
aDriverTable -> AddDriver (new XmlMXCAFDoc_NoteCommentDriver(anMsgDrv));
aDriverTable -> AddDriver (new XmlMXCAFDoc_NoteBinDataDriver(anMsgDrv));
-
- aDriverTable -> AddDriver (new XmlMXCAFDoc_ColorToolDriver (anMsgDrv));
- aDriverTable -> AddDriver (new XmlMXCAFDoc_DocumentToolDriver (anMsgDrv));
- aDriverTable -> AddDriver (new XmlMXCAFDoc_LayerToolDriver (anMsgDrv));
- aDriverTable -> AddDriver (new XmlMXCAFDoc_ShapeToolDriver (anMsgDrv));
- aDriverTable -> AddDriver (new XmlMXCAFDoc_DimTolToolDriver (anMsgDrv));
- aDriverTable -> AddDriver (new XmlMXCAFDoc_MaterialToolDriver (anMsgDrv));
aDriverTable -> AddDriver (new XmlMXCAFDoc_VisMaterialToolDriver (anMsgDrv));
- aDriverTable -> AddDriver (new XmlMXCAFDoc_NotesToolDriver (anMsgDrv));
- aDriverTable -> AddDriver (new XmlMXCAFDoc_ViewToolDriver (anMsgDrv));
- aDriverTable -> AddDriver (new XmlMXCAFDoc_ClippingPlaneToolDriver(anMsgDrv));
}
class XmlMDF_ADriverTable;
class Message_Messenger;
-class XmlMXCAFDoc_AreaDriver;
class XmlMXCAFDoc_CentroidDriver;
class XmlMXCAFDoc_ColorDriver;
class XmlMXCAFDoc_GraphNodeDriver;
class XmlMXCAFDoc_LocationDriver;
-class XmlMXCAFDoc_VolumeDriver;
class XmlMXCAFDoc_DatumDriver;
class XmlMXCAFDoc_DimTolDriver;
class XmlMXCAFDoc_MaterialDriver;
-class XmlMXCAFDoc_NotesToolDriver;
class XmlMXCAFDoc_NoteDriver;
class XmlMXCAFDoc_NoteCommentDriver;
class XmlMXCAFDoc_NoteBinDataDriver;
-class XmlMXCAFDoc_ClippingPlaneToolDriver;
-class XmlMXCAFDoc_ColorToolDriver;
-class XmlMXCAFDoc_DocumentToolDriver;
-class XmlMXCAFDoc_LayerToolDriver;
-class XmlMXCAFDoc_ShapeToolDriver;
-class XmlMXCAFDoc_DimTolToolDriver;
-class XmlMXCAFDoc_MaterialToolDriver;
-class XmlMXCAFDoc_ViewToolDriver;
//! Storage and Retrieval drivers for modelling attributes.
-friend class XmlMXCAFDoc_AreaDriver;
friend class XmlMXCAFDoc_CentroidDriver;
friend class XmlMXCAFDoc_ColorDriver;
friend class XmlMXCAFDoc_GraphNodeDriver;
friend class XmlMXCAFDoc_LocationDriver;
-friend class XmlMXCAFDoc_VolumeDriver;
friend class XmlMXCAFDoc_DatumDriver;
friend class XmlMXCAFDoc_DimTolDriver;
friend class XmlMXCAFDoc_MaterialDriver;
-friend class XmlMXCAFDoc_ClippingPlaneToolDriver;
-friend class XmlMXCAFDoc_ColorToolDriver;
-friend class XmlMXCAFDoc_DocumentToolDriver;
-friend class XmlMXCAFDoc_LayerToolDriver;
-friend class XmlMXCAFDoc_ShapeToolDriver;
-friend class XmlMXCAFDoc_DimTolToolDriver;
-friend class XmlMXCAFDoc_MaterialToolDriver;
-friend class XmlMXCAFDoc_ViewToolDriver;
};
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_Area.hxx>
-#include <XmlMXCAFDoc_AreaDriver.hxx>
-#include <XmlObjMgt.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_AreaDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMXCAFDoc_AreaDriver
-//purpose : Constructor
-//=======================================================================
-XmlMXCAFDoc_AreaDriver::XmlMXCAFDoc_AreaDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, "xcaf", "Area")
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMXCAFDoc_AreaDriver::NewEmpty() const
-{
- return (new XCAFDoc_Area());
-}
-
-//=======================================================================
-//function : Paste
-//purpose : persistent -> transient (retrieve)
-//=======================================================================
-Standard_Boolean XmlMXCAFDoc_AreaDriver::Paste
- (const XmlObjMgt_Persistent& theSource,
- const Handle(TDF_Attribute)& theTarget,
- XmlObjMgt_RRelocationTable& ) const
-{
- Standard_Real aValue;
- XmlObjMgt_DOMString aRealStr = XmlObjMgt::GetStringValue (theSource);
-
- if (XmlObjMgt::GetReal(aRealStr, aValue) == Standard_False) {
- TCollection_ExtendedString aMessageString =
- TCollection_ExtendedString("Cannot retrieve Area attribute from \"")
- + aRealStr + "\"";
- myMessageDriver->Send (aMessageString, Message_Fail);
- return Standard_False;
- }
-
- Handle(XCAFDoc_Area) anInt = Handle(XCAFDoc_Area)::DownCast(theTarget);
- anInt->Set(aValue);
-
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose : transient -> persistent (store)
-//=======================================================================
-void XmlMXCAFDoc_AreaDriver::Paste (const Handle(TDF_Attribute)& theSource,
- XmlObjMgt_Persistent& theTarget,
- XmlObjMgt_SRelocationTable& ) const
-{
- Handle(XCAFDoc_Area) anInt = Handle(XCAFDoc_Area)::DownCast(theSource);
- TCollection_AsciiString aValueStr (anInt->Get());
- XmlObjMgt::SetStringValue (theTarget, aValueStr.ToCString());
-}
+++ /dev/null
-// Created on: 2001-09-11
-// Created by: Julia DOROVSKIKH
-// Copyright (c) 2001-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _XmlMXCAFDoc_AreaDriver_HeaderFile
-#define _XmlMXCAFDoc_AreaDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMXCAFDoc_AreaDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_AreaDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_AreaDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMXCAFDoc_AreaDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_AreaDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMXCAFDoc_AreaDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_ClippingPlaneTool.hxx>
-#include <XmlMXCAFDoc_ClippingPlaneToolDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_ClippingPlaneToolDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_ClippingPlaneToolDriver::XmlMXCAFDoc_ClippingPlaneToolDriver
- (const Handle(Message_Messenger)& theMsgDriver)
-: XmlMDF_ADriver (theMsgDriver, "xcaf", "ClippingPlaneTool")
-{
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMXCAFDoc_ClippingPlaneToolDriver::NewEmpty() const
-{
- return new XCAFDoc_ClippingPlaneTool();
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMXCAFDoc_ClippingPlaneToolDriver::Paste(const XmlObjMgt_Persistent& ,
- const Handle(TDF_Attribute)& ,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-void XmlMXCAFDoc_ClippingPlaneToolDriver::Paste(const Handle(TDF_Attribute)& ,
- XmlObjMgt_Persistent& ,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMXCAFDoc_ClippingPlaneToolDriver_HeaderFile
-#define _XmlMXCAFDoc_ClippingPlaneToolDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMXCAFDoc_ClippingPlaneToolDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_ClippingPlaneToolDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_ClippingPlaneToolDriver : public XmlMDF_ADriver
-{
-public:
-
- Standard_EXPORT XmlMXCAFDoc_ClippingPlaneToolDriver(const Handle(Message_Messenger)& theMsgDriver);
-
- Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT virtual Standard_Boolean Paste(const XmlObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT virtual void Paste(const Handle(TDF_Attribute)& theSource, XmlObjMgt_Persistent& theTarget, XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_ClippingPlaneToolDriver, XmlMDF_ADriver)
-
-};
-#endif // _XmlMXCAFDoc_ClippingPlaneToolDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_ColorTool.hxx>
-#include <XmlMXCAFDoc_ColorToolDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_ColorToolDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_ColorToolDriver::XmlMXCAFDoc_ColorToolDriver(const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, "xcaf", "ColorTool")
-{
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- Handle(TDF_Attribute) XmlMXCAFDoc_ColorToolDriver::NewEmpty() const
-{
- return new XCAFDoc_ColorTool();
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMXCAFDoc_ColorToolDriver::Paste(const XmlObjMgt_Persistent& ,
- const Handle(TDF_Attribute)& ,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-void XmlMXCAFDoc_ColorToolDriver::Paste(const Handle(TDF_Attribute)& ,
- XmlObjMgt_Persistent& ,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
-
+++ /dev/null
-// Created on: 2005-05-17
-// Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
-// 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 _XmlMXCAFDoc_ColorToolDriver_HeaderFile
-#define _XmlMXCAFDoc_ColorToolDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMXCAFDoc_ColorToolDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_ColorToolDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_ColorToolDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMXCAFDoc_ColorToolDriver(const Handle(Message_Messenger)& theMsgDriver);
-
- Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, XmlObjMgt_Persistent& theTarget, XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_ColorToolDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMXCAFDoc_ColorToolDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_DimTolTool.hxx>
-#include <XmlMXCAFDoc_DimTolToolDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_DimTolToolDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_DimTolToolDriver::XmlMXCAFDoc_DimTolToolDriver
- (const Handle(Message_Messenger)& theMsgDriver)
-: XmlMDF_ADriver (theMsgDriver, "xcaf", "DimTolTool")
-{
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMXCAFDoc_DimTolToolDriver::NewEmpty() const
-{
- return new XCAFDoc_DimTolTool();
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMXCAFDoc_DimTolToolDriver::Paste(const XmlObjMgt_Persistent& ,
- const Handle(TDF_Attribute)& ,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-void XmlMXCAFDoc_DimTolToolDriver::Paste(const Handle(TDF_Attribute)& ,
- XmlObjMgt_Persistent& ,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMXCAFDoc_DimTolToolDriver_HeaderFile
-#define _XmlMXCAFDoc_DimTolToolDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMXCAFDoc_DimTolToolDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_DimTolToolDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_DimTolToolDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMXCAFDoc_DimTolToolDriver(const Handle(Message_Messenger)& theMsgDriver);
-
- Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, XmlObjMgt_Persistent& theTarget, XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_DimTolToolDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMXCAFDoc_DimTolToolDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_DocumentTool.hxx>
-#include <XmlMXCAFDoc_DocumentToolDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_DocumentToolDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_DocumentToolDriver::XmlMXCAFDoc_DocumentToolDriver(const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, "xcaf", "DocumentTool")
-{
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- Handle(TDF_Attribute) XmlMXCAFDoc_DocumentToolDriver::NewEmpty() const {
- return new XCAFDoc_DocumentTool();
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
- Standard_Boolean XmlMXCAFDoc_DocumentToolDriver::Paste(const XmlObjMgt_Persistent& /*theSource*/,
- const Handle(TDF_Attribute)& theTarget,
- XmlObjMgt_RRelocationTable& /*theRelocTable*/) const
-{
- Handle(XCAFDoc_DocumentTool) T = Handle(XCAFDoc_DocumentTool)::DownCast(theTarget);
- T->Init();
- return Standard_True;
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-void XmlMXCAFDoc_DocumentToolDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/,
- XmlObjMgt_Persistent& /*theTarget*/,
- XmlObjMgt_SRelocationTable& /*theRelocTable*/) const
-{
-}
-
+++ /dev/null
-// Created on: 2005-05-17
-// Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
-// 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 _XmlMXCAFDoc_DocumentToolDriver_HeaderFile
-#define _XmlMXCAFDoc_DocumentToolDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMXCAFDoc_DocumentToolDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_DocumentToolDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_DocumentToolDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMXCAFDoc_DocumentToolDriver(const Handle(Message_Messenger)& theMsgDriver);
-
- Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, XmlObjMgt_Persistent& theTarget, XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_DocumentToolDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMXCAFDoc_DocumentToolDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_LayerTool.hxx>
-#include <XmlMXCAFDoc_LayerToolDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_LayerToolDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_LayerToolDriver::XmlMXCAFDoc_LayerToolDriver(const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, "xcaf", "LayerTool")
-{
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMXCAFDoc_LayerToolDriver::NewEmpty() const {
- return new XCAFDoc_LayerTool();
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMXCAFDoc_LayerToolDriver::Paste(const XmlObjMgt_Persistent& /*theSource*/,
- const Handle(TDF_Attribute)& /*theTarget*/,
- XmlObjMgt_RRelocationTable& /*theRelocTable*/) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-void XmlMXCAFDoc_LayerToolDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/,
- XmlObjMgt_Persistent& /*theTarget*/,
- XmlObjMgt_SRelocationTable& /*theRelocTable*/) const
-{
-}
-
-
+++ /dev/null
-// Created on: 2005-05-17
-// Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
-// 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 _XmlMXCAFDoc_LayerToolDriver_HeaderFile
-#define _XmlMXCAFDoc_LayerToolDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMXCAFDoc_LayerToolDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_LayerToolDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_LayerToolDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMXCAFDoc_LayerToolDriver(const Handle(Message_Messenger)& theMsgDriver);
-
- Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, XmlObjMgt_Persistent& theTarget, XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_LayerToolDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMXCAFDoc_LayerToolDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_MaterialTool.hxx>
-#include <XmlMXCAFDoc_MaterialToolDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_MaterialToolDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_MaterialToolDriver::XmlMXCAFDoc_MaterialToolDriver
- (const Handle(Message_Messenger)& theMsgDriver)
-: XmlMDF_ADriver (theMsgDriver, "xcaf", "MaterialTool")
-{
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMXCAFDoc_MaterialToolDriver::NewEmpty() const
-{
- return new XCAFDoc_MaterialTool();
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMXCAFDoc_MaterialToolDriver::Paste(const XmlObjMgt_Persistent& ,
- const Handle(TDF_Attribute)& ,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-void XmlMXCAFDoc_MaterialToolDriver::Paste(const Handle(TDF_Attribute)& ,
- XmlObjMgt_Persistent& ,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMXCAFDoc_MaterialToolDriver_HeaderFile
-#define _XmlMXCAFDoc_MaterialToolDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMXCAFDoc_MaterialToolDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_MaterialToolDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_MaterialToolDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMXCAFDoc_MaterialToolDriver(const Handle(Message_Messenger)& theMsgDriver);
-
- Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, XmlObjMgt_Persistent& theTarget, XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_MaterialToolDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMXCAFDoc_MaterialToolDriver_HeaderFile
+++ /dev/null
-// Created on: 2017-08-10
-// Created by: Sergey NIKONOV
-// Copyright (c) 2008-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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_NoteBalloon.hxx>
-#include <XmlMXCAFDoc_NoteBalloonDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_NoteBalloonDriver, XmlMXCAFDoc_NoteCommentDriver)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_NoteBalloonDriver::XmlMXCAFDoc_NoteBalloonDriver(const Handle(Message_Messenger)& theMsgDriver)
- : XmlMXCAFDoc_NoteCommentDriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_NoteBalloon)->Name())
-{
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMXCAFDoc_NoteBalloonDriver::NewEmpty() const
-{
- return new XCAFDoc_NoteBalloon();
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_NoteBalloonDriver::XmlMXCAFDoc_NoteBalloonDriver(const Handle(Message_Messenger)& theMsgDriver,
- Standard_CString theName)
- : XmlMXCAFDoc_NoteCommentDriver(theMsgDriver, theName)
-{
-
-}
+++ /dev/null
-// Created on: 2017-08-10
-// Created by: Sergey NIKONOV
-// Copyright (c) 2008-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 _XmlMXCAFDoc_NoteBalloonDriver_HeaderFile
-#define _XmlMXCAFDoc_NoteBalloonDriver_HeaderFile
-
-#include <XmlMXCAFDoc_NoteCommentDriver.hxx>
-
-class XmlMXCAFDoc_NoteBalloonDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_NoteBalloonDriver, XmlMXCAFDoc_NoteCommentDriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_NoteBalloonDriver : public XmlMXCAFDoc_NoteCommentDriver
-{
-public:
-
- Standard_EXPORT XmlMXCAFDoc_NoteBalloonDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_NoteBalloonDriver, XmlMXCAFDoc_NoteCommentDriver)
-
-protected:
-
- XmlMXCAFDoc_NoteBalloonDriver(const Handle(Message_Messenger)& theMsgDriver,
- Standard_CString theName);
-
-};
-
-#endif // _XmlMXCAFDoc_NoteBalloonDriver_HeaderFile
+++ /dev/null
-// Created on: 2017-02-14
-// Created by: Sergey NIKONOV
-// Copyright (c) 2008-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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_NotesTool.hxx>
-#include <XmlMXCAFDoc_NotesToolDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_NotesToolDriver, XmlMDF_ADriver)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_NotesToolDriver::XmlMXCAFDoc_NotesToolDriver(const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_NotesTool)->Name())
-{
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMXCAFDoc_NotesToolDriver::NewEmpty() const
-{
- return new XCAFDoc_NotesTool();
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMXCAFDoc_NotesToolDriver::Paste(const XmlObjMgt_Persistent& /*theSource*/,
- const Handle(TDF_Attribute)& /*theTarget*/,
- XmlObjMgt_RRelocationTable& /*theRelocTable*/) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-void XmlMXCAFDoc_NotesToolDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/,
- XmlObjMgt_Persistent& /*theTarget*/,
- XmlObjMgt_SRelocationTable& /*theRelocTable*/) const
-{
-}
+++ /dev/null
-// Created on: 2017-02-14
-// Created by: Sergey NIKONOV
-// Copyright (c) 2008-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 _XmlMXCAFDoc_NotesToolDriver_HeaderFile
-#define _XmlMXCAFDoc_NotesToolDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-class XmlMXCAFDoc_NotesToolDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_NotesToolDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_NotesToolDriver : public XmlMDF_ADriver
-{
-public:
-
- Standard_EXPORT XmlMXCAFDoc_NotesToolDriver(const Handle(Message_Messenger)& theMsgDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste(const XmlObjMgt_Persistent& theSource,
- const Handle(TDF_Attribute)& theTarget,
- XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste(const Handle(TDF_Attribute)& theSource,
- XmlObjMgt_Persistent& theTarget,
- XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_NotesToolDriver, XmlMDF_ADriver)
-
-};
-
-#endif // _XmlMXCAFDoc_NotesToolDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_ShapeTool.hxx>
-#include <XmlMXCAFDoc_ShapeToolDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_ShapeToolDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_ShapeToolDriver::XmlMXCAFDoc_ShapeToolDriver(const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, "xcaf", "ShapeTool")
-{
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMXCAFDoc_ShapeToolDriver::NewEmpty() const {
- return new XCAFDoc_ShapeTool();
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMXCAFDoc_ShapeToolDriver::Paste(const XmlObjMgt_Persistent& /*theSource*/,
- const Handle(TDF_Attribute)& /*theTarget*/,
- XmlObjMgt_RRelocationTable& /*theRelocTable*/) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-void XmlMXCAFDoc_ShapeToolDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/,
- XmlObjMgt_Persistent& /*theTarget*/,
- XmlObjMgt_SRelocationTable& /*theRelocTable*/) const
-{
-}
-
+++ /dev/null
-// Created on: 2005-05-17
-// Created by: Eugeny NAPALKOV <eugeny.napalkov@opencascade.com>
-// 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 _XmlMXCAFDoc_ShapeToolDriver_HeaderFile
-#define _XmlMXCAFDoc_ShapeToolDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMXCAFDoc_ShapeToolDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_ShapeToolDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_ShapeToolDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMXCAFDoc_ShapeToolDriver(const Handle(Message_Messenger)& theMsgDriver);
-
- Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, XmlObjMgt_Persistent& theTarget, XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_ShapeToolDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMXCAFDoc_ShapeToolDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_ViewTool.hxx>
-#include <XmlMXCAFDoc_ViewToolDriver.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_ViewToolDriver, XmlMDF_ADriver)
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-XmlMXCAFDoc_ViewToolDriver::XmlMXCAFDoc_ViewToolDriver
- (const Handle(Message_Messenger)& theMsgDriver)
-: XmlMDF_ADriver (theMsgDriver, "xcaf", "ViewTool")
-{
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMXCAFDoc_ViewToolDriver::NewEmpty() const
-{
- return new XCAFDoc_ViewTool();
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-Standard_Boolean XmlMXCAFDoc_ViewToolDriver::Paste(const XmlObjMgt_Persistent& ,
- const Handle(TDF_Attribute)& ,
- XmlObjMgt_RRelocationTable& ) const
-{
- return Standard_True;
-}
-
-//=======================================================================
-//function :
-//purpose :
-//=======================================================================
-void XmlMXCAFDoc_ViewToolDriver::Paste(const Handle(TDF_Attribute)& ,
- XmlObjMgt_Persistent& ,
- XmlObjMgt_SRelocationTable& ) const
-{
-}
+++ /dev/null
-// 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 _XmlMXCAFDoc_ViewToolDriver_HeaderFile
-#define _XmlMXCAFDoc_ViewToolDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMXCAFDoc_ViewToolDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_ViewToolDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_ViewToolDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMXCAFDoc_ViewToolDriver(const Handle(Message_Messenger)& theMsgDriver);
-
- Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, XmlObjMgt_Persistent& theTarget, XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_ViewToolDriver, XmlMDF_ADriver)
-};
-
-#endif // _XmlMXCAFDoc_ViewToolDriver_HeaderFile
+++ /dev/null
-// 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 <Message_Messenger.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <XCAFDoc_Volume.hxx>
-#include <XmlMXCAFDoc_VolumeDriver.hxx>
-#include <XmlObjMgt.hxx>
-#include <XmlObjMgt_Persistent.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_VolumeDriver,XmlMDF_ADriver)
-
-//=======================================================================
-//function : XmlMXCAFDoc_VolumeDriver
-//purpose : Constructor
-//=======================================================================
-XmlMXCAFDoc_VolumeDriver::XmlMXCAFDoc_VolumeDriver
- (const Handle(Message_Messenger)& theMsgDriver)
- : XmlMDF_ADriver (theMsgDriver, "xcaf", "Volume")
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-Handle(TDF_Attribute) XmlMXCAFDoc_VolumeDriver::NewEmpty() const
-{
- return (new XCAFDoc_Volume());
-}
-
-//=======================================================================
-//function : Paste
-//purpose : persistent -> transient (retrieve)
-//=======================================================================
-Standard_Boolean XmlMXCAFDoc_VolumeDriver::Paste
- (const XmlObjMgt_Persistent& theSource,
- const Handle(TDF_Attribute)& theTarget,
- XmlObjMgt_RRelocationTable& ) const
-{
- Standard_Real aValue;
- XmlObjMgt_DOMString aRealStr = XmlObjMgt::GetStringValue (theSource);
-
- if (XmlObjMgt::GetReal(aRealStr, aValue) == Standard_False) {
- TCollection_ExtendedString aMessageString =
- TCollection_ExtendedString("Cannot retrieve Volume attribute from \"")
- + aRealStr + "\"";
- myMessageDriver->Send (aMessageString, Message_Fail);
- return Standard_False;
- }
-
- Handle(XCAFDoc_Volume) anInt = Handle(XCAFDoc_Volume)::DownCast(theTarget);
- anInt->Set(aValue);
-
- return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose : transient -> persistent (store)
-//=======================================================================
-void XmlMXCAFDoc_VolumeDriver::Paste (const Handle(TDF_Attribute)& theSource,
- XmlObjMgt_Persistent& theTarget,
- XmlObjMgt_SRelocationTable& ) const
-{
- Handle(XCAFDoc_Volume) anInt = Handle(XCAFDoc_Volume)::DownCast(theSource);
- TCollection_AsciiString aValueStr (anInt->Get());
- XmlObjMgt::SetStringValue (theTarget, aValueStr.ToCString());
-}
+++ /dev/null
-// Created on: 2001-09-11
-// Created by: Julia DOROVSKIKH
-// Copyright (c) 2001-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _XmlMXCAFDoc_VolumeDriver_HeaderFile
-#define _XmlMXCAFDoc_VolumeDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <XmlMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <XmlObjMgt_RRelocationTable.hxx>
-#include <XmlObjMgt_SRelocationTable.hxx>
-class Message_Messenger;
-class TDF_Attribute;
-class XmlObjMgt_Persistent;
-
-
-class XmlMXCAFDoc_VolumeDriver;
-DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_VolumeDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMXCAFDoc_VolumeDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMXCAFDoc_VolumeDriver(const Handle(Message_Messenger)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
-
-
-
-
- DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_VolumeDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMXCAFDoc_VolumeDriver_HeaderFile
--- /dev/null
+#INTERFACE CAF
+# Basic attributes
+#
+# Testing attributes: TDataStd_Tick TDataStd_Directory TDataStd_NoteBook TDataXtd_Axis TDataXtd_Placement TDataXtd_Plane TDataXtd_Point TDataXtd_Shape
+#
+# Testing command: SetEmptyAttribute
+# BinOcaf format open/save with these attributes
+
+Label D 0:2
+
+set IsGood 1
+
+NewCommand D
+SetEmptyAttribute D 0:2 TDataStd_Tick
+SetEmptyAttribute D 0:2 TDataStd_Directory
+SetEmptyAttribute D 0:2 TDataStd_NoteBook
+SetEmptyAttribute D 0:2 TDataXtd_Axis
+SetEmptyAttribute D 0:2 TDataXtd_Placement
+SetEmptyAttribute D 0:2 TDataXtd_Plane
+SetEmptyAttribute D 0:2 TDataXtd_Point
+SetEmptyAttribute D 0:2 TDataXtd_Shape
+CommitCommand D
+
+set aLen1 [llength [Attributes D 0:2]]
+if { ${aLen1} != 8 } {
+ set IsGood 0
+ puts "Not all attributes were added aLen1=${aLen1}"
+}
+
+NewCommand D
+# check forget attribute by its type
+ForgetAtt D 0:2 TDataXtd_Point
+CommitCommand D
+
+set aLen2 [llength [Attributes D 0:2]]
+if { ${aLen2} != ${aLen1} - 1 } {
+ set IsGood 0
+ puts "TDataXtd_Point was not removed from the label"
+}
+
+Undo D
+Undo D
+
+set aLen3 [llength [Attributes D 0:2]]
+if { ${aLen3} != 0 } {
+ set IsGood 0
+ puts "Not all attributes were removed on Undo aLen3=${aLen3}"
+}
+
+Redo D
+
+set aLen4 [llength [Attributes D 0:2]]
+if { ${aLen4} != 8 } {
+ set IsGood 0
+ puts "Not all attributes were restored by Redo aLen4=${aLen4}"
+}
+
+set aFile ${imagedir}/caf001-F4.cbf
+file delete ${aFile}
+SaveAs D ${aFile}
+if { ![file exists ${aFile}] } {
+ puts "There is not ${aFile} file; SaveAs command: Error"
+ return
+}
+Close D
+
+Open ${aFile} DD
+
+Label DD 0:2
+
+set aLen5 [llength [Attributes DD 0:2]]
+if { ${aLen5} != 8 } {
+ set IsGood 0
+ puts "Not all attributes were restored on Open aLen4=${aLen5}"
+}
+
+if { ${IsGood} == 0} {
+ puts "Set empty attributes: Error"
+} else {
+ puts "Set empty attributes: OK"
+}
--- /dev/null
+#INTERFACE CAF
+# Basic attributes
+#
+# Testing attributes: TDataStd_Tick TDataStd_Directory TDataStd_NoteBook TDataXtd_Axis TDataXtd_Placement TDataXtd_Plane TDataXtd_Point TDataXtd_Shape
+#
+# Testing command: SetEmptyAttribute
+# XmlOcaf format open/save with these attributes
+
+NewDocument DX XmlOcaf
+UndoLimit DX 2
+
+Label DX 0:2
+
+set IsGood 1
+
+NewCommand DX
+SetEmptyAttribute DX 0:2 TDataXtd_Axis
+SetEmptyAttribute DX 0:2 TDataXtd_Placement
+SetEmptyAttribute DX 0:2 TDataXtd_Plane
+SetEmptyAttribute DX 0:2 TDataXtd_Point
+SetEmptyAttribute DX 0:2 TDataXtd_Shape
+SetEmptyAttribute DX 0:2 TDataStd_Tick
+SetEmptyAttribute DX 0:2 TDataStd_Directory
+SetEmptyAttribute DX 0:2 TDataStd_NoteBook
+CommitCommand DX
+
+set aLen1 [llength [Attributes DX 0:2]]
+if { ${aLen1} != 8 } {
+ set IsGood 0
+ puts "Not all attributes were added aLen1=${aLen1}"
+}
+
+Undo DX
+
+set aLen2 [llength [Attributes DX 0:2]]
+if { ${aLen2} != 0 } {
+ set IsGood 0
+ puts "Not all attributes were removed on Undo aLen2=${aLen2}"
+}
+
+Redo DX
+
+set aLen3 [llength [Attributes DX 0:2]]
+if { ${aLen3} != 8 } {
+ set IsGood 0
+ puts "Not all attributes were restored by Redo aLen3=${aLen3}"
+}
+
+set aFile ${imagedir}/caf001-F5.xml
+file delete ${aFile}
+SaveAs DX ${aFile}
+if { ![file exists ${aFile}] } {
+ puts "There is not ${aFile} file; SaveAs command: Error"
+ return
+}
+Close DX
+
+Open ${aFile} DDX
+
+set aLen4 [llength [Attributes DDX 0:2]]
+if { ${aLen4} != 8 } {
+ set IsGood 0
+ puts "Not all attributes were restored on Open aLen4=${aLen4}"
+}
+
+if { ${IsGood} == 0} {
+ puts "Set empty attributes: Error"
+} else {
+ puts "Set empty attributes: OK"
+}