]> OCCT Git - occt-copy.git/commitdiff
XCAF: notes tool and note attributes added
authorsnn <snn@opencascade.com>
Fri, 10 Feb 2017 12:48:36 +0000 (15:48 +0300)
committersnn <snn@opencascade.com>
Thu, 16 Feb 2017 06:34:53 +0000 (09:34 +0300)
13 files changed:
src/BinMXCAFDoc/BinMXCAFDoc.cxx
src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.cxx [new file with mode: 0644]
src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.hxx [new file with mode: 0644]
src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.cxx [new file with mode: 0644]
src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.hxx [new file with mode: 0644]
src/BinMXCAFDoc/FILES
src/XCAFDoc/FILES
src/XCAFDoc/XCAFDoc_DocumentTool.cxx
src/XCAFDoc/XCAFDoc_DocumentTool.hxx
src/XCAFDoc/XCAFDoc_Note.cxx [new file with mode: 0644]
src/XCAFDoc/XCAFDoc_Note.hxx [new file with mode: 0644]
src/XCAFDoc/XCAFDoc_NotesTool.cxx [new file with mode: 0644]
src/XCAFDoc/XCAFDoc_NotesTool.hxx [new file with mode: 0644]

index c0ba1d8d57663e9019e9907c38b3ae1eabd70747..5e9c340dc66f88024910fcb4e7dc51759e653832 100644 (file)
@@ -32,6 +32,8 @@
 #include <BinMXCAFDoc_LocationDriver.hxx>
 #include <BinMXCAFDoc_MaterialDriver.hxx>
 #include <BinMXCAFDoc_MaterialToolDriver.hxx>
+#include <BinMXCAFDoc_NoteDriver.hxx>
+#include <BinMXCAFDoc_NotesToolDriver.hxx>
 #include <BinMXCAFDoc_ShapeToolDriver.hxx>
 #include <BinMXCAFDoc_ViewDriver.hxx>
 #include <BinMXCAFDoc_ViewToolDriver.hxx>
@@ -44,7 +46,8 @@
 //purpose  : 
 //=======================================================================
 void BinMXCAFDoc::AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable,
-                            const Handle(CDM_MessageDriver)& theMsgDrv) {
+                                              const Handle(CDM_MessageDriver)&   theMsgDrv) 
+{
   theDriverTable->AddDriver( new BinMXCAFDoc_AreaDriver     (theMsgDrv));
   theDriverTable->AddDriver( new BinMXCAFDoc_CentroidDriver (theMsgDrv));
   theDriverTable->AddDriver( new BinMXCAFDoc_ColorDriver    (theMsgDrv));
@@ -63,13 +66,14 @@ void BinMXCAFDoc::AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable,
   }
   
   theDriverTable->AddDriver( aLocationDriver);
-  theDriverTable->AddDriver( new BinMXCAFDoc_VolumeDriver   (theMsgDrv));
-  theDriverTable->AddDriver( new BinMXCAFDoc_DatumDriver    (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_ViewDriver     (theMsgDrv));
+  theDriverTable->AddDriver( new BinMXCAFDoc_DimensionDriver   (theMsgDrv));
+  theDriverTable->AddDriver( new BinMXCAFDoc_DimTolDriver      (theMsgDrv));
+  theDriverTable->AddDriver( new BinMXCAFDoc_MaterialDriver    (theMsgDrv));
+  theDriverTable->AddDriver( new BinMXCAFDoc_NoteDriver        (theMsgDrv));
+  theDriverTable->AddDriver(new BinMXCAFDoc_ViewDriver         (theMsgDrv));
 
   theDriverTable->AddDriver( new BinMXCAFDoc_ColorToolDriver   (theMsgDrv));
   theDriverTable->AddDriver( new BinMXCAFDoc_DocumentToolDriver(theMsgDrv));
@@ -77,5 +81,6 @@ void BinMXCAFDoc::AddDrivers(const Handle(BinMDF_ADriverTable)& theDriverTable,
   theDriverTable->AddDriver( new BinMXCAFDoc_ShapeToolDriver   (theMsgDrv));
   theDriverTable->AddDriver( new BinMXCAFDoc_DimTolToolDriver  (theMsgDrv));
   theDriverTable->AddDriver( new BinMXCAFDoc_MaterialToolDriver(theMsgDrv));
+  theDriverTable->AddDriver( new BinMXCAFDoc_NotesToolDriver   (theMsgDrv));
   theDriverTable->AddDriver( new BinMXCAFDoc_ViewToolDriver    (theMsgDrv));
 }
diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.cxx
new file mode 100644 (file)
index 0000000..c950ecc
--- /dev/null
@@ -0,0 +1,62 @@
+// 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 <CDM_MessageDriver.hxx>
+#include <Standard_Type.hxx>
+#include <TDF_Attribute.hxx>
+#include <BinMXCAFDoc_NoteDriver.hxx>
+#include <XCAFDoc_Note.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(BinMXCAFDoc_NoteDriver, BinMDF_ADriver)
+
+//=======================================================================
+//function :
+//purpose  : 
+//=======================================================================
+BinMXCAFDoc_NoteDriver::BinMXCAFDoc_NoteDriver(const Handle(CDM_MessageDriver)& theMsgDriver)
+  : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_Note)->Name())
+{
+}
+
+//=======================================================================
+//function :
+//purpose  : 
+//=======================================================================
+Handle(TDF_Attribute) BinMXCAFDoc_NoteDriver::NewEmpty() const
+{
+  return new XCAFDoc_Note();
+}
+
+//=======================================================================
+//function :
+//purpose  : 
+//=======================================================================
+Standard_Boolean BinMXCAFDoc_NoteDriver::Paste(const BinObjMgt_Persistent&  /*theSource*/,
+                                               const Handle(TDF_Attribute)& /*theTarget*/,
+                                               BinObjMgt_RRelocationTable&  /*theRelocTable*/) const
+{
+  return Standard_True;
+}
+
+//=======================================================================
+//function :
+//purpose  : 
+//=======================================================================
+void BinMXCAFDoc_NoteDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/,
+                                                                BinObjMgt_Persistent&        /*theTarget*/,
+                                                                BinObjMgt_SRelocationTable&  /*theRelocTable*/) const
+{
+}
diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_NoteDriver.hxx
new file mode 100644 (file)
index 0000000..18b9416
--- /dev/null
@@ -0,0 +1,54 @@
+// 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_NoteDriver_HeaderFile
+#define _BinMXCAFDoc_NoteDriver_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 CDM_MessageDriver;
+class TDF_Attribute;
+class BinObjMgt_Persistent;
+
+class BinMXCAFDoc_NoteDriver;
+DEFINE_STANDARD_HANDLE(BinMXCAFDoc_NoteDriver, BinMDF_ADriver)
+
+class BinMXCAFDoc_NoteDriver : public BinMDF_ADriver
+{
+public:
+  
+  Standard_EXPORT BinMXCAFDoc_NoteDriver(const Handle(CDM_MessageDriver)& 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_NoteDriver, BinMDF_ADriver)
+
+};
+
+#endif // _BinMXCAFDoc_NoteDriver_HeaderFile
diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.cxx b/src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.cxx
new file mode 100644 (file)
index 0000000..a3979e2
--- /dev/null
@@ -0,0 +1,62 @@
+// 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 <CDM_MessageDriver.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(CDM_MessageDriver)& theMsgDriver)
+  : BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(XCAFDoc_NotesTool)->Name())
+{
+}
+
+//=======================================================================
+//function :
+//purpose  : 
+//=======================================================================
+Handle(TDF_Attribute) BinMXCAFDoc_NotesToolDriver::NewEmpty() const 
+{
+  return new XCAFDoc_NotesTool();
+}
+
+//=======================================================================
+//function :
+//purpose  : 
+//=======================================================================
+Standard_Boolean BinMXCAFDoc_NotesToolDriver::Paste(const BinObjMgt_Persistent&  /*theSource*/,
+                                                    const Handle(TDF_Attribute)& /*theTarget*/,
+                                                    BinObjMgt_RRelocationTable&  /*theRelocTable*/) const
+{
+  return Standard_True;
+}
+
+//=======================================================================
+//function :
+//purpose  : 
+//=======================================================================
+void BinMXCAFDoc_NotesToolDriver::Paste(const Handle(TDF_Attribute)& /*theSource*/,
+                                                                     BinObjMgt_Persistent&        /*theTarget*/,
+                                                                     BinObjMgt_SRelocationTable&  /*theRelocTable*/) const
+{
+}
diff --git a/src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.hxx b/src/BinMXCAFDoc/BinMXCAFDoc_NotesToolDriver.hxx
new file mode 100644 (file)
index 0000000..3a8fa0a
--- /dev/null
@@ -0,0 +1,54 @@
+// 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 CDM_MessageDriver;
+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(CDM_MessageDriver)& 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
index fe29702e24a06a055f374bd206e907ebe472acce..aa1a13087e3f41a9957007c77ea1725f985b9a24 100644 (file)
@@ -33,6 +33,10 @@ BinMXCAFDoc_MaterialDriver.cxx
 BinMXCAFDoc_MaterialDriver.hxx
 BinMXCAFDoc_MaterialToolDriver.cxx
 BinMXCAFDoc_MaterialToolDriver.hxx
+BinMXCAFDoc_NoteDriver.cxx
+BinMXCAFDoc_NoteDriver.hxx
+BinMXCAFDoc_NotesToolDriver.cxx
+BinMXCAFDoc_NotesToolDriver.hxx
 BinMXCAFDoc_ShapeToolDriver.cxx
 BinMXCAFDoc_ShapeToolDriver.hxx
 BinMXCAFDoc_ViewDriver.cxx
index a30837c6fed1ac812fc8b4ae5b3644e4b38633d8..820b8ef31fbdcb7c65b9ea0a0b8fb2be19c985b2 100755 (executable)
@@ -40,6 +40,10 @@ XCAFDoc_Material.cxx
 XCAFDoc_Material.hxx
 XCAFDoc_MaterialTool.cxx
 XCAFDoc_MaterialTool.hxx
+XCAFDoc_Note.cxx
+XCAFDoc_Note.hxx
+XCAFDoc_NotesTool.cxx
+XCAFDoc_NotesTool.hxx
 XCAFDoc_ShapeMapTool.cxx
 XCAFDoc_ShapeMapTool.hxx
 XCAFDoc_ShapeTool.cxx
index fdaa9c5448124b48e1fdb702a4748d3487dcd40b..5614c690f0454b96193bd4ca64cd59bae37bf36b 100644 (file)
@@ -30,6 +30,7 @@
 #include <XCAFDoc_DocumentTool.hxx>
 #include <XCAFDoc_LayerTool.hxx>
 #include <XCAFDoc_MaterialTool.hxx>
+#include <XCAFDoc_NotesTool.hxx>
 #include <XCAFDoc_ShapeTool.hxx>
 #include <XCAFDoc_ViewTool.hxx>
 
@@ -83,6 +84,7 @@ Handle(XCAFDoc_DocumentTool) XCAFDoc_DocumentTool::Set(const TDF_Label& L,
     XCAFDoc_LayerTool::Set(LayersLabel(L));
     XCAFDoc_DimTolTool::Set(DGTsLabel(L));
     XCAFDoc_MaterialTool::Set(MaterialsLabel(L));
+    XCAFDoc_NotesTool::Set(NotesLabel(L));
     XCAFDoc_ViewTool::Set(ViewsLabel(L));
     XCAFDoc_ClippingPlaneTool::Set(ClippingPlanesLabel(L));
   }
@@ -211,6 +213,18 @@ TDF_Label XCAFDoc_DocumentTool::ClippingPlanesLabel(const TDF_Label& acces)
   return L;
 }
 
+//=======================================================================
+//function : NotesLabel
+//purpose  : 
+//=======================================================================
+
+TDF_Label XCAFDoc_DocumentTool::NotesLabel(const TDF_Label& acces)
+{
+  TDF_Label L = DocLabel(acces).FindChild(9, Standard_True);
+  TDataStd_Name::Set(L, "Notes");
+  return L;
+}
+
 //=======================================================================
 //function : ShapeTool
 //purpose  : 
@@ -285,6 +299,16 @@ Handle(XCAFDoc_ClippingPlaneTool) XCAFDoc_DocumentTool::ClippingPlaneTool(const
   return XCAFDoc_ClippingPlaneTool::Set(ClippingPlanesLabel(acces));
 }
 
+//=======================================================================
+//function : ClippingPlaneTool
+//purpose  : 
+//=======================================================================
+
+Handle(XCAFDoc_NotesTool) XCAFDoc_DocumentTool::NotesTool(const TDF_Label& acces)
+{
+  return XCAFDoc_NotesTool::Set(NotesLabel(acces));
+}
+
 //=======================================================================
 //function : ID
 //purpose  : 
index 5f467a4f4f330fea08f22d8da9b92638c82547c4..51a793fccae602971cf962617c045fe723398e47 100644 (file)
@@ -30,6 +30,7 @@ class XCAFDoc_ClippingPlaneTool;
 class XCAFDoc_LayerTool;
 class XCAFDoc_DimTolTool;
 class XCAFDoc_MaterialTool;
+class XCAFDoc_NotesTool;
 class XCAFDoc_ViewTool;
 class TDF_Attribute;
 class TDF_RelocationTable;
@@ -84,7 +85,10 @@ public:
   
   //! Returns sub-label of DocLabel() with tag 8.
   Standard_EXPORT static TDF_Label ClippingPlanesLabel(const TDF_Label& acces);
-  
+
+  //! Returns sub-label of DocLabel() with tag 9.
+  Standard_EXPORT static TDF_Label NotesLabel(const TDF_Label& acces);
+
   //! Creates (if it does not exist) ShapeTool attribute on ShapesLabel().
   Standard_EXPORT static Handle(XCAFDoc_ShapeTool) ShapeTool (const TDF_Label& acces);
   
@@ -105,7 +109,10 @@ public:
   
   //! Creates (if it does not exist) ClippingPlaneTool attribute on ClippingPlanesLabel().
   Standard_EXPORT static Handle(XCAFDoc_ClippingPlaneTool) ClippingPlaneTool(const TDF_Label& acces);
-  
+
+  //! Creates (if it does not exist) NotesTool attribute on NotesLabel().
+  Standard_EXPORT static Handle(XCAFDoc_NotesTool) NotesTool(const TDF_Label& acces);
+
   Standard_EXPORT XCAFDoc_DocumentTool();
   
   //! to be called when reading this attribute from file
diff --git a/src/XCAFDoc/XCAFDoc_Note.cxx b/src/XCAFDoc/XCAFDoc_Note.cxx
new file mode 100644 (file)
index 0000000..f912eea
--- /dev/null
@@ -0,0 +1,60 @@
+// Created on: 2017-02-10
+// Created by: Sergey NIKONOV
+// Copyright (c) 2000-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 <Standard_GUID.hxx>
+#include <TDF_Label.hxx>
+#include <XCAFDoc_Note.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_Note, TDF_Attribute)
+
+const Standard_GUID& XCAFDoc_Note::GetID()
+{
+  static Standard_GUID s_ID("FDC0AF06-C4AC-468a-ACFB-4C9388C76D9E");
+  return s_ID;
+}
+
+Handle(XCAFDoc_Note) XCAFDoc_Note::Set(const TDF_Label& theLabel)
+{
+  Handle(XCAFDoc_Note) aTool;
+  if (!theLabel.FindAttribute(XCAFDoc_Note::GetID(), aTool))
+  {
+    aTool = new XCAFDoc_Note();
+    theLabel.AddAttribute(aTool);
+  }
+  return aTool;
+}
+
+XCAFDoc_Note::XCAFDoc_Note()
+{
+}
+
+const Standard_GUID& XCAFDoc_Note::ID() const
+{
+  return GetID();
+}
+
+Handle(TDF_Attribute) XCAFDoc_Note::NewEmpty() const
+{
+  return new XCAFDoc_Note();
+}
+
+void XCAFDoc_Note::Restore(const Handle(TDF_Attribute)& /*theAttr*/)
+{
+}
+
+void XCAFDoc_Note::Paste(const Handle(TDF_Attribute)&       /*theAttrInto*/,
+                         const Handle(TDF_RelocationTable)& /*theRT*/) const
+{
+}
diff --git a/src/XCAFDoc/XCAFDoc_Note.hxx b/src/XCAFDoc/XCAFDoc_Note.hxx
new file mode 100644 (file)
index 0000000..c23e29c
--- /dev/null
@@ -0,0 +1,56 @@
+// Created on: 2017-02-10
+// Created by: Sergey NIKONOV
+// Copyright (c) 2000-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 _XCAFDoc_Note_HeaderFile
+#define _XCAFDoc_Note_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+#include <TDF_Attribute.hxx>
+
+class Standard_GUID;
+class TDF_RelocationTable;
+
+class XCAFDoc_Note;
+DEFINE_STANDARD_HANDLE(XCAFDoc_Note, TDF_Attribute)
+
+class XCAFDoc_Note : public TDF_Attribute
+{
+public:
+
+  DEFINE_STANDARD_RTTIEXT(XCAFDoc_Note, TDF_Attribute)
+
+    Standard_EXPORT static const Standard_GUID& GetID();
+
+  //! Create (if not exist) NotesTool from XCAFDoc on <L>.
+  Standard_EXPORT static Handle(XCAFDoc_Note) Set(const TDF_Label& theLabel);
+
+  //! Creates an empty tool
+  Standard_EXPORT XCAFDoc_Note();
+
+public:
+
+  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;
+
+};
+
+#endif // _XCAFDoc_Note_HeaderFile
diff --git a/src/XCAFDoc/XCAFDoc_NotesTool.cxx b/src/XCAFDoc/XCAFDoc_NotesTool.cxx
new file mode 100644 (file)
index 0000000..df087fc
--- /dev/null
@@ -0,0 +1,60 @@
+// Created on: 2017-02-10
+// Created by: Sergey NIKONOV
+// Copyright (c) 2000-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 <Standard_GUID.hxx>
+#include <TDF_Label.hxx>
+#include <XCAFDoc_NotesTool.hxx>
+
+IMPLEMENT_STANDARD_RTTIEXT(XCAFDoc_NotesTool, TDF_Attribute)
+
+const Standard_GUID& XCAFDoc_NotesTool::GetID()
+{
+  static Standard_GUID s_ID("8F8174B1-6125-47a0-B357-61BD2D89380C");
+  return s_ID;
+}
+
+Handle(XCAFDoc_NotesTool) XCAFDoc_NotesTool::Set(const TDF_Label& theLabel)
+{
+  Handle(XCAFDoc_NotesTool) aTool;
+  if (!theLabel.FindAttribute(XCAFDoc_NotesTool::GetID(), aTool)) 
+  {
+    aTool = new XCAFDoc_NotesTool();
+    theLabel.AddAttribute(aTool);
+  }
+  return aTool;
+}
+
+XCAFDoc_NotesTool::XCAFDoc_NotesTool()
+{
+}
+
+const Standard_GUID& XCAFDoc_NotesTool::ID() const
+{
+  return GetID();
+}
+
+Handle(TDF_Attribute) XCAFDoc_NotesTool::NewEmpty() const
+{
+  return new XCAFDoc_NotesTool();
+}
+
+void XCAFDoc_NotesTool::Restore(const Handle(TDF_Attribute)& /*theAttr*/)
+{
+}
+
+void XCAFDoc_NotesTool::Paste(const Handle(TDF_Attribute)&       /*theAttrInto*/,
+                              const Handle(TDF_RelocationTable)& /*theRT*/) const
+{
+}
diff --git a/src/XCAFDoc/XCAFDoc_NotesTool.hxx b/src/XCAFDoc/XCAFDoc_NotesTool.hxx
new file mode 100644 (file)
index 0000000..78521cb
--- /dev/null
@@ -0,0 +1,56 @@
+// Created on: 2017-02-10
+// Created by: Sergey NIKONOV
+// Copyright (c) 2000-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 _XCAFDoc_NotesTool_HeaderFile
+#define _XCAFDoc_NotesTool_HeaderFile
+
+#include <Standard.hxx>
+#include <Standard_Type.hxx>
+#include <TDF_Attribute.hxx>
+
+class Standard_GUID;
+class TDF_RelocationTable;
+
+class XCAFDoc_NotesTool;
+DEFINE_STANDARD_HANDLE(XCAFDoc_NotesTool, TDF_Attribute)
+
+class XCAFDoc_NotesTool : public TDF_Attribute
+{
+public:
+
+  DEFINE_STANDARD_RTTIEXT(XCAFDoc_NotesTool, TDF_Attribute)
+
+  Standard_EXPORT static const Standard_GUID& GetID();
+
+  //! Create (if not exist) NotesTool from XCAFDoc on <L>.
+  Standard_EXPORT static Handle(XCAFDoc_NotesTool) Set(const TDF_Label& theLabel);
+
+  //! Creates an empty tool
+  Standard_EXPORT XCAFDoc_NotesTool();
+
+public:
+
+  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;
+
+};
+
+#endif // _XCAFDoc_NotesTool_HeaderFile