]> OCCT Git - occt-copy.git/commitdiff
TKCAF has been separated on two parts:
authorazn <azn@opencascade.com>
Thu, 28 May 2015 13:02:31 +0000 (16:02 +0300)
committerstv <stv@opencascade.com>
Wed, 3 Jun 2015 14:08:44 +0000 (17:08 +0300)
- The sources which independent from visualization are remained in this TK.
- Visualisation dependencies are moved to the new TK: TKVCAF.
- Some dependencies which are connected with persistent objects (from other TK) have been corrected.

88 files changed:
adm/UDLIST
src/BinDrivers/BinDrivers.cxx
src/BinLDrivers/BinLDrivers.cxx
src/BinMDataXtd/BinMDataXtd.cdl
src/BinMDataXtd/BinMDataXtd.cxx
src/BinMDataXtd/BinMDataXtd_PositionDriver.cdl [new file with mode: 0644]
src/BinMDataXtd/BinMDataXtd_PositionDriver.cxx [new file with mode: 0644]
src/BinMDataXtd/BinMDataXtd_PresentationDriver.cdl [new file with mode: 0644]
src/BinMDataXtd/BinMDataXtd_PresentationDriver.cxx [new file with mode: 0644]
src/BinMPrsStd/BinMPrsStd.cdl [deleted file]
src/BinMPrsStd/BinMPrsStd.cxx [deleted file]
src/BinMPrsStd/BinMPrsStd_AISPresentationDriver.cdl [deleted file]
src/BinMPrsStd/BinMPrsStd_AISPresentationDriver.cxx [deleted file]
src/BinMPrsStd/BinMPrsStd_PositionDriver.cdl [deleted file]
src/BinMPrsStd/BinMPrsStd_PositionDriver.cxx [deleted file]
src/MDataXtd/MDataXtd.cdl
src/MDataXtd/MDataXtd.cxx
src/MDataXtd/MDataXtd_PositionRetrievalDriver.cdl [new file with mode: 0644]
src/MDataXtd/MDataXtd_PositionRetrievalDriver.cxx [new file with mode: 0644]
src/MDataXtd/MDataXtd_PositionStorageDriver.cdl [new file with mode: 0644]
src/MDataXtd/MDataXtd_PositionStorageDriver.cxx [new file with mode: 0644]
src/MDataXtd/MDataXtd_PresentationRetrievalDriver.cdl [new file with mode: 0644]
src/MDataXtd/MDataXtd_PresentationRetrievalDriver.cxx [new file with mode: 0644]
src/MDataXtd/MDataXtd_PresentationRetrievalDriver_1.cdl [new file with mode: 0644]
src/MDataXtd/MDataXtd_PresentationRetrievalDriver_1.cxx [new file with mode: 0644]
src/MDataXtd/MDataXtd_PresentationStorageDriver.cdl [new file with mode: 0644]
src/MDataXtd/MDataXtd_PresentationStorageDriver.cxx [new file with mode: 0644]
src/MPrsStd/MPrsStd.cdl [deleted file]
src/MPrsStd/MPrsStd.cxx [deleted file]
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver.cdl [deleted file]
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver.cxx [deleted file]
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver_1.cdl [deleted file]
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver_1.cxx [deleted file]
src/MPrsStd/MPrsStd_AISPresentationStorageDriver.cdl [deleted file]
src/MPrsStd/MPrsStd_AISPresentationStorageDriver.cxx [deleted file]
src/MPrsStd/MPrsStd_PositionRetrievalDriver.cdl [deleted file]
src/MPrsStd/MPrsStd_PositionRetrievalDriver.cxx [deleted file]
src/MPrsStd/MPrsStd_PositionStorageDriver.cdl [deleted file]
src/MPrsStd/MPrsStd_PositionStorageDriver.cxx [deleted file]
src/OS/ApplicationFramework.tcl
src/PDataXtd/PDataXtd.cdl
src/PDataXtd/PDataXtd_Presentation.cdl [new file with mode: 0644]
src/PDataXtd/PDataXtd_Presentation.cxx [new file with mode: 0644]
src/PDataXtd/PDataXtd_Presentation_1.cdl [new file with mode: 0644]
src/PDataXtd/PDataXtd_Presentation_1.cxx [new file with mode: 0644]
src/PPrsStd/PPrsStd.cdl [deleted file]
src/PPrsStd/PPrsStd_AISPresentation.cdl [deleted file]
src/PPrsStd/PPrsStd_AISPresentation.cxx [deleted file]
src/PPrsStd/PPrsStd_AISPresentation_1.cdl [deleted file]
src/PPrsStd/PPrsStd_AISPresentation_1.cxx [deleted file]
src/StdDrivers/StdDrivers_DocumentRetrievalDriver.cxx
src/StdDrivers/StdDrivers_DocumentStorageDriver.cxx
src/StdSchema/StdSchema.cdl
src/TDataXtd/TDataXtd.cdl
src/TDataXtd/TDataXtd_Presentation.cdl [new file with mode: 0644]
src/TDataXtd/TDataXtd_Presentation.cxx [new file with mode: 0644]
src/TKBin/EXTERNLIB
src/TKBin/PACKAGES
src/TKCAF/EXTERNLIB
src/TKCAF/PACKAGES
src/TKDCAF/EXTERNLIB
src/TKPCAF/EXTERNLIB
src/TKPCAF/PACKAGES
src/TKQADraw/EXTERNLIB
src/TKVCAF/EXTERNLIB [new file with mode: 0644]
src/TKVCAF/FILES [new file with mode: 0644]
src/TKVCAF/PACKAGES [new file with mode: 0644]
src/TKXCAF/EXTERNLIB
src/TKXDEDRAW/EXTERNLIB
src/TKXml/EXTERNLIB
src/TKXml/PACKAGES
src/TPrsStd/GUID.txt
src/TPrsStd/TPrsStd_AISPresentation.cdl
src/TPrsStd/TPrsStd_AISPresentation.cxx
src/TPrsStd/TPrsStd_AISViewer.cxx
src/XmlDrivers/XmlDrivers.cxx
src/XmlMDataXtd/XmlMDataXtd.cdl
src/XmlMDataXtd/XmlMDataXtd.cxx
src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cdl [new file with mode: 0644]
src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx [new file with mode: 0644]
src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cdl [new file with mode: 0644]
src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cxx [new file with mode: 0644]
src/XmlMPrsStd/XmlMPrsStd.cdl [deleted file]
src/XmlMPrsStd/XmlMPrsStd.cxx [deleted file]
src/XmlMPrsStd/XmlMPrsStd_AISPresentationDriver.cdl [deleted file]
src/XmlMPrsStd/XmlMPrsStd_AISPresentationDriver.cxx [deleted file]
src/XmlMPrsStd/XmlMPrsStd_PositionDriver.cdl [deleted file]
src/XmlMPrsStd/XmlMPrsStd_PositionDriver.cxx [deleted file]

index be32f80619fdc94cc725faaefe0dda038dbefbd6..2340b5c4f248979f9ea84ac5ab118ad548dec47e 100644 (file)
@@ -240,7 +240,6 @@ p BinMDataXtd
 p BinMDocStd
 p BinMFunction
 p BinMNaming
-p BinMPrsStd
 p BinObjMgt
 p BinTools
 p CDF
@@ -253,7 +252,6 @@ p MDataXtd
 p MDocStd
 p MFunction
 p MNaming
-p MPrsStd
 p MgtBRep
 p MgtGeom
 p MgtGeom2d
@@ -277,7 +275,6 @@ p PGeom2d
 p PMMgt
 p PNaming
 p PPoly
-p PPrsStd
 p PShort
 p PStandard
 p PTColStd
@@ -301,7 +298,6 @@ p XmlMDataXtd
 p XmlMDocStd
 p XmlMFunction
 p XmlMNaming
-p XmlMPrsStd
 p XmlObjMgt
 r StdResource
 r XmlOcafResource
@@ -318,6 +314,7 @@ t TKCDF
 t TKLCAF
 t TKPCAF
 t TKPLCAF
+t TKVCAF
 t TKPShape
 t TKShapeSchema
 t TKStdLSchema
index 6fe301780ed9f21a9950240f05d2109e6d903f55..25cbde24ec9bab9ab1985207e57f33c7f26ecf35 100644 (file)
@@ -21,7 +21,6 @@
 #include <BinMNaming.hxx>
 #include <BinMDocStd.hxx>
 #include <BinMFunction.hxx>
-#include <BinMPrsStd.hxx>
 #include <Standard_Failure.hxx>
 #include <BinDrivers_DocumentStorageDriver.hxx>
 #include <BinDrivers_DocumentRetrievalDriver.hxx>
@@ -76,7 +75,6 @@ Handle(BinMDF_ADriverTable) BinDrivers::AttributeDrivers
   BinMNaming    ::AddDrivers (aTable, aMsgDrv);
   BinMDocStd    ::AddDrivers (aTable, aMsgDrv);
   BinMFunction  ::AddDrivers (aTable, aMsgDrv);
-  BinMPrsStd    ::AddDrivers (aTable, aMsgDrv);
   return aTable;
 }
 
index ef1efd164dcfaee51de83cb4e116d41300fcc650..41b5a11d282216d80cbb4ff79388442bbe82d4d5 100644 (file)
@@ -74,7 +74,6 @@ Handle(BinMDF_ADriverTable) BinLDrivers::AttributeDrivers
   BinMDocStd    ::AddDrivers (aTable, aMsgDrv);
 
 //  BinMNaming    ::AddDrivers (aTable, aMsgDrv);
-//  BinMPrsStd    ::AddDrivers (aTable, aMsgDrv);
   return aTable;
 }
 
index 7bb68fffa4c165ecb51bcae3c5f47fb4c13ded8c..41f3c0d19ca58b6306ec5f891fe276e9c8787051 100644 (file)
@@ -43,6 +43,10 @@ is
     class PatternStdDriver;
 
     class ShapeDriver; 
+
+    class PresentationDriver;
+
+    class PositionDriver;
      
 
     AddDrivers (theDriverTable : ADriverTable  from BinMDF;
index 545ba817a4843af83a309842168b2e0edcaa9dce..f5b571fce358e71635e3459ab6bb5fa1ac4ce59e 100644 (file)
@@ -24,6 +24,8 @@
 #include <BinMDataXtd_AxisDriver.hxx>
 #include <BinMDataXtd_PlaneDriver.hxx>
 #include <BinMDataXtd_PlacementDriver.hxx>
+#include <BinMDataXtd_PresentationDriver.hxx>
+#include <BinMDataXtd_PositionDriver.hxx>
 
 static Standard_Integer myDocumentVersion = -1;
 //=======================================================================
@@ -42,6 +44,8 @@ void BinMDataXtd::AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable,
   theDriverTable->AddDriver (new BinMDataXtd_AxisDriver        (theMsgDriver) );
   theDriverTable->AddDriver (new BinMDataXtd_PlaneDriver       (theMsgDriver) );
   theDriverTable->AddDriver (new BinMDataXtd_PlacementDriver   (theMsgDriver) );
+  theDriverTable->AddDriver (new BinMDataXtd_PresentationDriver(theMsgDriver) );
+  theDriverTable->AddDriver (new BinMDataXtd_PositionDriver    (theMsgDriver) );
 
 }
 
diff --git a/src/BinMDataXtd/BinMDataXtd_PositionDriver.cdl b/src/BinMDataXtd/BinMDataXtd_PositionDriver.cdl
new file mode 100644 (file)
index 0000000..938c5da
--- /dev/null
@@ -0,0 +1,43 @@
+-- Created on: 2004-05-17
+-- 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.
+
+class PositionDriver from BinMDataXtd inherits ADriver from BinMDF
+
+       ---Purpose: Position Attribute Driver.
+
+uses
+    SRelocationTable from BinObjMgt,
+    RRelocationTable from BinObjMgt,
+    Persistent       from BinObjMgt,
+    MessageDriver    from CDM,
+    Attribute        from TDF
+
+is
+
+    Create (theMessageDriver:MessageDriver from CDM)
+    returns PositionDriver from BinMDataXtd;
+
+    NewEmpty (me)  returns Attribute from TDF;
+
+    Paste(me; Source     : Persistent from BinObjMgt;
+              Target     : Attribute from TDF;
+              RelocTable : out RRelocationTable from BinObjMgt)
+        returns Boolean from Standard;
+
+    Paste(me; Source     : Attribute from TDF;
+              Target     : in out Persistent from BinObjMgt;
+              RelocTable : out SRelocationTable from BinObjMgt);
+
+end PositionDriver;
diff --git a/src/BinMDataXtd/BinMDataXtd_PositionDriver.cxx b/src/BinMDataXtd/BinMDataXtd_PositionDriver.cxx
new file mode 100644 (file)
index 0000000..bc87cc8
--- /dev/null
@@ -0,0 +1,88 @@
+// Created on: 2004-05-17
+// 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.
+
+// modified     13.04.2009 Sergey ZARITCHNY
+
+#include <BinMDataXtd_PositionDriver.ixx>
+#include <gp_Pnt.hxx>
+#include <TDataXtd_Position.hxx>
+#include <CDM_MessageDriver.hxx>
+
+//=======================================================================
+//function : BinMDataStd_PositionDriver
+//purpose  : Constructor
+//=======================================================================
+
+BinMDataXtd_PositionDriver::BinMDataXtd_PositionDriver
+                        (const Handle(CDM_MessageDriver)& theMsgDriver)
+: BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Position)->Name())
+{
+}
+
+//=======================================================================
+//function : NewEmpty
+//purpose  : 
+//=======================================================================
+
+Handle(TDF_Attribute) BinMDataXtd_PositionDriver::NewEmpty() const
+{
+  return new TDataXtd_Position();
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : persistent -> transient (retrieve)
+//=======================================================================
+
+Standard_Boolean BinMDataXtd_PositionDriver::Paste
+                                (const BinObjMgt_Persistent&  theSource,
+                                 const Handle(TDF_Attribute)& theTarget,
+                                 BinObjMgt_RRelocationTable&  ) const
+{
+  Handle(TDataXtd_Position) anAtt = Handle(TDataXtd_Position)::DownCast(theTarget);
+  Standard_Real aValue;
+  Standard_Boolean ok = theSource >> aValue;
+  if (!ok) return ok;
+  gp_Pnt aPosition(0., 0., 0.);
+  aPosition.SetX(aValue);
+
+  ok = theSource >> aValue;
+  if (!ok) return ok;
+  aPosition.SetY(aValue);
+
+  ok = theSource >> aValue;
+  if (!ok) return ok;
+  aPosition.SetZ(aValue);
+
+  anAtt->SetPosition(aPosition);
+
+  return ok;
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : transient -> persistent (store)
+//=======================================================================
+
+void BinMDataXtd_PositionDriver::Paste (const Handle(TDF_Attribute)& theSource,
+                                       BinObjMgt_Persistent&        theTarget,
+                                       BinObjMgt_SRelocationTable&  ) const
+{
+  Handle(TDataXtd_Position) anAtt = Handle(TDataXtd_Position)::DownCast(theSource);
+  
+  theTarget << anAtt->GetPosition().X();
+  theTarget << anAtt->GetPosition().Y();
+  theTarget << anAtt->GetPosition().Z();
+}
diff --git a/src/BinMDataXtd/BinMDataXtd_PresentationDriver.cdl b/src/BinMDataXtd/BinMDataXtd_PresentationDriver.cdl
new file mode 100644 (file)
index 0000000..cfd57e2
--- /dev/null
@@ -0,0 +1,44 @@
+-- Created on: 2004-05-17
+-- 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.
+
+class PresentationDriver from BinMDataXtd inherits ADriver from BinMDF
+
+       ---Purpose: Presentation Attribute Driver.
+
+uses
+    SRelocationTable from BinObjMgt,
+    RRelocationTable from BinObjMgt,
+    Persistent       from BinObjMgt,
+    MessageDriver    from CDM,
+    Attribute        from TDF
+
+is
+
+    Create (theMessageDriver:MessageDriver from CDM)
+        returns PresentationDriver from BinMDataXtd;
+
+    NewEmpty (me)  returns Attribute from TDF;
+
+    Paste(me; Source     : Persistent from BinObjMgt;
+              Target     : Attribute from TDF;
+              RelocTable : out RRelocationTable from BinObjMgt)
+    returns Boolean from Standard;
+
+    Paste(me; Source     : Attribute from TDF;
+              Target     : in out Persistent from BinObjMgt;
+              RelocTable : out SRelocationTable from BinObjMgt);
+
+
+end PresentationDriver;
diff --git a/src/BinMDataXtd/BinMDataXtd_PresentationDriver.cxx b/src/BinMDataXtd/BinMDataXtd_PresentationDriver.cxx
new file mode 100644 (file)
index 0000000..5332009
--- /dev/null
@@ -0,0 +1,155 @@
+// Created on: 2004-05-17
+// 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_PresentationDriver.ixx>
+#include <TDataXtd_Presentation.hxx>
+#include <CDM_MessageDriver.hxx>
+
+//=======================================================================
+//function : BinMDataStd_AISPresentationDriver
+//purpose  : Constructor
+//=======================================================================
+BinMDataXtd_PresentationDriver::BinMDataXtd_PresentationDriver
+                          (const Handle(CDM_MessageDriver)& theMsgDriver)
+: BinMDF_ADriver(theMsgDriver, STANDARD_TYPE(TDataXtd_Presentation)->Name())
+{
+}
+
+//=======================================================================
+//function : NewEmpty
+//purpose  : 
+//=======================================================================
+
+Handle(TDF_Attribute) BinMDataXtd_PresentationDriver::NewEmpty() const
+{
+  return new TDataXtd_Presentation();
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : persistent -> transient (retrieve)
+//=======================================================================
+
+Standard_Boolean BinMDataXtd_PresentationDriver::Paste
+                                  (const BinObjMgt_Persistent&  theSource,
+                                   const Handle(TDF_Attribute)& theTarget,
+                                   BinObjMgt_RRelocationTable&  /*theRT*/) const
+{
+  Standard_Boolean ok = Standard_False;
+  Handle(TDataXtd_Presentation) anAttribute = Handle(TDataXtd_Presentation)::DownCast(theTarget);
+
+  // Display status
+  Standard_Integer aValue;
+  ok = theSource >> aValue;
+  if (!ok) return ok;
+  anAttribute->SetDisplayed(static_cast<Standard_Boolean>(aValue));
+
+  // GUID
+  Standard_GUID aGUID;
+  ok = theSource >> aGUID;
+  if (!ok) return ok;
+  anAttribute->SetDriverGUID(aGUID);
+
+  // Color
+  ok = theSource >> aValue;
+  if (!ok) return ok;
+  if ( aValue != -1 )
+    anAttribute->SetColor(aValue);
+  else
+    anAttribute->UnsetColor();
+
+  // Material
+  ok = theSource >> aValue;
+  if ( !ok ) return ok;
+  if (aValue != -1)
+    anAttribute->SetMaterial(aValue);
+  else
+    anAttribute->UnsetMaterial();
+
+  // Transparency
+  Standard_Real aRValue;
+  ok = theSource >> aRValue;
+  if ( !ok ) return ok;
+  if ( aRValue != -1. )
+    anAttribute->SetTransparency(aRValue);
+  else
+    anAttribute->UnsetTransparency();
+
+  // Width
+  ok = theSource >> aRValue;
+  if ( !ok ) return ok;
+  if ( aRValue != -1. )
+    anAttribute->SetWidth(aRValue);
+  else
+    anAttribute->UnsetWidth();
+
+  // Mode
+  ok = theSource >> aValue;
+  if ( !ok ) return ok;
+  if ( aValue != -1 )
+    anAttribute->SetMode(aValue);
+  else
+    anAttribute->UnsetMode();
+
+  return ok;
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : transient -> persistent (store)
+//=======================================================================
+
+void BinMDataXtd_PresentationDriver::Paste(const Handle(TDF_Attribute)& theSource,
+                                           BinObjMgt_Persistent&        theTarget,
+                                           BinObjMgt_SRelocationTable&  /*theSRT*/) const
+{
+  Handle(TDataXtd_Presentation) anAttribute = Handle(TDataXtd_Presentation)::DownCast(theSource);
+
+  // Display status
+  theTarget.PutBoolean(anAttribute->IsDisplayed());
+
+  // GUID
+  theTarget.PutGUID(anAttribute->GetDriverGUID());
+
+  // Color
+  if (anAttribute->IsHasOwnColor())
+    theTarget.PutInteger(anAttribute->Color());
+  else
+    theTarget.PutInteger(-1);
+
+  // Material
+  if (anAttribute->IsHasOwnMaterial())
+    theTarget.PutInteger(anAttribute->Material());
+  else
+    theTarget.PutInteger(-1);
+
+  // Transparency
+  if (anAttribute->IsHasOwnTransparency())
+    theTarget.PutReal(anAttribute->Transparency());
+  else
+    theTarget.PutReal(-1.);
+
+  // Width
+  if (anAttribute->IsHasOwnWidth())
+    theTarget.PutReal(anAttribute->Width());
+  else
+    theTarget.PutReal(-1.);
+
+  // Mode
+  if (anAttribute->IsHasOwnMode())
+    theTarget.PutInteger(anAttribute->Mode());
+  else
+    theTarget.PutInteger(-1);
+}
diff --git a/src/BinMPrsStd/BinMPrsStd.cdl b/src/BinMPrsStd/BinMPrsStd.cdl
deleted file mode 100644 (file)
index f434bbc..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
--- Created on: 2004-05-17
--- 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.
-
-package BinMPrsStd 
-
-       ---Purpose: 
-
-uses 
-    BinObjMgt, 
-    TDF, 
-    BinMDF,
-    CDM
-is
-        ---Category: Storage-Retrieval drivers for graphic attributes from
-        --           TPrsStd
-
-       class AISPresentationDriver; 
-       
-       class PositionDriver;   
-       
-    AddDrivers(theDriverTable   : ADriverTable  from BinMDF;
-              theMessageDriver : MessageDriver from CDM);
-       ---Purpose: Adds the attribute storage-retrieval driver to <theDriverTable>.
-
-end BinMPrsStd;
diff --git a/src/BinMPrsStd/BinMPrsStd.cxx b/src/BinMPrsStd/BinMPrsStd.cxx
deleted file mode 100644 (file)
index 2f3a3a4..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-// Created on: 2004-05-17
-// 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 <BinMPrsStd.ixx>
-#include <CDM_MessageDriver.hxx>
-#include <BinMDF_ADriverTable.hxx>
-#include <BinMPrsStd_AISPresentationDriver.hxx>
-#include <BinMPrsStd_PositionDriver.hxx>
-
-//=======================================================================
-//function : AddDrivers
-//purpose  : 
-//=======================================================================
-
-void BinMPrsStd::AddDrivers (const Handle(BinMDF_ADriverTable)& aDriverTable,
-                                   const Handle(CDM_MessageDriver)&   aMessageDriver)
-{
-  aDriverTable->AddDriver (new BinMPrsStd_AISPresentationDriver(aMessageDriver));
-  aDriverTable->AddDriver (new BinMPrsStd_PositionDriver(aMessageDriver));
-}
diff --git a/src/BinMPrsStd/BinMPrsStd_AISPresentationDriver.cdl b/src/BinMPrsStd/BinMPrsStd_AISPresentationDriver.cdl
deleted file mode 100644 (file)
index 71e7ee2..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
--- Created on: 2004-05-17
--- 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.
-
-class AISPresentationDriver from BinMPrsStd inherits ADriver from BinMDF
-
-       ---Purpose: AISPresentation Attribute Driver.
-
-uses
-    SRelocationTable from BinObjMgt,
-    RRelocationTable from BinObjMgt,
-    Persistent       from BinObjMgt,
-    MessageDriver    from CDM,
-    Attribute        from TDF
-
-is
-
-    Create (theMessageDriver:MessageDriver from CDM)
-        returns AISPresentationDriver from BinMPrsStd;
-
-    NewEmpty (me)  returns Attribute from TDF;
-
-    Paste(me; Source     : Persistent from BinObjMgt;
-              Target     : Attribute from TDF;
-              RelocTable : out RRelocationTable from BinObjMgt)
-        returns Boolean from Standard;
-
-    Paste(me; Source     : Attribute from TDF;
-              Target     : in out Persistent from BinObjMgt;
-              RelocTable : out SRelocationTable from BinObjMgt);
-    
-
-end AISPresentationDriver;
diff --git a/src/BinMPrsStd/BinMPrsStd_AISPresentationDriver.cxx b/src/BinMPrsStd/BinMPrsStd_AISPresentationDriver.cxx
deleted file mode 100644 (file)
index 687224a..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-// Created on: 2004-05-17
-// 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 <BinMPrsStd_AISPresentationDriver.ixx>
-#include <TPrsStd_AISPresentation.hxx>
-#include <Graphic3d_NameOfMaterial.hxx>
-#include <Quantity_NameOfColor.hxx>
-#include <CDM_MessageDriver.hxx>
-//=======================================================================
-//function : BinMDataStd_AISPresentationDriver
-//purpose  : Constructor
-//=======================================================================
-
-BinMPrsStd_AISPresentationDriver::BinMPrsStd_AISPresentationDriver
-                        (const Handle(CDM_MessageDriver)& theMsgDriver)
-     : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TPrsStd_AISPresentation)->Name())
-{
-}
-
-//=======================================================================
-//function : NewEmpty
-//purpose  : 
-//=======================================================================
-
-Handle(TDF_Attribute) BinMPrsStd_AISPresentationDriver::NewEmpty() const
-{
-  return new TPrsStd_AISPresentation();
-}
-
-//=======================================================================
-//function : Paste
-//purpose  : persistent -> transient (retrieve)
-//=======================================================================
-
-Standard_Boolean BinMPrsStd_AISPresentationDriver::Paste
-                                (const BinObjMgt_Persistent&  theSource,
-                                 const Handle(TDF_Attribute)& theTarget,
-                                 BinObjMgt_RRelocationTable&  ) const
-{
-  Handle(TPrsStd_AISPresentation) anAtt = Handle(TPrsStd_AISPresentation)::DownCast(theTarget);
-  Standard_Integer aValue;
-//Display status
-  Standard_Boolean ok = theSource >> aValue;
-  if (!ok) return ok;
-  anAtt->SetDisplayed((Standard_Boolean)aValue);
-
-//GUID
-  Standard_GUID aGUID;
-  ok = theSource >> aGUID;
-  if (!ok) return ok;
-  anAtt->SetDriverGUID(aGUID);
-
-//Color
-  ok = theSource >> aValue;
-  if (!ok) return ok;
-  if(aValue != -1)  anAtt->SetColor( (Quantity_NameOfColor)(aValue) );
-  else anAtt->UnsetColor();
-
-//Material
-  ok = theSource >> aValue;
-  if (!ok) return ok;
-  if(aValue != -1)  anAtt->SetMaterial( (Graphic3d_NameOfMaterial)(aValue) );
-  else anAtt->UnsetMaterial();
-
-//Transparency
-  Standard_Real aRValue;
-  ok = theSource >> aRValue;
-  if (!ok) return ok;
-  if(aRValue != -1.)  anAtt->SetTransparency(aRValue);
-  else anAtt->UnsetTransparency(); 
-
-//Width
-  ok = theSource >> aRValue;
-  if (!ok) return ok;
-  if(aRValue != -1.)  anAtt->SetWidth( aRValue );
-  else anAtt->UnsetWidth(); 
-
-//Mode
-  ok = theSource >> aValue;
-  if (!ok) return ok;
-  if(aValue != -1)  anAtt->SetMode(aValue);
-  else anAtt->UnsetMode();
-
-  return ok;
-}
-
-//=======================================================================
-//function : Paste
-//purpose  : transient -> persistent (store)
-//=======================================================================
-
-void BinMPrsStd_AISPresentationDriver::Paste (const Handle(TDF_Attribute)& theSource,
-                                       BinObjMgt_Persistent&        theTarget,
-                                       BinObjMgt_SRelocationTable&  ) const
-{
-  Handle(TPrsStd_AISPresentation) anAtt = Handle(TPrsStd_AISPresentation)::DownCast(theSource);
-//1
-  theTarget.PutBoolean(anAtt->IsDisplayed());//Bool
-//2
-  theTarget.PutGUID(anAtt->GetDriverGUID());//GUID
-//3
-  if(anAtt->HasOwnColor()) 
-    theTarget.PutInteger((Standard_Integer)anAtt->Color());//Color
-  else theTarget.PutInteger(-1);
-//4
- if(anAtt->HasOwnMaterial())
-   theTarget.PutInteger((Standard_Integer)anAtt->Material());
- else theTarget.PutInteger(-1);
-//5
-  if(anAtt->HasOwnTransparency())
-    theTarget.PutReal(anAtt->Transparency()); //Real
-  else theTarget.PutReal(-1.);
-//6
-  if(anAtt->HasOwnWidth())
-    theTarget.PutReal(anAtt->Width());// Real
-  else theTarget.PutReal(-1.);
-//7
-  if(anAtt->HasOwnMode())
-    theTarget.PutInteger(anAtt->Mode()); //Int
-  else theTarget.PutInteger(-1);
-}
diff --git a/src/BinMPrsStd/BinMPrsStd_PositionDriver.cdl b/src/BinMPrsStd/BinMPrsStd_PositionDriver.cdl
deleted file mode 100644 (file)
index e2ed922..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
--- Created on: 2004-05-17
--- 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.
-
-class PositionDriver from BinMPrsStd inherits ADriver from BinMDF
-
-       ---Purpose: Position Attribute Driver.
-
-uses
-    SRelocationTable from BinObjMgt,
-    RRelocationTable from BinObjMgt,
-    Persistent       from BinObjMgt,
-    MessageDriver    from CDM,
-    Attribute        from TDF
-
-is
-
-Create (theMessageDriver:MessageDriver from CDM)
-        returns PositionDriver from BinMPrsStd;
-
-    NewEmpty (me)  returns Attribute from TDF;
-
-    Paste(me; Source     : Persistent from BinObjMgt;
-              Target     : Attribute from TDF;
-              RelocTable : out RRelocationTable from BinObjMgt)
-        returns Boolean from Standard;
-
-    Paste(me; Source     : Attribute from TDF;
-              Target     : in out Persistent from BinObjMgt;
-              RelocTable : out SRelocationTable from BinObjMgt);
-
-end PositionDriver;
diff --git a/src/BinMPrsStd/BinMPrsStd_PositionDriver.cxx b/src/BinMPrsStd/BinMPrsStd_PositionDriver.cxx
deleted file mode 100644 (file)
index 792a5cd..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-// Created on: 2004-05-17
-// 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.
-
-// modified     13.04.2009 Sergey ZARITCHNY
-
-#include <BinMPrsStd_PositionDriver.ixx>
-#include <gp_Pnt.hxx>
-#include <TDataXtd_Position.hxx>
-#include <CDM_MessageDriver.hxx>
-
-//=======================================================================
-//function : BinMDataStd_PositionDriver
-//purpose  : Constructor
-//=======================================================================
-
-BinMPrsStd_PositionDriver::BinMPrsStd_PositionDriver
-                        (const Handle(CDM_MessageDriver)& theMsgDriver)
-     : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Position)->Name())
-{
-}
-
-//=======================================================================
-//function : NewEmpty
-//purpose  : 
-//=======================================================================
-
-Handle(TDF_Attribute) BinMPrsStd_PositionDriver::NewEmpty() const
-{
-  return new TDataXtd_Position();
-}
-
-//=======================================================================
-//function : Paste
-//purpose  : persistent -> transient (retrieve)
-//=======================================================================
-
-Standard_Boolean BinMPrsStd_PositionDriver::Paste
-                                (const BinObjMgt_Persistent&  theSource,
-                                 const Handle(TDF_Attribute)& theTarget,
-                                 BinObjMgt_RRelocationTable&  ) const
-{
-  Handle(TDataXtd_Position) anAtt = Handle(TDataXtd_Position)::DownCast(theTarget);
-  Standard_Real aValue;
-  Standard_Boolean ok = theSource >> aValue;
-  if (!ok) return ok;
-  gp_Pnt aPosition(0., 0., 0.);
-  aPosition.SetX(aValue);
-
-  ok = theSource >> aValue;
-  if (!ok) return ok;
-  aPosition.SetY(aValue);
-
-  ok = theSource >> aValue;
-  if (!ok) return ok;
-  aPosition.SetZ(aValue);
-
-  anAtt->SetPosition(aPosition);
-
-  return ok;
-}
-
-//=======================================================================
-//function : Paste
-//purpose  : transient -> persistent (store)
-//=======================================================================
-
-void BinMPrsStd_PositionDriver::Paste (const Handle(TDF_Attribute)& theSource,
-                                       BinObjMgt_Persistent&        theTarget,
-                                       BinObjMgt_SRelocationTable&  ) const
-{
-  Handle(TDataXtd_Position) anAtt = Handle(TDataXtd_Position)::DownCast(theSource);
-  
-  theTarget << anAtt->GetPosition().X();
-  theTarget << anAtt->GetPosition().Y();
-  theTarget << anAtt->GetPosition().Z();
-}
index 29e9d6cf824c13d121d20c5db3c501200f4270ab..ab6d2afcc4d2cf1ce90ed8330adabdd07749f639 100644 (file)
@@ -55,6 +55,9 @@ is
        
        class PatternStdStorageDriver;
 
+        class PresentationStorageDriver;
+
+        class PositionStorageDriver;
  
     
     ---Category: Retrieval drivers for PDataXtd attributes
@@ -76,6 +79,12 @@ is
        
        class PatternStdRetrievalDriver;
 
+       class PresentationRetrievalDriver;
+
+       class PresentationRetrievalDriver_1;
+       
+       class PositionRetrievalDriver;
+
 
 
     AddStorageDrivers(aDriverSeq : ASDriverHSequence from MDF; theMessageDriver : MessageDriver from CDM);
index b42ac20b21ddc87811f6a53ccfae82035ac5db1c..0775b8c0c7c79acb6a3cb05b57019e4189772c86 100644 (file)
@@ -34,6 +34,8 @@
 #include <MDataXtd_ConstraintStorageDriver.hxx>
 #include <MDataXtd_PlacementStorageDriver.hxx>
 #include <MDataXtd_PatternStdStorageDriver.hxx>
+#include <MDataXtd_PositionStorageDriver.hxx>
+#include <MDataXtd_PositionRetrievalDriver.hxx>
 
 // Retrieval
 #include <MDataXtd_ShapeRetrievalDriver.hxx>
@@ -44,6 +46,9 @@
 #include <MDataXtd_ConstraintRetrievalDriver.hxx>
 #include <MDataXtd_PlacementRetrievalDriver.hxx>
 #include <MDataXtd_PatternStdRetrievalDriver.hxx>
+#include <MDataXtd_PresentationStorageDriver.hxx>
+#include <MDataXtd_PresentationRetrievalDriver.hxx>
+#include <MDataXtd_PresentationRetrievalDriver_1.hxx>
 
 // enums
 #include <TDataStd_RealEnum.hxx>
@@ -83,6 +88,8 @@ void MDataXtd::AddStorageDrivers
   aDriverSeq->Append(new MDataXtd_ConstraintStorageDriver(theMsgDriver));
   aDriverSeq->Append(new MDataXtd_PlacementStorageDriver(theMsgDriver));
   aDriverSeq->Append(new MDataXtd_PatternStdStorageDriver(theMsgDriver));
+  aDriverSeq->Append(new MDataXtd_PresentationStorageDriver(theMsgDriver));
+  aDriverSeq->Append(new MDataXtd_PositionStorageDriver(theMsgDriver));
 }
 
 
@@ -102,6 +109,9 @@ void MDataXtd::AddRetrievalDrivers
   aDriverSeq->Append(new MDataXtd_ConstraintRetrievalDriver(theMsgDriver));
   aDriverSeq->Append(new MDataXtd_PlacementRetrievalDriver(theMsgDriver));
   aDriverSeq->Append(new MDataXtd_PatternStdRetrievalDriver(theMsgDriver));
+  aDriverSeq->Append(new MDataXtd_PresentationRetrievalDriver(theMsgDriver));
+  aDriverSeq->Append(new MDataXtd_PresentationRetrievalDriver_1(theMsgDriver));
+  aDriverSeq->Append(new MDataXtd_PositionRetrievalDriver(theMsgDriver));
 }
 
 //=======================================================================
diff --git a/src/MDataXtd/MDataXtd_PositionRetrievalDriver.cdl b/src/MDataXtd/MDataXtd_PositionRetrievalDriver.cdl
new file mode 100644 (file)
index 0000000..6ab2eab
--- /dev/null
@@ -0,0 +1,49 @@
+-- Created on: 1998-04-07
+-- Created by: Jean-Pierre COMBE
+-- Copyright (c) 1998-1999 Matra Datavision
+-- Copyright (c) 1999-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+class PositionRetrievalDriver from MDataXtd inherits ARDriver from MDF
+           ---Purpose: Retrieval drivers for graphic attributes from
+           --          PDataXtd
+
+
+uses RRelocationTable from MDF,
+     Attribute        from PDF,
+     Attribute        from TDF, 
+     MessageDriver    from CDM
+
+is
+
+
+    Create(theMessageDriver : MessageDriver from CDM)  -- Version 0
+    returns PositionRetrievalDriver from MDataXtd;
+    
+
+    VersionNumber(me) returns Integer from Standard;
+       ---Purpose: Returns the version number from which the driver
+       --          is available: 0.
+
+    SourceType(me) returns Type from Standard;
+       ---Purpose: Returns the type: ColorAttribute from PGraphicAttribute.
+
+    NewEmpty (me)  returns Attribute from TDF;
+
+
+    Paste(me;
+         Source     :         Attribute from PDF;
+         Target     : Attribute from TDF;
+         RelocTable : RRelocationTable  from MDF);
+
+end PositionRetrievalDriver;
diff --git a/src/MDataXtd/MDataXtd_PositionRetrievalDriver.cxx b/src/MDataXtd/MDataXtd_PositionRetrievalDriver.cxx
new file mode 100644 (file)
index 0000000..339ad4a
--- /dev/null
@@ -0,0 +1,70 @@
+// Created on: 1998-04-07
+// Created by: Jean-Pierre COMBE
+// Copyright (c) 1998-1999 Matra Datavision
+// Copyright (c) 1999-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 <MDataXtd_PositionRetrievalDriver.ixx>
+
+#include <PDataXtd_Position.hxx>
+#include <TDataXtd_Position.hxx>
+#include <CDM_MessageDriver.hxx>
+
+//=======================================================================
+//function : MDataXtd_PositionRetrievalDriver
+//purpose  : 
+//=======================================================================
+MDataXtd_PositionRetrievalDriver::MDataXtd_PositionRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver)
+: MDF_ARDriver(theMsgDriver)
+{}
+
+//=======================================================================
+//function : VersionNumber
+//purpose  : 
+//=======================================================================
+Standard_Integer MDataXtd_PositionRetrievalDriver::VersionNumber() const
+{
+  return 0;
+}
+
+//=======================================================================
+//function : SourceType
+//purpose  : 
+//=======================================================================
+Handle(Standard_Type) MDataXtd_PositionRetrievalDriver::SourceType() const
+{
+  return STANDARD_TYPE(PDataXtd_Position);
+}
+
+//=======================================================================
+//function : NewEmpty
+//purpose  : 
+//=======================================================================
+Handle(TDF_Attribute) MDataXtd_PositionRetrievalDriver::NewEmpty() const
+{
+  return new TDataXtd_Position;
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : 
+//=======================================================================
+void MDataXtd_PositionRetrievalDriver::Paste(const Handle(PDF_Attribute)& Source,
+                                            const Handle(TDF_Attribute)& Target,
+                                            const Handle(MDF_RRelocationTable)& /*RelocTable*/) const
+{
+  Handle(PDataXtd_Position) S = Handle(PDataXtd_Position)::DownCast(Source);
+  Handle(TDataXtd_Position) T = Handle(TDataXtd_Position)::DownCast(Target);
+  T->SetPosition(S->GetPosition());
+}
+
diff --git a/src/MDataXtd/MDataXtd_PositionStorageDriver.cdl b/src/MDataXtd/MDataXtd_PositionStorageDriver.cdl
new file mode 100644 (file)
index 0000000..c9a5a02
--- /dev/null
@@ -0,0 +1,51 @@
+-- Created on: 1998-04-07
+-- Created by: Jean-Pierre COMBE
+-- Copyright (c) 1998-1999 Matra Datavision
+-- Copyright (c) 1999-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+class PositionStorageDriver from MDataXtd inherits ASDriver from MDF
+
+       ---Purpose: Storage driver for graphic attributes from
+       --          TPrsStd
+
+uses SRelocationTable from MDF,
+     Attribute        from TDF,
+     Attribute        from PDF, 
+     MessageDriver    from CDM
+
+
+is
+
+    Create(theMessageDriver : MessageDriver from CDM)  
+    returns PositionStorageDriver from MDataXtd;
+
+
+    VersionNumber(me) returns Integer from Standard;
+       ---Purpose: Returns the version number from which the driver
+       --          is available: 0.
+
+    SourceType(me) returns Type from Standard;
+       ---Purpose: Returns the type: ColorAttribute from TGraphicAttribute.
+
+    NewEmpty (me) returns Attribute from PDF;
+
+
+    Paste(me;
+         Source     :         Attribute from TDF;
+         Target     : Attribute from PDF;
+         RelocTable : SRelocationTable from MDF);
+
+
+end PositionStorageDriver;
+
diff --git a/src/MDataXtd/MDataXtd_PositionStorageDriver.cxx b/src/MDataXtd/MDataXtd_PositionStorageDriver.cxx
new file mode 100644 (file)
index 0000000..ea6d7a7
--- /dev/null
@@ -0,0 +1,65 @@
+// Created on: 1998-04-07
+// Created by: Jean-Pierre COMBE
+// Copyright (c) 1998-1999 Matra Datavision
+// Copyright (c) 1999-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 <MDataXtd_PositionStorageDriver.ixx>
+
+#include <PDataXtd_Position.hxx>
+#include <TDataXtd_Position.hxx>
+#include <CDM_MessageDriver.hxx>
+
+//=======================================================================
+//function : MDataXtd_PositionStorageDriver
+//purpose  : 
+//=======================================================================
+MDataXtd_PositionStorageDriver::MDataXtd_PositionStorageDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ASDriver(theMsgDriver)
+{
+}
+
+//=======================================================================
+//function : VersionNumber
+//purpose  : 
+//=======================================================================
+Standard_Integer MDataXtd_PositionStorageDriver::VersionNumber() const
+{ return 0; }
+
+//=======================================================================
+//function : SourceType
+//purpose  : 
+//=======================================================================
+Handle(Standard_Type) MDataXtd_PositionStorageDriver::SourceType() const
+{ return STANDARD_TYPE(TDataXtd_Position); }
+
+//=======================================================================
+//function : NewEmpty
+//purpose  : 
+//=======================================================================
+Handle(PDF_Attribute) MDataXtd_PositionStorageDriver::NewEmpty() const
+{ return new PDataXtd_Position; }
+
+//=======================================================================
+//function : Paste
+//purpose  : 
+//=======================================================================
+void MDataXtd_PositionStorageDriver::Paste(const Handle(TDF_Attribute)& Source,
+                                          const Handle(PDF_Attribute)& Target,
+                                          const Handle(MDF_SRelocationTable)& /*RelocTable*/) const
+{
+  Handle(TDataXtd_Position) S = Handle(TDataXtd_Position)::DownCast (Source);
+  Handle(PDataXtd_Position) T = Handle(PDataXtd_Position)::DownCast (Target);  
+  T->SetPosition(S->GetPosition());
+}
+
+
diff --git a/src/MDataXtd/MDataXtd_PresentationRetrievalDriver.cdl b/src/MDataXtd/MDataXtd_PresentationRetrievalDriver.cdl
new file mode 100644 (file)
index 0000000..de68ddb
--- /dev/null
@@ -0,0 +1,48 @@
+-- Created on: 1999-07-08
+-- Created by: Sergey RUIN
+-- Copyright (c) 1999 Matra Datavision
+-- Copyright (c) 1999-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+class PresentationRetrievalDriver from MDataXtd  inherits ARDriver from MDF
+
+           ---Purpose: Retrieval drivers for graphic attributes from
+           --          MDataXtd
+
+uses RRelocationTable from MDF,
+     Attribute        from PDF,
+     Attribute        from TDF, 
+     MessageDriver from CDM
+
+is
+
+    Create(theMessageDriver : MessageDriver from CDM)  -- Version 0
+    returns PresentationRetrievalDriver from MDataXtd;
+    
+
+    VersionNumber(me) returns Integer from Standard;
+       ---Purpose: Returns the version number from which the driver
+       --          is available: 0.
+
+    SourceType(me) returns Type from Standard;
+       ---Purpose: Returns the type: Presentation from PDataXtd.
+
+    NewEmpty (me)  returns Attribute from TDF;
+
+
+    Paste(me;
+         Source     : Attribute from PDF;
+         Target     : Attribute from TDF;
+         RelocTable : RRelocationTable  from MDF);
+
+end PresentationRetrievalDriver;
diff --git a/src/MDataXtd/MDataXtd_PresentationRetrievalDriver.cxx b/src/MDataXtd/MDataXtd_PresentationRetrievalDriver.cxx
new file mode 100644 (file)
index 0000000..d6a795b
--- /dev/null
@@ -0,0 +1,82 @@
+// Created on: 1999-07-08
+// Created by: Sergey RUIN
+// Copyright (c) 1999-1999 Matra Datavision
+// Copyright (c) 1999-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 <MDataXtd_PresentationRetrievalDriver.ixx>
+
+#include <PDataXtd_Presentation.hxx>
+#include <TDataXtd_Presentation.hxx>
+#include <TCollection_ExtendedString.hxx>
+#include <PCollection_HExtendedString.hxx>
+#include <CDM_MessageDriver.hxx>
+
+//=======================================================================
+//function : MDataXtd_PresentationRetrievalDriver
+//purpose  : 
+//=======================================================================
+
+MDataXtd_PresentationRetrievalDriver::MDataXtd_PresentationRetrievalDriver
+                                (const Handle(CDM_MessageDriver)& theMsgDriver)
+: MDF_ARDriver(theMsgDriver)
+{
+}
+
+Standard_Integer MDataXtd_PresentationRetrievalDriver::VersionNumber() const
+{
+  return 0;
+}
+
+Handle(Standard_Type) MDataXtd_PresentationRetrievalDriver::SourceType() const
+{
+  return STANDARD_TYPE(PDataXtd_Presentation);
+}
+
+Handle(TDF_Attribute) MDataXtd_PresentationRetrievalDriver::NewEmpty() const
+{
+  return new TDataXtd_Presentation;
+}
+
+void MDataXtd_PresentationRetrievalDriver::Paste(const Handle(PDF_Attribute)& Source,
+                                                   const Handle(TDF_Attribute)& Target,
+                                                   const Handle(MDF_RRelocationTable)& /*RelocTable*/) const
+{
+  Handle(PDataXtd_Presentation) S = Handle(PDataXtd_Presentation)::DownCast (Source);
+  Handle(TDataXtd_Presentation) T = Handle(TDataXtd_Presentation)::DownCast (Target);
+
+  T->SetDisplayed( S->IsDisplayed() );
+
+  TCollection_ExtendedString extstr = (S->GetDriverGUID())->Convert();
+  Standard_GUID guid( extstr.ToExtString() );
+  T->SetDriverGUID( guid ); 
+
+  if( S->Color() != -1 ) T->SetColor( S->Color() );
+  else T->UnsetColor();
+
+  if( S->Material() != -1 ) T->SetMaterial( S->Material() );
+  else T->UnsetMaterial(); 
+
+  if( S->Transparency() != -1. ) T->SetTransparency( S->Transparency() );
+  else T->UnsetTransparency(); 
+
+  if( S->Width() != -1. ) T->SetWidth( S->Width() );
+  else T->UnsetWidth(); 
+
+#ifdef OCCT_DEBUG
+  cout << "AISPresentationRetrievalDriver "  << "retrieved DriverGUID ==> ";
+  guid.ShallowDump(cout);
+  cout << endl;
+#endif
+}
diff --git a/src/MDataXtd/MDataXtd_PresentationRetrievalDriver_1.cdl b/src/MDataXtd/MDataXtd_PresentationRetrievalDriver_1.cdl
new file mode 100644 (file)
index 0000000..a26c8b7
--- /dev/null
@@ -0,0 +1,50 @@
+-- Created on: 1999-07-08
+-- Created by: Sergey RUIN
+-- Copyright (c) 1999 Matra Datavision
+-- Copyright (c) 1999-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+class PresentationRetrievalDriver_1 from MDataXtd  inherits ARDriver from MDF
+
+           ---Purpose: Retrieval drivers for graphic attributes from
+           --          PDataXtd
+
+uses RRelocationTable from MDF,
+     Attribute        from PDF,
+     Attribute        from TDF, 
+     MessageDriver    from CDM
+
+is
+
+
+    Create (theMessageDriver : MessageDriver from CDM) -- Version 1
+    returns PresentationRetrievalDriver_1 from MDataXtd;
+    
+
+    VersionNumber(me) returns Integer from Standard;
+       ---Purpose: Returns the version number from which the driver
+       --          is available: 1.
+
+    SourceType(me) returns Type from Standard;
+       ---Purpose: Returns the type: Presentation from PDataXtd.
+
+    NewEmpty (me)  returns Attribute from TDF;
+
+
+    Paste(me;
+         Source     :         Attribute from PDF;
+         Target     : Attribute from TDF;
+         RelocTable : RRelocationTable  from MDF);
+
+end PresentationRetrievalDriver_1;
diff --git a/src/MDataXtd/MDataXtd_PresentationRetrievalDriver_1.cxx b/src/MDataXtd/MDataXtd_PresentationRetrievalDriver_1.cxx
new file mode 100644 (file)
index 0000000..51588b3
--- /dev/null
@@ -0,0 +1,81 @@
+// Created on: 1999-07-08
+// Created by: Sergey RUIN
+// Copyright (c) 1999-1999 Matra Datavision
+// Copyright (c) 1999-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 <MDataXtd_PresentationRetrievalDriver_1.ixx>
+
+#include <PDataXtd_Presentation_1.hxx>
+#include <TDataXtd_Presentation.hxx>
+#include <TCollection_ExtendedString.hxx>
+#include <PCollection_HExtendedString.hxx>
+#include <CDM_MessageDriver.hxx>
+
+//=======================================================================
+//function : MDataXtd_PresentationRetrievalDriver_1
+//purpose  : 
+//=======================================================================
+MDataXtd_PresentationRetrievalDriver_1::MDataXtd_PresentationRetrievalDriver_1(const Handle(CDM_MessageDriver)& theMsgDriver)
+:MDF_ARDriver(theMsgDriver)
+{}
+
+Standard_Integer MDataXtd_PresentationRetrievalDriver_1::VersionNumber() const
+{
+  return 1;
+}
+
+Handle(Standard_Type) MDataXtd_PresentationRetrievalDriver_1::SourceType() const
+{
+  return STANDARD_TYPE(PDataXtd_Presentation_1);
+}
+
+Handle(TDF_Attribute) MDataXtd_PresentationRetrievalDriver_1::NewEmpty() const
+{
+  return new TDataXtd_Presentation;
+}
+
+void MDataXtd_PresentationRetrievalDriver_1::Paste(const Handle(PDF_Attribute)& Source,
+                                                     const Handle(TDF_Attribute)& Target,
+                                                     const Handle(MDF_RRelocationTable)& /*RelocTable*/) const
+{
+  Handle(PDataXtd_Presentation_1) S = Handle(PDataXtd_Presentation_1)::DownCast (Source);
+  Handle(TDataXtd_Presentation)   T = Handle(TDataXtd_Presentation)::DownCast (Target);
+
+  T->SetDisplayed( S->IsDisplayed() );
+
+  TCollection_ExtendedString extstr = (S->GetDriverGUID())->Convert();
+  Standard_GUID guid( extstr.ToExtString() );
+
+  T->SetDriverGUID( guid );
+
+  if( S->Color() != -1 ) T->SetColor( S->Color() );
+  else T->UnsetColor();
+
+  if( S->Material() != -1 ) T->SetMaterial( S->Material() );
+  else T->UnsetMaterial();
+
+  if( S->Transparency() != -1. ) T->SetTransparency( S->Transparency() );
+  else T->UnsetTransparency(); 
+
+  if( S->Width() != -1. ) T->SetWidth( S->Width() );
+  else T->UnsetWidth();
+
+  T->SetMode(S->Mode());
+
+#ifdef OCCT_DEBUG
+  cout << "AISPresentationRetrievalDriver "  << "retrieved DriverGUID ==> ";
+  guid.ShallowDump(cout);
+  cout << endl;
+#endif
+}
diff --git a/src/MDataXtd/MDataXtd_PresentationStorageDriver.cdl b/src/MDataXtd/MDataXtd_PresentationStorageDriver.cdl
new file mode 100644 (file)
index 0000000..e67abd0
--- /dev/null
@@ -0,0 +1,51 @@
+-- Created on: 1999-07-08
+-- Created by: Sergey RUIN
+-- Copyright (c) 1999 Matra Datavision
+-- Copyright (c) 1999-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+class PresentationStorageDriver from MDataXtd inherits ASDriver from MDF
+
+       ---Purpose: Storage driver for graphic attributes from
+       --          TDataXtd
+
+uses SRelocationTable from MDF,
+     Attribute        from TDF,
+     Attribute        from PDF, 
+     MessageDriver    from CDM
+
+
+is
+
+    Create (theMessageDriver : MessageDriver from CDM)
+    returns PresentationStorageDriver from MDataXtd;
+
+
+    VersionNumber(me) returns Integer from Standard;
+       ---Purpose: Returns the version number from which the driver
+       --          is available: 0.
+
+    SourceType(me) returns Type from Standard;
+       ---Purpose: Returns the type: Presentation from TDataXtd.
+
+    NewEmpty (me) returns Attribute from PDF;
+
+
+    Paste(me;
+         Source     :         Attribute from TDF;
+         Target     : Attribute from PDF;
+         RelocTable : SRelocationTable from MDF);
+
+
+end PresentationStorageDriver;
+
diff --git a/src/MDataXtd/MDataXtd_PresentationStorageDriver.cxx b/src/MDataXtd/MDataXtd_PresentationStorageDriver.cxx
new file mode 100644 (file)
index 0000000..34cf3c9
--- /dev/null
@@ -0,0 +1,85 @@
+// Created on: 1997-07-08
+// Created by: Sergey RUIN
+// Copyright (c) 1997-1999 Matra Datavision
+// Copyright (c) 1999-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 <MDataXtd_PresentationStorageDriver.ixx>
+
+#include <PDataXtd_Presentation.hxx>
+#include <PDataXtd_Presentation_1.hxx>
+#include <TDataXtd_Presentation.hxx>
+#include <TCollection_ExtendedString.hxx>
+#include <PCollection_HExtendedString.hxx>
+#include <CDM_MessageDriver.hxx>
+
+//=======================================================================
+//function : MDataXtd_PresentationStorageDriver
+//purpose  : 
+//=======================================================================
+
+MDataXtd_PresentationStorageDriver::MDataXtd_PresentationStorageDriver(const Handle(CDM_MessageDriver)& theMsgDriver)
+: MDF_ASDriver(theMsgDriver)
+{
+}
+
+Standard_Integer MDataXtd_PresentationStorageDriver::VersionNumber() const
+{
+  return 0;
+}
+
+Handle(Standard_Type) MDataXtd_PresentationStorageDriver::SourceType() const
+{
+  return STANDARD_TYPE(TDataXtd_Presentation);
+}
+
+Handle(PDF_Attribute) MDataXtd_PresentationStorageDriver::NewEmpty() const
+{
+  return new PDataXtd_Presentation_1;
+}
+
+void MDataXtd_PresentationStorageDriver::Paste(const Handle(TDF_Attribute)& Source,
+                                               const Handle(PDF_Attribute)& Target,
+                                               const Handle(MDF_SRelocationTable)& /*RelocTable*/) const
+{
+  Handle(TDataXtd_Presentation) S = Handle(TDataXtd_Presentation)::DownCast(Source);
+
+  Handle(PDataXtd_Presentation_1) T = Handle(PDataXtd_Presentation_1)::DownCast(Target);
+
+  T->SetDisplayed( S->IsDisplayed() );
+
+  TCollection_ExtendedString  extstr("00000000-0000-0000-0000-000000000000");  //covert GUID into ExtendedString
+  Standard_PExtCharacter pStr = const_cast<Standard_PExtCharacter>(extstr.ToExtString());
+  S->GetDriverGUID().ToExtString(pStr);
+
+  Handle(PCollection_HExtendedString) guid = new PCollection_HExtendedString ( extstr );
+  T->SetDriverGUID ( guid );
+
+  if( S->IsHasOwnColor() ) T->SetColor( S->Color() );
+  else T->SetColor(-1);
+
+  if( S->IsHasOwnMaterial() ) T->SetMaterial( S->Material() );
+  else T->SetMaterial(-1);
+
+  if( S->IsHasOwnTransparency() ) T->SetTransparency( S->Transparency() );
+  else T->SetTransparency(-1.);
+
+  if( S->IsHasOwnWidth() ) T->SetWidth( S->Width() );
+  else T->SetWidth(-1.);
+
+  T->SetMode(S->Mode());
+
+#ifdef OCCT_DEBUG
+  cout << "AISPresentationStorageDriver "  << "storaged DriverGUID ==> "   << guid->Convert() << endl;
+#endif
+}
diff --git a/src/MPrsStd/MPrsStd.cdl b/src/MPrsStd/MPrsStd.cdl
deleted file mode 100644 (file)
index 0f7b8d0..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
--- Created on: 1997-08-26
--- Created by: SMO
--- Copyright (c) 1997-1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-package MPrsStd 
-
-       ---Purpose: Storage    and  Retrieval  drivers   for graphic
-       --          attributes.   Transient  attributes are defined in
-       --          package TPrsStd and persistent one are defined in
-       --          package PPrsStd
-
-uses TDF,
-     PDF,
-     MDF, 
-     CDM
-
-is
-
-           ---Category: StorageDriver
-
-       class AISPresentationStorageDriver;
-       class PositionStorageDriver;
-
-
-        ---Category: RetrievalDriver
-
-        class AISPresentationRetrievalDriver;
-        class AISPresentationRetrievalDriver_1;        
-       class PositionRetrievalDriver;
-       
-    AddStorageDrivers(aDriverTable : ASDriverHSequence from MDF;theMessageDriver : MessageDriver from CDM);
-       ---Purpose: Adds the attribute storage drivers to <aDriverTable>.
-       ---Category: StorageDriversTable
-
-
-    AddRetrievalDrivers(aDriverTable : ARDriverHSequence from MDF;theMessageDriver : MessageDriver from CDM);
-       ---Purpose: Adds the attribute retrieval drivers to <aDriverTable>.
-       ---Category: RetrievalDriversTable
-
-
-end MPrsStd;
-
-
-
diff --git a/src/MPrsStd/MPrsStd.cxx b/src/MPrsStd/MPrsStd.cxx
deleted file mode 100644 (file)
index 4fe10b5..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-// Created on: 1997-08-26
-// Created by: Guest Design
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-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 <MPrsStd.ixx>
-#include <MDF_ASDriverHSequence.hxx>
-#include <MDF_ARDriverHSequence.hxx>
-#include <MPrsStd_AISPresentationStorageDriver.hxx>
-#include <MPrsStd_AISPresentationRetrievalDriver.hxx>
-#include <MPrsStd_AISPresentationRetrievalDriver_1.hxx>
-//#include <MPrsStd_AISViewerStorageDriver.hxx>
-//#include <MPrsStd_AISViewerRetrievalDriver.hxx> 
-#include <MPrsStd_PositionStorageDriver.hxx>
-#include <MPrsStd_PositionRetrievalDriver.hxx>
-
-//=======================================================================
-//function : AddStorageDriver
-//purpose  : 
-//=======================================================================
-
-void MPrsStd::AddStorageDrivers
-(const Handle(MDF_ASDriverHSequence)& aDriverSeq, const Handle(CDM_MessageDriver)& theMsgDriver)
-{
-  aDriverSeq->Append(new MPrsStd_AISPresentationStorageDriver(theMsgDriver));
-//  aDriverSeq->Append(new MPrsStd_AISViewerStorageDriver());
-  aDriverSeq->Append(new MPrsStd_PositionStorageDriver(theMsgDriver));
-}
-
-
-//=======================================================================
-//function : AddRetrievalDriver
-//purpose  : 
-//=======================================================================
-
-void MPrsStd::AddRetrievalDrivers
-(const Handle(MDF_ARDriverHSequence)& aDriverSeq, const Handle(CDM_MessageDriver)& theMsgDriver)
-{
-  aDriverSeq->Append(new MPrsStd_AISPresentationRetrievalDriver(theMsgDriver));
-  aDriverSeq->Append(new MPrsStd_AISPresentationRetrievalDriver_1(theMsgDriver));
-//  aDriverSeq->Append(new MPrsStd_AISViewerRetrievalDriver());
-  aDriverSeq->Append(new MPrsStd_PositionRetrievalDriver(theMsgDriver));
-}
-
-
diff --git a/src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver.cdl b/src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver.cdl
deleted file mode 100644 (file)
index 77886fb..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
--- Created on: 1999-07-08
--- Created by: Sergey RUIN
--- Copyright (c) 1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-class AISPresentationRetrievalDriver from MPrsStd  inherits ARDriver from MDF
-
-           ---Purpose: Retrieval drivers for graphic attributes from
-           --          PPrsStd
-
-uses RRelocationTable from MDF,
-     Attribute        from PDF,
-     Attribute        from TDF, 
-     MessageDriver from CDM
-
-is
-
-
-    Create(theMessageDriver : MessageDriver from CDM)  -- Version 0
-    returns AISPresentationRetrievalDriver from MPrsStd;
-    
-
-    VersionNumber(me) returns Integer from Standard;
-       ---Purpose: Returns the version number from which the driver
-       --          is available: 0.
-
-    SourceType(me) returns Type from Standard;
-       ---Purpose: Returns the type: AISPresentation from PPrsStd.
-
-    NewEmpty (me)  returns Attribute from TDF;
-
-
-    Paste(me;
-         Source     :         Attribute from PDF;
-         Target     : Attribute from TDF;
-         RelocTable : RRelocationTable  from MDF);
-
-end AISPresentationRetrievalDriver;
diff --git a/src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver.cxx b/src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver.cxx
deleted file mode 100644 (file)
index 00312ad..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-// Created on: 1999-07-08
-// Created by: Sergey RUIN
-// Copyright (c) 1999-1999 Matra Datavision
-// Copyright (c) 1999-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 <MPrsStd_AISPresentationRetrievalDriver.ixx>
-
-#include <PPrsStd_AISPresentation.hxx>
-#include <TPrsStd_AISPresentation.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <PCollection_HExtendedString.hxx>
-#include <Quantity_NameOfColor.hxx>
-#include <Graphic3d_NameOfMaterial.hxx>
-#include <CDM_MessageDriver.hxx>
-
-//=======================================================================
-//function : MPrsStd_AISPresentationRetrievalDriver
-//purpose  : 
-//=======================================================================
-
-MPrsStd_AISPresentationRetrievalDriver::MPrsStd_AISPresentationRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver)
-{}
-
-Standard_Integer MPrsStd_AISPresentationRetrievalDriver::VersionNumber() const
-{ return 0; }
-
-Handle(Standard_Type) MPrsStd_AISPresentationRetrievalDriver::SourceType() const
-{ return STANDARD_TYPE(PPrsStd_AISPresentation); }
-
-Handle(TDF_Attribute) MPrsStd_AISPresentationRetrievalDriver::NewEmpty() const
-{ return new TPrsStd_AISPresentation; }
-
-void MPrsStd_AISPresentationRetrievalDriver::Paste(const Handle(PDF_Attribute)& Source,
-                                                   const Handle(TDF_Attribute)& Target,
-                                                   const Handle(MDF_RRelocationTable)& /*RelocTable*/) const
-{
-  Handle(PPrsStd_AISPresentation) S = Handle(PPrsStd_AISPresentation)::DownCast (Source);
-  Handle(TPrsStd_AISPresentation) T = Handle(TPrsStd_AISPresentation)::DownCast (Target);
-
-  T->SetDisplayed( S->IsDisplayed() );  
-
-  TCollection_ExtendedString extstr = (S->GetDriverGUID())->Convert();   
-  Standard_GUID guid( extstr.ToExtString() );  
-  T->SetDriverGUID( guid ); 
-
-  if( S->Color() != -1 ) T->SetColor( (Quantity_NameOfColor)(S->Color()) );
-  else T->UnsetColor();
-
-  if( S->Material() != -1 ) T->SetMaterial( (Graphic3d_NameOfMaterial)(S->Material()) );
-  else T->UnsetMaterial(); 
-
-  if( S->Transparency() != -1. ) T->SetTransparency( S->Transparency() );
-  else T->UnsetTransparency(); 
-
-  if( S->Width() != -1. ) T->SetWidth( S->Width() );
-  else T->UnsetWidth(); 
-
-#ifdef OCCT_DEBUG
-  cout << "AISPresentationRetrievalDriver "  << "retrieved DriverGUID ==> ";
-  guid.ShallowDump(cout);
-  cout << endl;
-#endif
-}
-
diff --git a/src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver_1.cdl b/src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver_1.cdl
deleted file mode 100644 (file)
index b54560e..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
--- Created on: 1999-07-08
--- Created by: Sergey RUIN
--- Copyright (c) 1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-class AISPresentationRetrievalDriver_1 from MPrsStd  inherits ARDriver from MDF
-
-           ---Purpose: Retrieval drivers for graphic attributes from
-           --          PPrsStd
-
-uses RRelocationTable from MDF,
-     Attribute        from PDF,
-     Attribute        from TDF, 
-     MessageDriver    from CDM
-
-is
-
-
-    Create (theMessageDriver : MessageDriver from CDM) -- Version 1
-    returns AISPresentationRetrievalDriver_1 from MPrsStd;
-    
-
-    VersionNumber(me) returns Integer from Standard;
-       ---Purpose: Returns the version number from which the driver
-       --          is available: 1.
-
-    SourceType(me) returns Type from Standard;
-       ---Purpose: Returns the type: AISPresentation from PPrsStd.
-
-    NewEmpty (me)  returns Attribute from TDF;
-
-
-    Paste(me;
-         Source     :         Attribute from PDF;
-         Target     : Attribute from TDF;
-         RelocTable : RRelocationTable  from MDF);
-
-end AISPresentationRetrievalDriver_1;
diff --git a/src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver_1.cxx b/src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver_1.cxx
deleted file mode 100644 (file)
index 606792f..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-// Created on: 1999-07-08
-// Created by: Sergey RUIN
-// Copyright (c) 1999-1999 Matra Datavision
-// Copyright (c) 1999-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 <MPrsStd_AISPresentationRetrievalDriver_1.ixx>
-
-#include <PPrsStd_AISPresentation_1.hxx>
-#include <TPrsStd_AISPresentation.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <PCollection_HExtendedString.hxx>
-#include <Quantity_NameOfColor.hxx>
-#include <Graphic3d_NameOfMaterial.hxx>
-#include <CDM_MessageDriver.hxx>
-
-//=======================================================================
-//function : MPrsStd_AISPresentationRetrievalDriver_1
-//purpose  : 
-//=======================================================================
-
-MPrsStd_AISPresentationRetrievalDriver_1::MPrsStd_AISPresentationRetrievalDriver_1(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver)
-{}
-
-Standard_Integer MPrsStd_AISPresentationRetrievalDriver_1::VersionNumber() const
-{ return 1; }
-
-Handle(Standard_Type) MPrsStd_AISPresentationRetrievalDriver_1::SourceType() const
-{ return STANDARD_TYPE(PPrsStd_AISPresentation_1); }
-
-Handle(TDF_Attribute) MPrsStd_AISPresentationRetrievalDriver_1::NewEmpty() const
-{ return new TPrsStd_AISPresentation; }
-
-void MPrsStd_AISPresentationRetrievalDriver_1::Paste(const Handle(PDF_Attribute)& Source,
-                                                     const Handle(TDF_Attribute)& Target,
-                                                     const Handle(MDF_RRelocationTable)& /*RelocTable*/) const
-{
-  Handle(PPrsStd_AISPresentation_1) S = Handle(PPrsStd_AISPresentation_1)::DownCast (Source);
-  Handle(TPrsStd_AISPresentation) T = Handle(TPrsStd_AISPresentation)::DownCast (Target);
-
-  T->SetDisplayed( S->IsDisplayed() );  
-
-  TCollection_ExtendedString extstr = (S->GetDriverGUID())->Convert();   
-  Standard_GUID guid( extstr.ToExtString() );  
-  T->SetDriverGUID( guid ); 
-
-  if( S->Color() != -1 ) T->SetColor( (Quantity_NameOfColor)(S->Color()) );
-  else T->UnsetColor();
-
-  if( S->Material() != -1 ) T->SetMaterial( (Graphic3d_NameOfMaterial)(S->Material()) );
-  else T->UnsetMaterial(); 
-
-  if( S->Transparency() != -1. ) T->SetTransparency( S->Transparency() );
-  else T->UnsetTransparency(); 
-
-  if( S->Width() != -1. ) T->SetWidth( S->Width() );
-  else T->UnsetWidth(); 
-
-  T->SetMode(S->Mode());
-  
-#ifdef OCCT_DEBUG
-  cout << "AISPresentationRetrievalDriver "  << "retrieved DriverGUID ==> ";
-  guid.ShallowDump(cout);
-  cout << endl;
-#endif
-}
-
-
diff --git a/src/MPrsStd/MPrsStd_AISPresentationStorageDriver.cdl b/src/MPrsStd/MPrsStd_AISPresentationStorageDriver.cdl
deleted file mode 100644 (file)
index 774b71b..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
--- Created on: 1999-07-08
--- Created by: Sergey RUIN
--- Copyright (c) 1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-class AISPresentationStorageDriver from MPrsStd inherits ASDriver from MDF
-
-       ---Purpose: Storage driver for graphic attributes from
-       --          TPrsStd
-
-uses SRelocationTable from MDF,
-     Attribute        from TDF,
-     Attribute        from PDF, 
-     MessageDriver    from CDM
-
-
-is
-
-    Create (theMessageDriver : MessageDriver from CDM)
-    returns AISPresentationStorageDriver from MPrsStd;
-
-
-    VersionNumber(me) returns Integer from Standard;
-       ---Purpose: Returns the version number from which the driver
-       --          is available: 0.
-
-    SourceType(me) returns Type from Standard;
-       ---Purpose: Returns the type: AISPresentation from TPrsStd.
-
-    NewEmpty (me) returns Attribute from PDF;
-
-
-    Paste(me;
-         Source     :         Attribute from TDF;
-         Target     : Attribute from PDF;
-         RelocTable : SRelocationTable from MDF);
-
-
-end AISPresentationStorageDriver;
-
diff --git a/src/MPrsStd/MPrsStd_AISPresentationStorageDriver.cxx b/src/MPrsStd/MPrsStd_AISPresentationStorageDriver.cxx
deleted file mode 100644 (file)
index 9c04c74..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-// Created on: 1997-07-08
-// Created by: Sergey RUIN
-// Copyright (c) 1997-1999 Matra Datavision
-// Copyright (c) 1999-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 <MPrsStd_AISPresentationStorageDriver.ixx>
-
-#include <PPrsStd_AISPresentation.hxx>
-#include <PPrsStd_AISPresentation_1.hxx>
-#include <TPrsStd_AISPresentation.hxx>
-#include <AIS_InteractiveObject.hxx>
-#include <AIS_InteractiveContext.hxx>
-#include <V3d_Viewer.hxx>
-#include <TCollection_ExtendedString.hxx>
-#include <PCollection_HExtendedString.hxx>
-#include <CDM_MessageDriver.hxx>
-
-//=======================================================================
-//function : MPrsStd_AISPresentationStorageDriver
-//purpose  : 
-//=======================================================================
-
-MPrsStd_AISPresentationStorageDriver::MPrsStd_AISPresentationStorageDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ASDriver(theMsgDriver)
-{
-}
-
-Standard_Integer MPrsStd_AISPresentationStorageDriver::VersionNumber() const
-{ return 0; }
-
-Handle(Standard_Type) MPrsStd_AISPresentationStorageDriver::SourceType() const
-{ return STANDARD_TYPE(TPrsStd_AISPresentation); }
-
-Handle(PDF_Attribute) MPrsStd_AISPresentationStorageDriver::NewEmpty() const
-{
-// return new PPrsStd_AISPresentation; 
-  return new PPrsStd_AISPresentation_1;
-}
-
-void MPrsStd_AISPresentationStorageDriver::Paste(const Handle(TDF_Attribute)& Source,
-                                                const Handle(PDF_Attribute)& Target,
-                                                const Handle(MDF_SRelocationTable)& /*RelocTable*/) const
-{
-  Handle(TPrsStd_AISPresentation) S = Handle(TPrsStd_AISPresentation)::DownCast (Source);
-
-  // Handle(PPrsStd_AISPresentation) T = Handle(PPrsStd_AISPresentation)::DownCast (Target);
-  Handle(PPrsStd_AISPresentation_1) T = Handle(PPrsStd_AISPresentation_1)::DownCast (Target);
-
-  T->SetDisplayed( S->IsDisplayed() );  
-
-  TCollection_ExtendedString  extstr("00000000-0000-0000-0000-000000000000");  //covert GUID into ExtendedString
-  Standard_PExtCharacter pStr;
-  //
-  pStr=(Standard_PExtCharacter)extstr.ToExtString();
-  S->GetDriverGUID().ToExtString(pStr); 
-
-  Handle(PCollection_HExtendedString) guid = new PCollection_HExtendedString ( extstr ); 
-  T->SetDriverGUID ( guid );    
-
-  if( S->HasOwnColor() ) T->SetColor( (Standard_Integer)(S->Color())  );
-  else T->SetColor(-1);
-
-  if( S->HasOwnMaterial() ) T->SetMaterial( (Standard_Integer)(S->Material())  );
-  else T->SetMaterial(-1);
-
-  if( S->HasOwnTransparency() ) T->SetTransparency( S->Transparency() );
-  else T->SetTransparency(-1.);
-
-  if( S->HasOwnWidth() ) T->SetWidth( S->Width() );
-  else T->SetWidth(-1.);  
-
-   T->SetMode(S->Mode());
-
-#ifdef OCCT_DEBUG
-  cout << "AISPresentationStorageDriver "  << "storaged DriverGUID ==> "   << guid->Convert() << endl;
-#endif
-}
-
-
-
diff --git a/src/MPrsStd/MPrsStd_PositionRetrievalDriver.cdl b/src/MPrsStd/MPrsStd_PositionRetrievalDriver.cdl
deleted file mode 100644 (file)
index d0c078d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
--- Created on: 1998-04-07
--- Created by: Jean-Pierre COMBE
--- Copyright (c) 1998-1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-class PositionRetrievalDriver from MPrsStd inherits ARDriver from MDF
-           ---Purpose: Retrieval drivers for graphic attributes from
-           --          PPrsStd
-
-
-uses RRelocationTable from MDF,
-     Attribute        from PDF,
-     Attribute        from TDF, 
-     MessageDriver    from CDM
-
-is
-
-
-    Create(theMessageDriver : MessageDriver from CDM)  -- Version 0
-    returns PositionRetrievalDriver from MPrsStd;
-    
-
-    VersionNumber(me) returns Integer from Standard;
-       ---Purpose: Returns the version number from which the driver
-       --          is available: 0.
-
-    SourceType(me) returns Type from Standard;
-       ---Purpose: Returns the type: ColorAttribute from PGraphicAttribute.
-
-    NewEmpty (me)  returns Attribute from TDF;
-
-
-    Paste(me;
-         Source     :         Attribute from PDF;
-         Target     : Attribute from TDF;
-         RelocTable : RRelocationTable  from MDF);
-
-end PositionRetrievalDriver;
diff --git a/src/MPrsStd/MPrsStd_PositionRetrievalDriver.cxx b/src/MPrsStd/MPrsStd_PositionRetrievalDriver.cxx
deleted file mode 100644 (file)
index f4fc72d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-// Created on: 1998-04-07
-// Created by: Jean-Pierre COMBE
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-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 <MPrsStd_PositionRetrievalDriver.ixx>
-
-#include <PDataXtd_Position.hxx>
-#include <TDataXtd_Position.hxx>
-#include <CDM_MessageDriver.hxx>
-
-//=======================================================================
-//function : MPrsStd_PositionRetrievalDriver
-//purpose  : 
-//=======================================================================
-MPrsStd_PositionRetrievalDriver::MPrsStd_PositionRetrievalDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ARDriver(theMsgDriver)
-{}
-
-//=======================================================================
-//function : VersionNumber
-//purpose  : 
-//=======================================================================
-Standard_Integer MPrsStd_PositionRetrievalDriver::VersionNumber() const
-{ return 0; }
-
-//=======================================================================
-//function : SourceType
-//purpose  : 
-//=======================================================================
-Handle(Standard_Type) MPrsStd_PositionRetrievalDriver::SourceType() const
-{ return STANDARD_TYPE(PDataXtd_Position); }
-
-//=======================================================================
-//function : NewEmpty
-//purpose  : 
-//=======================================================================
-Handle(TDF_Attribute) MPrsStd_PositionRetrievalDriver::NewEmpty() const
-{ return new TDataXtd_Position; }
-
-//=======================================================================
-//function : Paste
-//purpose  : 
-//=======================================================================
-void MPrsStd_PositionRetrievalDriver::Paste(const Handle(PDF_Attribute)& Source,
-                                                           const Handle(TDF_Attribute)& Target,
-                                                           const Handle(MDF_RRelocationTable)& /*RelocTable*/) const
-{
-  Handle(PDataXtd_Position) S = Handle(PDataXtd_Position)::DownCast (Source);
-  Handle(TDataXtd_Position) T = Handle(TDataXtd_Position)::DownCast (Target);  
-  T->SetPosition(S->GetPosition());
-}
-
diff --git a/src/MPrsStd/MPrsStd_PositionStorageDriver.cdl b/src/MPrsStd/MPrsStd_PositionStorageDriver.cdl
deleted file mode 100644 (file)
index 1d5c961..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
--- Created on: 1998-04-07
--- Created by: Jean-Pierre COMBE
--- Copyright (c) 1998-1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-class PositionStorageDriver from MPrsStd inherits ASDriver from MDF
-
-       ---Purpose: Storage driver for graphic attributes from
-       --          TPrsStd
-
-uses SRelocationTable from MDF,
-     Attribute        from TDF,
-     Attribute        from PDF, 
-     MessageDriver    from CDM
-
-
-is
-
-    Create(theMessageDriver : MessageDriver from CDM)  
-    returns PositionStorageDriver from MPrsStd;
-
-
-    VersionNumber(me) returns Integer from Standard;
-       ---Purpose: Returns the version number from which the driver
-       --          is available: 0.
-
-    SourceType(me) returns Type from Standard;
-       ---Purpose: Returns the type: ColorAttribute from TGraphicAttribute.
-
-    NewEmpty (me) returns Attribute from PDF;
-
-
-    Paste(me;
-         Source     :         Attribute from TDF;
-         Target     : Attribute from PDF;
-         RelocTable : SRelocationTable from MDF);
-
-
-end PositionStorageDriver;
-
diff --git a/src/MPrsStd/MPrsStd_PositionStorageDriver.cxx b/src/MPrsStd/MPrsStd_PositionStorageDriver.cxx
deleted file mode 100644 (file)
index 0812237..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-// Created on: 1998-04-07
-// Created by: Jean-Pierre COMBE
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-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 <MPrsStd_PositionStorageDriver.ixx>
-
-#include <PDataXtd_Position.hxx>
-#include <TDataXtd_Position.hxx>
-#include <CDM_MessageDriver.hxx>
-
-//=======================================================================
-//function : MPrsStd_PositionStorageDriver
-//purpose  : 
-//=======================================================================
-MPrsStd_PositionStorageDriver::MPrsStd_PositionStorageDriver(const Handle(CDM_MessageDriver)& theMsgDriver):MDF_ASDriver(theMsgDriver)
-{
-}
-
-//=======================================================================
-//function : VersionNumber
-//purpose  : 
-//=======================================================================
-Standard_Integer MPrsStd_PositionStorageDriver::VersionNumber() const
-{ return 0; }
-
-//=======================================================================
-//function : SourceType
-//purpose  : 
-//=======================================================================
-Handle(Standard_Type) MPrsStd_PositionStorageDriver::SourceType() const
-{ return STANDARD_TYPE(TDataXtd_Position); }
-
-//=======================================================================
-//function : NewEmpty
-//purpose  : 
-//=======================================================================
-Handle(PDF_Attribute) MPrsStd_PositionStorageDriver::NewEmpty() const
-{ return new PDataXtd_Position; }
-
-//=======================================================================
-//function : Paste
-//purpose  : 
-//=======================================================================
-void MPrsStd_PositionStorageDriver::Paste(const Handle(TDF_Attribute)& Source,
-                                                         const Handle(PDF_Attribute)& Target,
-                                                         const Handle(MDF_SRelocationTable)& /*RelocTable*/) const
-{
-  Handle(TDataXtd_Position) S = Handle(TDataXtd_Position)::DownCast (Source);
-  Handle(PDataXtd_Position) T = Handle(PDataXtd_Position)::DownCast (Target);  
-  T->SetPosition(S->GetPosition());
-}
-
-
index 372d10d0ea357bc6574344aad640c179099c8549..ce58f9fcb9f9d50a18c3b5189968d64c1efaf87a 100644 (file)
@@ -21,6 +21,7 @@ proc ApplicationFramework:toolkits { } {
                TKCDF \
                TKLCAF \
                 TKCAF \
+                TKVCAF \
                 TKBinL \
                 TKXmlL \
                TKShapeSchema \
index 71ac6ccf444f88fa79117b6a04f27052f9820b7d..4879476570b5d82b2ea0902f1128a1dab6c1903c 100644 (file)
@@ -58,7 +58,11 @@ is
     
     class PatternStd;
     
-    class Shape; 
+    class Shape;
+
+    class Presentation;
+
+    class Presentation_1;
      
  
 end PDataXtd;
diff --git a/src/PDataXtd/PDataXtd_Presentation.cdl b/src/PDataXtd/PDataXtd_Presentation.cdl
new file mode 100644 (file)
index 0000000..ef7dab9
--- /dev/null
@@ -0,0 +1,54 @@
+-- Created on: 1999-07-08
+-- Created by: Sergey RUIN
+-- Copyright (c) 1999 Matra Datavision
+-- Copyright (c) 1999-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+class Presentation from PDataXtd 
+    inherits Attribute from PDF
+
+       ---Purpose: 
+    
+uses    HExtendedString from PCollection
+is
+
+    Create returns Presentation from PDataXtd;
+       
+    IsDisplayed(me) returns Boolean from Standard;
+    SetDisplayed(me : mutable; B : Boolean from Standard);
+
+    SetDriverGUID(me: mutable; guid: HExtendedString from PCollection );     
+    GetDriverGUID(me) returns HExtendedString from PCollection; 
+    
+    Color(me) returns Integer from Standard;
+    SetColor(me : mutable; C : Integer from Standard);
+    
+    Transparency(me) returns Real from Standard;
+    SetTransparency(me : mutable; T : Real from Standard);    
+    
+    Material(me) returns Integer from Standard;
+    SetMaterial(me : mutable; M : Integer from Standard);    
+   
+    Width(me) returns Real from Standard;
+    SetWidth(me : mutable; W : Real from Standard);
+    
+    
+fields
+
+    myIsDisplayed         : Boolean              from Standard;
+    myDriverGUID          : HExtendedString      from PCollection; 
+    myTransparency        : Real                 from Standard;
+    myColor               : Integer              from Standard;
+    myMaterial            : Integer              from Standard;
+    myWidth               : Real                 from Standard;
+end Presentation;
diff --git a/src/PDataXtd/PDataXtd_Presentation.cxx b/src/PDataXtd/PDataXtd_Presentation.cxx
new file mode 100644 (file)
index 0000000..ccc9bf8
--- /dev/null
@@ -0,0 +1,144 @@
+// Created on: 1999-07-08
+// Created by: srn
+// Copyright (c) 1999-1999 Matra Datavision
+// Copyright (c) 1999-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 <PDataXtd_Presentation.ixx>
+
+
+//=======================================================================
+//function : PDataXtd_Presentation
+//purpose  : 
+//=======================================================================
+
+PDataXtd_Presentation::PDataXtd_Presentation() :
+  myIsDisplayed(Standard_False),
+  myTransparency(0.),
+  myColor(0),
+  myMaterial(0),
+  myWidth(0.)
+{}
+
+
+//=======================================================================
+//function : SetDisplayed
+//purpose  : 
+//=======================================================================
+
+void PDataXtd_Presentation::SetDisplayed (const Standard_Boolean B)
+{
+  myIsDisplayed = B ;
+}
+
+//=======================================================================
+//function : IsDisplayed
+//purpose  : 
+//=======================================================================
+
+Standard_Boolean PDataXtd_Presentation::IsDisplayed() const 
+{
+  return myIsDisplayed;
+}
+
+
+//=======================================================================
+//function : SetDriverGUID
+//purpose  : 
+//=======================================================================
+void PDataXtd_Presentation::SetDriverGUID( const Handle(PCollection_HExtendedString)&  guid)
+{
+  myDriverGUID = guid;
+}
+
+//=======================================================================
+//function : GetDriverGUID
+//purpose  : 
+//=======================================================================
+Handle(PCollection_HExtendedString) PDataXtd_Presentation::GetDriverGUID( void ) const
+{
+  return myDriverGUID;
+}
+
+//=======================================================================
+//function : Color
+//purpose  : 
+//=======================================================================
+Standard_Integer PDataXtd_Presentation::Color() const
+{
+  return myColor;
+}
+
+//=======================================================================
+//function : SetColor
+//purpose  : 
+//=======================================================================
+void PDataXtd_Presentation::SetColor(const Standard_Integer C) 
+{
+  myColor = C;
+}
+
+//=======================================================================
+//function : Transparency
+//purpose  : 
+//=======================================================================
+Standard_Real PDataXtd_Presentation::Transparency() const
+{
+  return myTransparency;
+}
+
+//=======================================================================
+//function : SetTransparency
+//purpose  : 
+//=======================================================================
+void PDataXtd_Presentation::SetTransparency(const Standard_Real T) 
+{
+  myTransparency = T;
+}
+
+//=======================================================================
+//function : Material
+//purpose  : 
+//=======================================================================
+Standard_Integer PDataXtd_Presentation::Material() const
+{
+  return myMaterial;
+}
+
+//=======================================================================
+//function : SetMaterial
+//purpose  : 
+//=======================================================================
+void PDataXtd_Presentation::SetMaterial(const Standard_Integer M) 
+{
+  myMaterial = M;
+}
+
+//=======================================================================
+//function : Width 
+//purpose  : 
+//=======================================================================
+Standard_Real PDataXtd_Presentation::Width() const
+{
+  return myWidth;
+}
+
+//=======================================================================
+//function : SetWidth
+//purpose  : 
+//=======================================================================
+void PDataXtd_Presentation::SetWidth(const Standard_Real W) 
+{
+  myWidth = W;
+}
+
diff --git a/src/PDataXtd/PDataXtd_Presentation_1.cdl b/src/PDataXtd/PDataXtd_Presentation_1.cdl
new file mode 100644 (file)
index 0000000..886f448
--- /dev/null
@@ -0,0 +1,56 @@
+-- Created on: 1999-07-08
+-- Created by: Sergey RUIN
+-- Copyright (c) 1999 Matra Datavision
+-- Copyright (c) 1999-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+class Presentation_1 from PDataXtd 
+    inherits Attribute from PDF
+
+       ---Purpose: 
+    
+uses    HExtendedString from PCollection
+is
+
+    Create returns Presentation_1 from PDataXtd;
+       
+    IsDisplayed(me) returns Boolean from Standard;
+    SetDisplayed(me : mutable; B : Boolean from Standard);
+
+    SetDriverGUID(me: mutable; guid: HExtendedString from PCollection );     
+    GetDriverGUID(me) returns HExtendedString from PCollection; 
+    
+    Color(me) returns Integer from Standard;
+    SetColor(me : mutable; C : Integer from Standard);
+    
+    Transparency(me) returns Real from Standard;
+    SetTransparency(me : mutable; T : Real from Standard);    
+    
+    Material(me) returns Integer from Standard;
+    SetMaterial(me : mutable; M : Integer from Standard);    
+   
+    Width(me) returns Real from Standard;
+    SetWidth(me : mutable; W : Real from Standard);
+    Mode(me)    returns Integer from Standard; 
+    SetMode(me : mutable; M : Integer from Standard);    
+fields
+
+    myIsDisplayed         : Boolean              from Standard;
+    myDriverGUID          : HExtendedString      from PCollection; 
+    myTransparency        : Real                 from Standard;
+    myColor               : Integer              from Standard;
+    myMaterial            : Integer              from Standard;
+    myWidth               : Real                 from Standard; 
+    myMode                : Integer              from Standard;
+end Presentation_1;
diff --git a/src/PDataXtd/PDataXtd_Presentation_1.cxx b/src/PDataXtd/PDataXtd_Presentation_1.cxx
new file mode 100644 (file)
index 0000000..61eddfc
--- /dev/null
@@ -0,0 +1,172 @@
+// Created on: 1999-07-08
+// Created by: srn
+// Copyright (c) 1999-1999 Matra Datavision
+// Copyright (c) 1999-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 <PDataXtd_Presentation_1.ixx>
+
+
+//=======================================================================
+//function : PDataXtd_Presentation_1
+//purpose  : 
+//=======================================================================
+
+PDataXtd_Presentation_1::PDataXtd_Presentation_1() :
+    myIsDisplayed(Standard_False),
+    myTransparency(0.),
+    myColor(0),
+    myMaterial(0),
+    myWidth(0.),
+    myMode(0)
+{
+}
+
+
+//=======================================================================
+//function : SetDisplayed
+//purpose  : 
+//=======================================================================
+
+void PDataXtd_Presentation_1::SetDisplayed (const Standard_Boolean B)
+{
+  myIsDisplayed = B ;
+}
+
+//=======================================================================
+//function : IsDisplayed
+//purpose  : 
+//=======================================================================
+
+Standard_Boolean PDataXtd_Presentation_1::IsDisplayed() const 
+{
+    return myIsDisplayed;
+}
+
+
+//=======================================================================
+//function : SetDriverGUID
+//purpose  : 
+//=======================================================================
+void PDataXtd_Presentation_1::SetDriverGUID( const Handle(PCollection_HExtendedString)&  guid)
+{
+  myDriverGUID = guid;
+}
+
+//=======================================================================
+//function : GetDriverGUID
+//purpose  : 
+//=======================================================================
+Handle(PCollection_HExtendedString) PDataXtd_Presentation_1::GetDriverGUID( void ) const
+{
+  return myDriverGUID;
+}
+
+//=======================================================================
+//function : Color
+//purpose  : 
+//=======================================================================
+Standard_Integer PDataXtd_Presentation_1::Color() const
+{
+  return myColor;
+}
+
+//=======================================================================
+//function : SetColor
+//purpose  : 
+//=======================================================================
+void PDataXtd_Presentation_1::SetColor(const Standard_Integer C) 
+{
+  myColor = C;
+}
+
+//=======================================================================
+//function : Transparency
+//purpose  : 
+//=======================================================================
+Standard_Real PDataXtd_Presentation_1::Transparency() const
+{
+  return myTransparency;
+}
+
+//=======================================================================
+//function : SetTransparency
+//purpose  : 
+//=======================================================================
+void PDataXtd_Presentation_1::SetTransparency(const Standard_Real T) 
+{
+  myTransparency = T;
+}
+
+//=======================================================================
+//function : Material
+//purpose  : 
+//=======================================================================
+Standard_Integer PDataXtd_Presentation_1::Material() const
+{
+  return myMaterial;
+}
+
+//=======================================================================
+//function : SetMaterial
+//purpose  : 
+//=======================================================================
+void PDataXtd_Presentation_1::SetMaterial(const Standard_Integer M) 
+{
+   myMaterial = M;
+}
+
+//=======================================================================
+//function : Width 
+//purpose  : 
+//=======================================================================
+Standard_Real PDataXtd_Presentation_1::Width() const
+{
+  return myWidth;  
+}
+
+
+
+
+//=======================================================================
+//function : SetWidth
+//purpose  : 
+//=======================================================================
+
+void PDataXtd_Presentation_1::SetWidth(const Standard_Real W) 
+{
+  myWidth = W;
+}
+
+
+
+//=======================================================================
+//function : Mode
+//purpose  : 
+//=======================================================================
+
+Standard_Integer PDataXtd_Presentation_1::Mode() const
+{
+  return myMode;
+}
+
+
+//=======================================================================
+//function : SetMode
+//purpose  : 
+//=======================================================================
+
+void PDataXtd_Presentation_1::SetMode(const Standard_Integer M) 
+{
+   myMode = M;
+}
diff --git a/src/PPrsStd/PPrsStd.cdl b/src/PPrsStd/PPrsStd.cdl
deleted file mode 100644 (file)
index 96b26a7..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
--- Created on: 1997-08-26
--- Created by: SMO
--- Copyright (c) 1997-1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-package PPrsStd
-
-uses
-
-  Standard,
-  Quantity,
-  PDF,
-  PCollection,
-  gp
-
-is
-    class AISPresentation; 
-    class AISPresentation_1;
-    --class Position; now it is in PDataStd
-    
-end PPrsStd;
-
-
diff --git a/src/PPrsStd/PPrsStd_AISPresentation.cdl b/src/PPrsStd/PPrsStd_AISPresentation.cdl
deleted file mode 100644 (file)
index 2398d29..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
--- Created on: 1999-07-08
--- Created by: Sergey RUIN
--- Copyright (c) 1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-class AISPresentation from PPrsStd 
-    inherits Attribute from PDF
-
-       ---Purpose: 
-    
-uses    HExtendedString from PCollection
-is
-
-    Create returns AISPresentation from PPrsStd;
-       
-    IsDisplayed(me) returns Boolean from Standard;
-    SetDisplayed(me : mutable; B : Boolean from Standard);
-
-    SetDriverGUID(me: mutable; guid: HExtendedString from PCollection );     
-    GetDriverGUID(me) returns HExtendedString from PCollection; 
-    
-    Color(me) returns Integer from Standard;
-    SetColor(me : mutable; C : Integer from Standard);
-    
-    Transparency(me) returns Real from Standard;
-    SetTransparency(me : mutable; T : Real from Standard);    
-    
-    Material(me) returns Integer from Standard;
-    SetMaterial(me : mutable; M : Integer from Standard);    
-   
-    Width(me) returns Real from Standard;
-    SetWidth(me : mutable; W : Real from Standard);
-    
-    
-fields
-
-    myIsDisplayed         : Boolean              from Standard;
-    myDriverGUID          : HExtendedString      from PCollection; 
-    myTransparency        : Real                 from Standard;
-    myColor               : Integer              from Standard;
-    myMaterial            : Integer              from Standard;
-    myWidth               : Real                 from Standard;
-end AISPresentation;
diff --git a/src/PPrsStd/PPrsStd_AISPresentation.cxx b/src/PPrsStd/PPrsStd_AISPresentation.cxx
deleted file mode 100644 (file)
index 9b6865d..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-// Created on: 1999-07-08
-// Created by: srn
-// Copyright (c) 1999-1999 Matra Datavision
-// Copyright (c) 1999-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 <PPrsStd_AISPresentation.ixx>
-
-
-//=======================================================================
-//function : PPrsStd_AISPresentation
-//purpose  : 
-//=======================================================================
-
-PPrsStd_AISPresentation::PPrsStd_AISPresentation() :
-    myIsDisplayed(Standard_False),
-    myTransparency(0.),
-    myColor(0),
-    myMaterial(0),
-    myWidth(0.)
-{}
-
-
-//=======================================================================
-//function : SetDisplayed
-//purpose  : 
-//=======================================================================
-
-void PPrsStd_AISPresentation::SetDisplayed (const Standard_Boolean B)       
-{
-  myIsDisplayed = B ;
-}
-
-//=======================================================================
-//function : IsDisplayed
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean PPrsStd_AISPresentation::IsDisplayed() const 
-{
-    return myIsDisplayed;
-}
-
-
-//=======================================================================
-//function : SetDriverGUID
-//purpose  : 
-//=======================================================================
-void PPrsStd_AISPresentation::SetDriverGUID( const Handle(PCollection_HExtendedString)&  guid)
-{
-  myDriverGUID = guid;
-}
-
-//=======================================================================
-//function : GetDriverGUID
-//purpose  : 
-//=======================================================================
-Handle(PCollection_HExtendedString) PPrsStd_AISPresentation::GetDriverGUID( void ) const
-{
-  return myDriverGUID;
-}
-
-//=======================================================================
-//function : Color
-//purpose  : 
-//=======================================================================
-Standard_Integer PPrsStd_AISPresentation::Color() const
-{
-  return myColor;
-}
-
-//=======================================================================
-//function : SetColor
-//purpose  : 
-//=======================================================================
-void PPrsStd_AISPresentation::SetColor(const Standard_Integer C) 
-{
-  myColor = C;
-}
-
-//=======================================================================
-//function : Transparency
-//purpose  : 
-//=======================================================================
-Standard_Real PPrsStd_AISPresentation::Transparency() const
-{
-  return myTransparency;
-}
-
-//=======================================================================
-//function : SetTransparency
-//purpose  : 
-//=======================================================================
-void PPrsStd_AISPresentation::SetTransparency(const Standard_Real T) 
-{
-  myTransparency = T;
-}
-
-//=======================================================================
-//function : Material
-//purpose  : 
-//=======================================================================
-Standard_Integer PPrsStd_AISPresentation::Material() const
-{
-  return myMaterial;
-}
-
-//=======================================================================
-//function : SetMaterial
-//purpose  : 
-//=======================================================================
-void PPrsStd_AISPresentation::SetMaterial(const Standard_Integer M) 
-{
-   myMaterial = M;
-}
-
-//=======================================================================
-//function : Width 
-//purpose  : 
-//=======================================================================
-Standard_Real PPrsStd_AISPresentation::Width() const
-{
-  return myWidth;  
-}
-
-//=======================================================================
-//function : SetWidth
-//purpose  : 
-//=======================================================================
-void PPrsStd_AISPresentation::SetWidth(const Standard_Real W) 
-{
-  myWidth = W;
-}
-
diff --git a/src/PPrsStd/PPrsStd_AISPresentation_1.cdl b/src/PPrsStd/PPrsStd_AISPresentation_1.cdl
deleted file mode 100644 (file)
index 329552b..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
--- Created on: 1999-07-08
--- Created by: Sergey RUIN
--- Copyright (c) 1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-class AISPresentation_1 from PPrsStd 
-    inherits Attribute from PDF
-
-       ---Purpose: 
-    
-uses    HExtendedString from PCollection
-is
-
-    Create returns AISPresentation_1 from PPrsStd;
-       
-    IsDisplayed(me) returns Boolean from Standard;
-    SetDisplayed(me : mutable; B : Boolean from Standard);
-
-    SetDriverGUID(me: mutable; guid: HExtendedString from PCollection );     
-    GetDriverGUID(me) returns HExtendedString from PCollection; 
-    
-    Color(me) returns Integer from Standard;
-    SetColor(me : mutable; C : Integer from Standard);
-    
-    Transparency(me) returns Real from Standard;
-    SetTransparency(me : mutable; T : Real from Standard);    
-    
-    Material(me) returns Integer from Standard;
-    SetMaterial(me : mutable; M : Integer from Standard);    
-   
-    Width(me) returns Real from Standard;
-    SetWidth(me : mutable; W : Real from Standard);
-    Mode(me)    returns Integer from Standard; 
-    SetMode(me : mutable; M : Integer from Standard);    
-fields
-
-    myIsDisplayed         : Boolean              from Standard;
-    myDriverGUID          : HExtendedString      from PCollection; 
-    myTransparency        : Real                 from Standard;
-    myColor               : Integer              from Standard;
-    myMaterial            : Integer              from Standard;
-    myWidth               : Real                 from Standard; 
-    myMode                : Integer              from Standard;
-end AISPresentation_1;
diff --git a/src/PPrsStd/PPrsStd_AISPresentation_1.cxx b/src/PPrsStd/PPrsStd_AISPresentation_1.cxx
deleted file mode 100644 (file)
index 1001cf0..0000000
+++ /dev/null
@@ -1,172 +0,0 @@
-// Created on: 1999-07-08
-// Created by: srn
-// Copyright (c) 1999-1999 Matra Datavision
-// Copyright (c) 1999-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 <PPrsStd_AISPresentation_1.ixx>
-
-
-//=======================================================================
-//function : PPrsStd_AISPresentation
-//purpose  : 
-//=======================================================================
-
-PPrsStd_AISPresentation_1::PPrsStd_AISPresentation_1() :
-    myIsDisplayed(Standard_False),
-    myTransparency(0.),
-    myColor(0),
-    myMaterial(0),
-    myWidth(0.),
-    myMode(0)
-{
-}
-
-
-//=======================================================================
-//function : SetDisplayed
-//purpose  : 
-//=======================================================================
-
-void PPrsStd_AISPresentation_1::SetDisplayed (const Standard_Boolean B)       
-{
-  myIsDisplayed = B ;
-}
-
-//=======================================================================
-//function : IsDisplayed
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean PPrsStd_AISPresentation_1::IsDisplayed() const 
-{
-    return myIsDisplayed;
-}
-
-
-//=======================================================================
-//function : SetDriverGUID
-//purpose  : 
-//=======================================================================
-void PPrsStd_AISPresentation_1::SetDriverGUID( const Handle(PCollection_HExtendedString)&  guid)
-{
-  myDriverGUID = guid;
-}
-
-//=======================================================================
-//function : GetDriverGUID
-//purpose  : 
-//=======================================================================
-Handle(PCollection_HExtendedString) PPrsStd_AISPresentation_1::GetDriverGUID( void ) const
-{
-  return myDriverGUID;
-}
-
-//=======================================================================
-//function : Color
-//purpose  : 
-//=======================================================================
-Standard_Integer PPrsStd_AISPresentation_1::Color() const
-{
-  return myColor;
-}
-
-//=======================================================================
-//function : SetColor
-//purpose  : 
-//=======================================================================
-void PPrsStd_AISPresentation_1::SetColor(const Standard_Integer C) 
-{
-  myColor = C;
-}
-
-//=======================================================================
-//function : Transparency
-//purpose  : 
-//=======================================================================
-Standard_Real PPrsStd_AISPresentation_1::Transparency() const
-{
-  return myTransparency;
-}
-
-//=======================================================================
-//function : SetTransparency
-//purpose  : 
-//=======================================================================
-void PPrsStd_AISPresentation_1::SetTransparency(const Standard_Real T) 
-{
-  myTransparency = T;
-}
-
-//=======================================================================
-//function : Material
-//purpose  : 
-//=======================================================================
-Standard_Integer PPrsStd_AISPresentation_1::Material() const
-{
-  return myMaterial;
-}
-
-//=======================================================================
-//function : SetMaterial
-//purpose  : 
-//=======================================================================
-void PPrsStd_AISPresentation_1::SetMaterial(const Standard_Integer M) 
-{
-   myMaterial = M;
-}
-
-//=======================================================================
-//function : Width 
-//purpose  : 
-//=======================================================================
-Standard_Real PPrsStd_AISPresentation_1::Width() const
-{
-  return myWidth;  
-}
-
-
-
-
-//=======================================================================
-//function : SetWidth
-//purpose  : 
-//=======================================================================
-
-void PPrsStd_AISPresentation_1::SetWidth(const Standard_Real W) 
-{
-  myWidth = W;
-}
-
-
-
-//=======================================================================
-//function : Mode
-//purpose  : 
-//=======================================================================
-
-Standard_Integer PPrsStd_AISPresentation_1::Mode() const
-{
-  return myMode;
-}
-
-
-//=======================================================================
-//function : SetMode
-//purpose  : 
-//=======================================================================
-
-void PPrsStd_AISPresentation_1::SetMode(const Standard_Integer M) 
-{
-   myMode = M;
-}
index 331e7250481283a9f83c1305f03d98f513790b86..2f6c72ead8f9ef0a95af1576d9a05aab3f326d68 100644 (file)
@@ -22,7 +22,6 @@
 #include <MNaming.hxx>  
 #include <MDocStd.hxx> 
 #include <MFunction.hxx>
-#include <MPrsStd.hxx>
 #include <CDM_MessageDriver.hxx>
 //=======================================================================
 //function : PAppStd_DocumentRetrievalDriver
@@ -47,7 +46,6 @@ Handle(MDF_ARDriverTable) StdDrivers_DocumentRetrievalDriver::AttributeDrivers(c
   MDocStd::AddRetrievalDrivers(HARSeq, theMsgDriver);
   MFunction::AddRetrievalDrivers(HARSeq, theMsgDriver);
   MNaming::AddRetrievalDrivers(HARSeq, theMsgDriver); 
-  MPrsStd::AddRetrievalDrivers(HARSeq, theMsgDriver); 
  
   //
   aRetrievalTable->SetDrivers(HARSeq);
index 6511faa1dfaddb9213fa717cfcf781db83644e9b..62b5a5a84de8d448695c3a2d071bc7b9e3407c34 100644 (file)
@@ -19,7 +19,6 @@
 #include <MDataXtd.hxx>
 #include <MNaming.hxx>  
 #include <MDocStd.hxx> 
-#include <MPrsStd.hxx>
 #include <MFunction.hxx>
 
 #include <TNaming_Tool.hxx>
@@ -58,7 +57,6 @@ Handle(MDF_ASDriverTable) StdDrivers_DocumentStorageDriver::AttributeDrivers(con
   MDocStd::AddStorageDrivers(HASSeq, theMsgDriver); 
   MFunction::AddStorageDrivers(HASSeq, theMsgDriver);
   MNaming::AddStorageDrivers(HASSeq, theMsgDriver);
-  MPrsStd::AddStorageDrivers(HASSeq, theMsgDriver);
   //
   aStorageTable->SetDrivers(HASSeq);
   return aStorageTable;
index fc780b1af5d4a5ce483755005dfa7dfaa48b3393..e8dab7f0beb839e7c8b0104b607cf7ba3326aad3 100644 (file)
@@ -18,7 +18,6 @@ schema StdSchema
 is
     package PDataXtd;
     package PNaming;    
-    package PPrsStd;
     
 end StdSchema;
 
index cb66edfcd56847e75d7098084b3a06a65738167e..83474cc838b3f732a6ca68b3deeb978cdb82b982 100644 (file)
@@ -105,6 +105,8 @@ is
     class Axis;
     
     class Plane;
+
+    class Presentation;
     
     deferred class Pattern;
        
diff --git a/src/TDataXtd/TDataXtd_Presentation.cdl b/src/TDataXtd/TDataXtd_Presentation.cdl
new file mode 100644 (file)
index 0000000..24f8c13
--- /dev/null
@@ -0,0 +1,162 @@
+-- Created on: 1998-09-30
+-- Created by: Denis PASCAL
+-- Copyright (c) 1998-1999 Matra Datavision
+-- Copyright (c) 1999-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+class Presentation from TDataXtd inherits Attribute from TDF
+
+---Purpose: An attribute to associate an
+-- AIS_InteractiveObject to a label in an AIS viewer.
+-- This attribute works in collaboration with TPrsStd_AISViewer.
+-- Note that all the Set... and Unset... attribute
+-- methods as well as the query methods for
+-- visualization attributes and the HasOwn... test
+-- methods are shortcuts to the respective
+-- AIS_InteractiveObject settings.
+
+uses GUID                 from Standard,
+     AttributeIndexedMap  from TDF,
+     DataSet              from TDF,
+     AttributeDelta       from TDF,
+     Label                from TDF,
+     RelocationTable      from TDF
+
+is
+
+    Create returns Presentation from TDataXtd;
+    ---Purpose: Default constructor.
+
+    Set(myclass; theLabel : Label from TDF; theDriverId : GUID from Standard)
+    returns Presentation from TDataXtd;
+    ---Purpose: Creates or retrieves the presentation attribute on
+    -- the label, and sets the GUID driver.
+
+    Set(myclass; theMaster : Attribute from TDF) returns Presentation from TDataXtd;
+    ---Purpose:  Creates or retrieves the presentation attribute attached to master.
+    -- The GUID of the driver will be the GUID of master.
+    -- Master is the attribute you want to display.
+
+    Unset(myclass; theLabel : Label from TDF);
+    ---Purpose: Delete (if exist) the presentation attribute associated to the input label.
+
+    GetID(myclass) returns GUID from Standard;
+    ---Purpose: Returns the GUID for TDataXtd_Presentation attributes.
+    ---C++: return const &
+
+    GetDriverGUID(me) returns GUID from Standard;
+
+    SetDriverGUID(me: mutable ; theGUID : GUID from Standard);
+
+    ID(me)returns GUID from Standard;
+    ---C++: return const &
+
+
+    IsDisplayed(me) returns Boolean from Standard;    
+    ---Purpose: Returns true if this presentation attribute is displayed.
+
+    IsHasOwnMaterial(me) returns Boolean from Standard;
+    ---Purpose: Returns true if this presentation attribute already has a material setting.
+
+    IsHasOwnTransparency(me) returns Boolean from Standard;
+    ---Purpose: Returns true if this presentation attribute already has a transparency setting.
+
+    IsHasOwnColor(me) returns Boolean from Standard;
+    ---Purpose: Returns true if this presentation attribute already has a color setting.
+
+    IsHasOwnWidth(me) returns Boolean from Standard;
+    ---Purpose: Returns true if this presentation attribute already has a width setting.
+
+    IsHasOwnMode(me) returns Boolean from Standard;
+
+    IsHasOwnSelectionMode(me) returns Boolean from Standard;
+
+
+    SetDisplayed(me : mutable; theIsDisplayed : Boolean from Standard);
+
+    SetMaterial(me : mutable; theName : Integer from Standard);
+    ---Purpose: Sets the material for this presentation  attribute.
+
+    SetTransparency(me : mutable; theValue : Real from Standard = 0.6);
+    ---Purpose:
+    -- Sets the transparency value for this presentation attribute.
+    -- @param theValue - parameter of transparency, this value is 0.6 by default.
+
+    SetColor(me: mutable; theColor : Integer from Standard);
+    ---Purpose: Sets the color aColor for this presentation attribute.
+
+    SetWidth(me: mutable; theWidth : Real from Standard);
+    ---Purpose: Sets the width for this presentation attribute.
+
+    SetMode(me: mutable; theMode : Integer from Standard);
+
+    SetSelectionMode(me: mutable; theSelectionMode : Integer from Standard);
+
+
+    Material(me) returns Integer from Standard;
+    ---Purpose: Returns the material setting for this presentation attribute.
+
+    Transparency(me) returns Real from Standard;
+
+    Color(me) returns Integer from Standard;
+
+    Width(me) returns Real from Standard;
+
+    Mode(me)  returns  Integer  from  Standard;
+
+    SelectionMode(me) returns Integer from Standard;
+
+
+    UnsetMaterial(me : mutable);
+    ---Purpose: Removes the material setting from this presentation attribute.
+
+    UnsetTransparency(me : mutable);
+    ---Purpose: Removes the transparency setting from this presentation attribute.
+
+    UnsetColor(me : mutable);
+    ---Purpose: Removes the color setting from this presentation attribute.
+
+    UnsetWidth(me : mutable);
+    ---Purpose: Removes the width setting from this presentation attribute.
+
+    UnsetMode(me : mutable);
+
+    UnsetSelectionMode(me : mutable);
+
+
+    NewEmpty(me) returns Attribute from TDF;
+
+    Restore(me: mutable; theAttribute : Attribute from TDF);
+
+    Paste(me; theInto : Attribute from TDF; theRT : RelocationTable from TDF);
+
+    BackupCopy(me) returns Attribute from TDF is redefined;
+
+fields
+
+    myDriverGUID           : GUID                 from Standard;    
+    myColor                : Integer              from Standard;
+    myMaterial             : Integer              from Standard;
+    myMode                 : Integer              from Standard;
+    mySelectionMode        : Integer              from Standard;
+    myTransparency         : Real                 from Standard;
+    myWidth                : Real                 from Standard;
+    myIsDisplayed          : Boolean              from Standard; 
+    myIsHasOwnColor        : Boolean              from Standard;
+    myIsHasOwnMaterial     : Boolean              from Standard;
+    myIsHasOwnTransparency : Boolean              from Standard;    
+    myIsHasOwnWidth        : Boolean              from Standard;  
+    myIsHasOwnMode         : Boolean              from Standard;
+    myIsHasOwnSelectionMode: Boolean              from Standard;
+
+end Presentation;
\ No newline at end of file
diff --git a/src/TDataXtd/TDataXtd_Presentation.cxx b/src/TDataXtd/TDataXtd_Presentation.cxx
new file mode 100644 (file)
index 0000000..7253935
--- /dev/null
@@ -0,0 +1,566 @@
+// Created on: 2015-04-20
+// Created by: Alexander Zaikin
+// Copyright (c) 1998-1999 Matra Datavision
+// Copyright (c) 1999-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 <TDataXtd_Presentation.ixx>
+
+#include <TDF_DefaultDeltaOnRemoval.hxx>
+#include <TDF_DefaultDeltaOnModification.hxx>
+#include <TDF_DeltaOnAddition.hxx>
+#include <TDF_Tool.hxx>
+#include <TCollection_ExtendedString.hxx>
+
+//=======================================================================
+//function : TDataXtd_Presentation
+//purpose  : Default constructor.
+//=======================================================================
+TDataXtd_Presentation::TDataXtd_Presentation()
+: myDriverGUID           ("00000000-0000-0000-0000-000000000000"),
+  myColor                (516), // Quantity_NOC_WHITE
+  myMaterial             (0),   // Graphic3d_NOM_BRASS
+  myMode                 (0),
+  mySelectionMode        (0),
+  myTransparency         (0.0),
+  myWidth                (0.0),
+  myIsDisplayed          (Standard_False),
+  myIsHasOwnColor        (Standard_False),
+  myIsHasOwnMaterial     (Standard_False),
+  myIsHasOwnTransparency (Standard_False),
+  myIsHasOwnWidth        (Standard_False),
+  myIsHasOwnMode         (Standard_False),
+  myIsHasOwnSelectionMode(Standard_False)
+{}
+
+
+//=======================================================================
+//function : Set
+//purpose  : 
+//=======================================================================
+Handle(TDataXtd_Presentation) TDataXtd_Presentation::Set(const TDF_Label&     theLabel,
+                                                         const Standard_GUID& theDriverId)
+{
+  Handle(TDataXtd_Presentation) aPresentation;
+
+  if ( !theLabel.FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+  {
+    aPresentation = new TDataXtd_Presentation();
+    theLabel.AddAttribute(aPresentation);
+  }
+
+  aPresentation->SetDriverGUID(theDriverId);
+  return aPresentation;
+}
+
+
+//=======================================================================
+//function : Set
+//purpose  : 
+//=======================================================================
+Handle(TDataXtd_Presentation) TDataXtd_Presentation::Set(const Handle(TDF_Attribute)& theMaster)
+{
+  Handle(TDataXtd_Presentation) aPresentation;
+
+  const TDF_Label aLabel = theMaster->Label();
+  if (!aLabel.FindAttribute(TDataXtd_Presentation::GetID(), aPresentation))
+  {
+    aPresentation = new TDataXtd_Presentation();
+    aLabel.AddAttribute(aPresentation);
+  }
+
+  aPresentation->SetDriverGUID( theMaster->ID() );
+  return aPresentation;
+}
+
+
+//=======================================================================
+//function : Unset
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::Unset(const TDF_Label& theLabel)
+{
+  Handle(TDataXtd_Presentation) aPresentation;
+  if (theLabel.FindAttribute(TDataXtd_Presentation::GetID(), aPresentation))
+    theLabel.ForgetAttribute(aPresentation);
+}
+
+
+//=======================================================================
+//function : GetID
+//purpose  : 
+//=======================================================================
+const Standard_GUID& TDataXtd_Presentation::GetID()
+{
+  static Standard_GUID TDataXtd_PresentationID("04fb4d00-5690-11d1-8940-080009dc3333");
+  return TDataXtd_PresentationID;
+}
+
+
+//=======================================================================
+//function : ID
+//purpose  : 
+//=======================================================================
+const Standard_GUID& TDataXtd_Presentation::ID() const
+{
+  return GetID();
+}
+
+
+//=======================================================================
+//function :GetDriverGUID
+//purpose  : 
+//=======================================================================
+Standard_GUID TDataXtd_Presentation::GetDriverGUID() const
+{
+  return myDriverGUID;
+}
+
+
+//=======================================================================
+//function :SetDriverGUID
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::SetDriverGUID(const Standard_GUID& theGUID)
+{
+  if ( myDriverGUID != theGUID )
+  {
+    Backup();
+    myDriverGUID = theGUID;
+  }
+}
+
+
+//=======================================================================
+//function : IsDisplayed
+//purpose  : 
+//=======================================================================
+Standard_Boolean TDataXtd_Presentation::IsDisplayed() const
+{
+  return myIsDisplayed;
+}
+
+
+//=======================================================================
+//function : IsHasOwnMaterial
+//purpose  : 
+//=======================================================================
+Standard_Boolean TDataXtd_Presentation::IsHasOwnMaterial() const
+{
+  return myIsHasOwnMaterial;
+}
+
+
+//=======================================================================
+//function : IsHasOwnTransparency
+//purpose  : 
+//=======================================================================
+Standard_Boolean TDataXtd_Presentation::IsHasOwnTransparency() const
+{
+  return myIsHasOwnTransparency;
+}
+
+
+//=======================================================================
+//function : IsHasOwnColor
+//purpose  : 
+//=======================================================================
+Standard_Boolean TDataXtd_Presentation::IsHasOwnColor() const
+{
+  return myIsHasOwnColor;
+}
+
+
+//=======================================================================
+//function : IsHasOwnWidth
+//purpose  : 
+//=======================================================================
+Standard_Boolean TDataXtd_Presentation::IsHasOwnWidth() const
+{
+  return myIsHasOwnWidth;
+}
+
+
+//=======================================================================
+//function : IsHasOwnMode
+//purpose  : 
+//=======================================================================
+Standard_Boolean TDataXtd_Presentation::IsHasOwnMode() const
+{
+  return myIsHasOwnMode;
+}
+
+
+//=======================================================================
+//function : IsHasOwnSelectionMode
+//purpose  : 
+//=======================================================================
+Standard_Boolean TDataXtd_Presentation::IsHasOwnSelectionMode() const
+{
+  return myIsHasOwnSelectionMode;
+}
+
+
+//=======================================================================
+//function : SetDisplayed
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::SetDisplayed(const Standard_Boolean theIsDisplayed)
+{
+  Backup();
+  myIsDisplayed = theIsDisplayed;
+}
+
+
+//=======================================================================
+//function : SetMaterial
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::SetMaterial(const Standard_Integer theName)
+{
+  Backup();
+  myMaterial         = theName;
+  myIsHasOwnMaterial = Standard_True;
+}
+
+
+//=======================================================================
+//function : SetTransparency
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::SetTransparency(const Standard_Real theValue)
+{
+  Backup();
+  myTransparency = theValue;
+  myIsHasOwnTransparency = Standard_True;
+}
+
+
+//=======================================================================
+//function : SetColor
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::SetColor(const Standard_Integer theColor)
+{
+  Backup();
+  myColor         = theColor;
+  myIsHasOwnColor = Standard_True;
+}
+
+
+//=======================================================================
+//function : SetWidth
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::SetWidth(const Standard_Real theWidth)
+{
+  Backup();
+  myWidth         = theWidth;
+  myIsHasOwnWidth = Standard_True;
+}
+
+
+//=======================================================================
+//function : SetMode
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::SetMode(const Standard_Integer theMode)
+{
+  Backup();
+  myMode         = theMode;
+  myIsHasOwnMode = Standard_True;
+}
+
+
+//=======================================================================
+//function : SetSelectionMode
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::SetSelectionMode(const Standard_Integer theSelectionMode)
+{
+  Backup();
+  myIsHasOwnSelectionMode = Standard_True;
+  mySelectionMode         = theSelectionMode;
+}
+
+
+//=======================================================================
+//function : Material
+//purpose  : 
+//=======================================================================
+Standard_Integer TDataXtd_Presentation::Material() const
+{
+  return myMaterial;
+}
+
+
+//=======================================================================
+//function : Transparency
+//purpose  : 
+//=======================================================================
+Standard_Real TDataXtd_Presentation::Transparency() const
+{
+  return myTransparency;
+}
+
+
+//=======================================================================
+//function : Color
+//purpose  : 
+//=======================================================================
+Standard_Integer TDataXtd_Presentation::Color() const
+{
+  return myColor;
+}
+
+
+//=======================================================================
+//function : Width
+//purpose  : 
+//=======================================================================
+Standard_Real TDataXtd_Presentation::Width() const
+{
+   return myWidth;
+}
+
+
+//=======================================================================
+//function : Mode
+//purpose  : 
+//=======================================================================
+Standard_Integer TDataXtd_Presentation::Mode() const
+{
+  return myMode;
+}
+
+
+//=======================================================================
+//function : SelectionMode
+//purpose  : 
+//=======================================================================
+Standard_Integer TDataXtd_Presentation::SelectionMode() const
+{
+  return mySelectionMode;
+}
+
+
+//=======================================================================
+//function : UnsetMaterial
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::UnsetMaterial()
+{
+  Backup();
+  myIsHasOwnMaterial = Standard_False;
+}
+
+
+//=======================================================================
+//function : UnsetTransparency
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::UnsetTransparency()
+{
+  myIsHasOwnTransparency = Standard_False;
+}
+
+
+//=======================================================================
+//function : UnsetColor
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::UnsetColor()
+{
+  Backup();
+  myIsHasOwnColor = Standard_False;
+}
+
+
+//=======================================================================
+//function : UnsetWidth
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::UnsetWidth()
+{
+  Backup();
+  myIsHasOwnWidth = Standard_False;
+}
+
+
+//=======================================================================
+//function : UnsetMode
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::UnsetMode()
+{
+  Backup();
+  myIsHasOwnMode = Standard_False;
+}
+
+
+//=======================================================================
+//function : UnsetSelectionMode
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::UnsetSelectionMode()
+{
+  Backup();
+  myIsHasOwnSelectionMode = Standard_False;
+}
+
+
+//=======================================================================
+//function : BackupCopy
+//purpose  : 
+//=======================================================================
+Handle(TDF_Attribute) TDataXtd_Presentation::BackupCopy() const
+{
+  Handle(TDataXtd_Presentation) aCopy = new TDataXtd_Presentation;
+
+  aCopy->myIsDisplayed   = myIsDisplayed;
+  aCopy->myDriverGUID    = myDriverGUID;
+  aCopy->mySelectionMode = mySelectionMode;
+  aCopy->myTransparency  = myTransparency;
+  aCopy->myColor         = myColor;
+  aCopy->myMode          = myMode;
+  aCopy->myWidth         = myWidth;
+  aCopy->myMaterial      = myMaterial;
+
+  aCopy->myIsHasOwnColor         = myIsHasOwnColor;
+  aCopy->myIsHasOwnMaterial      = myIsHasOwnMaterial;
+  aCopy->myIsHasOwnWidth         = myIsHasOwnWidth;
+  aCopy->myIsHasOwnMode          = myIsHasOwnMode;
+  aCopy->myIsHasOwnTransparency  = myIsHasOwnTransparency;
+  aCopy->myIsHasOwnSelectionMode = myIsHasOwnSelectionMode;
+
+  return aCopy;
+}
+
+
+//=======================================================================
+//function : NewEmpty
+//purpose  : 
+//=======================================================================
+Handle(TDF_Attribute) TDataXtd_Presentation::NewEmpty() const
+{
+  return new TDataXtd_Presentation();
+}
+
+
+//=======================================================================
+//function : Restore
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::Restore(const Handle(TDF_Attribute)& theAttribute)
+{
+  Handle(TDataXtd_Presentation) aPresentation =
+    Handle(TDataXtd_Presentation)::DownCast(theAttribute);
+
+  myIsHasOwnMaterial = aPresentation->IsHasOwnMaterial();
+  myMaterial = aPresentation->Material();
+
+  myIsHasOwnColor = aPresentation->IsHasOwnColor();
+  myColor = aPresentation->Color();
+
+  myIsHasOwnWidth = aPresentation->IsHasOwnWidth();
+  myWidth = aPresentation->Width();
+
+  myIsHasOwnMode = aPresentation->IsHasOwnMode();
+  myMode = aPresentation->Mode();
+
+  myIsHasOwnSelectionMode = aPresentation->IsHasOwnSelectionMode();
+  mySelectionMode = aPresentation->SelectionMode();
+
+  myIsHasOwnTransparency = aPresentation->IsHasOwnTransparency();
+  myTransparency = aPresentation->Transparency();
+
+  myIsDisplayed = aPresentation->IsDisplayed();
+  myDriverGUID  = aPresentation->GetDriverGUID();
+}
+
+
+//=======================================================================
+//function : Paste
+//purpose  : 
+//=======================================================================
+void TDataXtd_Presentation::Paste(const Handle(TDF_Attribute)& theInto,
+                                  const Handle(TDF_RelocationTable)&) const
+{
+  Handle(TDataXtd_Presentation) anInto =
+    Handle(TDataXtd_Presentation)::DownCast(theInto);
+
+  anInto->Backup();
+
+  if (myIsHasOwnMaterial)
+  {
+    anInto->myMaterial = myMaterial;
+    anInto->myIsHasOwnMaterial = Standard_True;
+  }
+  else
+  {
+    anInto->myIsHasOwnMaterial = Standard_False;
+  }
+
+  if (myIsHasOwnColor)
+  {
+    anInto->myColor = myColor;
+    anInto->myIsHasOwnColor = Standard_True;
+  }
+  else
+  {
+    anInto->myIsHasOwnColor = Standard_False;
+  }
+
+  if(myIsHasOwnWidth)
+  {
+    anInto->myWidth = myWidth;
+    anInto->myIsHasOwnWidth = Standard_True;
+  }
+  else
+  {
+    anInto->myIsHasOwnWidth = Standard_False;
+  }
+
+  if (myIsHasOwnMode)
+  {
+    anInto->myMode = myMode;
+    anInto->myIsHasOwnMode = Standard_True;
+  }
+  else
+  {
+    anInto->myIsHasOwnMode = Standard_False;
+  }
+
+  if (myIsHasOwnSelectionMode)
+  {
+    anInto->mySelectionMode = mySelectionMode;
+    anInto->myIsHasOwnSelectionMode = Standard_True;
+  }
+  else
+  {
+    anInto->myIsHasOwnSelectionMode = Standard_False;
+  }
+
+  if (myIsHasOwnTransparency)
+  {
+    anInto->myTransparency = myTransparency;
+    anInto->myIsHasOwnTransparency = Standard_True;
+  }
+  else
+  {
+    anInto->myIsHasOwnTransparency = Standard_False;
+  }
+
+  anInto->myIsDisplayed = myIsDisplayed;
+  anInto->myDriverGUID  = myDriverGUID;
+}
index 27b51d73ab4cabb71562b25843697477cae0317e..5f24c3518ffd60024bae9a1ce785df0e041cdada 100755 (executable)
@@ -6,5 +6,4 @@ TKG3d
 TKCAF
 TKCDF
 TKLCAF
-TKV3d
 TKBinL
index 8778d0a0fea7f4f35a80be1fbe6dc0e91efd9ccb..fcd751ccb1088caed33c8a59ece7188102376948 100755 (executable)
@@ -1,4 +1,3 @@
 BinDrivers
 BinMDataXtd
-BinMPrsStd
 BinMNaming
index e1cae0b3321f32b6bbf8deb6b8efa1c44b956990..d78418f962362093a247e1871233ce5476831a25 100755 (executable)
@@ -8,5 +8,4 @@ TKG2d
 TKG3d
 TKCDF
 TKLCAF
-TKV3d
 TKBO
index 241a01ff1e3d168f5a5fe5e0c5b7061ede6dda75..6c5156383fffba67f00661f719f708426f6e54a9 100755 (executable)
@@ -1,4 +1,3 @@
 TDataXtd
 TNaming
-TPrsStd
 AppStd
index f368834083e06e4b98488898e37477709b2e5c44..476e0a6bb5e3ab20e04f49c812a89315197eec77 100755 (executable)
@@ -17,4 +17,5 @@ TKPrim
 TKBool
 TKBO
 TKCAF
+TKVCAF
 TKViewerTest
index 26e986d08ee65db01fc4ea6860358d1c47e07d7f..f5c94dccf9bb166e87be8458ab48024b9c4fdb9f 100755 (executable)
@@ -4,7 +4,6 @@ TKMath
 TKernel
 TKCDF
 TKG2d
-TKV3d
 TKService
 TKG3d
 TKPShape
index 10549ef0b932340be3fffccc8aab8414f02deddb..27634a3dc9580307a041b59721cf71f3a6f11cae 100755 (executable)
@@ -1,6 +1,5 @@
 PDataXtd
 PNaming
-PPrsStd
 MDataXtd
 MPrsStd
 MNaming
index 064a33ea09da43bca4e564173a6df974fabc6cf9..5394813a26bbcd72fe2ec664e1a2a79e0d981298 100755 (executable)
@@ -24,6 +24,7 @@ TKShHealing
 TKOffset
 TKFeat
 TKCAF
+TKVCAF
 TKIGES
 TKXSBase
 TKMesh
diff --git a/src/TKVCAF/EXTERNLIB b/src/TKVCAF/EXTERNLIB
new file mode 100644 (file)
index 0000000..5939526
--- /dev/null
@@ -0,0 +1,13 @@
+TKernel
+TKGeomBase
+TKBRep
+TKTopAlgo
+TKMath
+TKService
+TKG2d
+TKG3d
+TKCDF
+TKLCAF
+TKBO
+TKCAF
+TKV3d
diff --git a/src/TKVCAF/FILES b/src/TKVCAF/FILES
new file mode 100644 (file)
index 0000000..ca4f0e5
--- /dev/null
@@ -0,0 +1,2 @@
+EXTERNLIB
+PACKAGES
diff --git a/src/TKVCAF/PACKAGES b/src/TKVCAF/PACKAGES
new file mode 100644 (file)
index 0000000..7acb218
--- /dev/null
@@ -0,0 +1 @@
+TPrsStd
index a82c32bc9da1d042f5618f8ee0874f5b441b7008..b23eb5c108adf12306ce7f65646a0233559a092d 100755 (executable)
@@ -9,3 +9,4 @@ TKCDF
 TKLCAF
 TKG3d
 TKCAF
+TKVCAF
index 0dcdadc5260734a20fc4d55fd06f1e817a5bbd7a..6a4ffc5f1774dd2c30ab14303c3e79bc039d331a 100755 (executable)
@@ -10,6 +10,7 @@ TKService
 TKXSBase
 TKG2d
 TKCAF
+TKVCAF
 TKDraw
 TKTopAlgo
 TKLCAF
index 28cccd904f2d5b207403872c3613051b104e8c2e..02c5575dc4aa2cecfb78743c19fda73268d825af 100755 (executable)
@@ -1,6 +1,5 @@
 TKCDF
 TKernel
-TKV3d
 TKMath
 TKBRep
 TKG2d
index aa2c6823df6a28e129104b118e1c5f5fbc1a0966..be38b360a337d11161490111a1d240d85bd3626b 100755 (executable)
@@ -1,4 +1,3 @@
 XmlDrivers
 XmlMDataXtd
 XmlMNaming
-XmlMPrsStd
index fb50befa127efddcc0247c41ff63591708d902dc..bc9b7e7de196a18e29a57f6f8bba506f0f0a86e2 100755 (executable)
@@ -1,7 +1,7 @@
 00000000-0000-0000-0000-000000000000   Reserved
 ffffffff-ffff-ffff-ffff-ffffffffffff   Reserved
 
-04fb4d00-5690-11d1-8940-080009dc3333   TPrsStd_AISPresentation
+3680ac6c-47ae-4366-bb94-26abb6e07341   TPrsStd_AISPresentation
 04fb4d01-5690-11d1-8940-080009dc3333   TPrsStd_ColorAttribute
 04fb4d02-5690-11d1-8940-080009dc3333   TPrsStd_TransparencyAttribute
 04fb4d04-5690-11d1-8940-080009dc3333   TPrsStd_GraphicAttribute
index 3e474f3f5faa5f75aae7758603075f6fea83e33a..aec72fa8d48d5603c921b533601e6499052f426f 100644 (file)
@@ -1,7 +1,7 @@
 -- Created on: 1998-09-30
 -- Created by: Denis PASCAL
 -- Copyright (c) 1998-1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
+-- Copyright (c) 1999-2015 OPEN CASCADE SAS
 --
 -- This file is part of Open CASCADE Technology software library.
 --
 -- Alternatively, this file may be used under the terms of Open CASCADE
 -- commercial license or contractual agreement.
 
--- Lastly modified by :
--- +---------------------------------------------------------------------------+
--- !      ivan ! SetMode                                 ! 5-04-2001! 3.0-00-1!
--- +---------------------------------------------------------------------------+
-
-
-
 class AISPresentation from TPrsStd inherits Attribute from TDF
 
-       ---Purpose: An attribute to associate an
+---Purpose: An attribute to associate an
 -- AIS_InteractiveObject to a label in an AIS viewer.
 -- This attribute works in collaboration with TPrsStd_AISViewer.
 -- Note that all the Set... and Unset... attribute
@@ -38,198 +31,193 @@ uses GUID                 from Standard,
      AttributeDelta       from TDF,
      Label                from TDF,
      RelocationTable      from TDF,
+     Presentation         from TDataXtd,
      InteractiveObject    from AIS,
-     Length               from Quantity,
+     InteractiveContext   from AIS,
      NameOfColor          from Quantity,
      PlaneAngle           from Quantity,
-     NameOfMaterial       from Graphic3d,
-     Drawer               from Prs3d
+     NameOfMaterial       from Graphic3d
+
 is
 
     GetID (myclass) returns GUID from Standard;
-       ---Purpose: Returns the GUID for TPrsStd_AISPresentation attributes.
-       ---C++: return const &
+    ---Purpose: Returns the GUID for TPrsStd_AISPresentation attributes.
+    ---C++: return const &
 
     Set (myclass;  L : Label from TDF; driver : GUID from Standard)
-       ---Purpose: Creates or retrieves the presentation attribute on
-       -- the label L, and sets the GUID driver.
+    ---Purpose: Creates or retrieves the presentation attribute on
+    -- the label L, and sets the GUID driver.
     returns AISPresentation from TPrsStd;        
 
-    Unset (myclass;  L : Label from TDF);
+    Unset (myclass;  theLabel : Label from TDF);
     ---Purpose: Delete (if exist) the presentation attribute associated to the label <L>.
 
-
     Set (myclass;  master : Attribute from TDF)
-        ---Purpose:  Creates or retrieves the AISPresentation
-        -- attribute attached to master.
-        -- The GUID of the driver will be the GUID of master.
-        -- master is the attribute you want to display.
+    ---Purpose:  Creates or retrieves the AISPresentation
+    -- attribute attached to master.
+    -- The GUID of the driver will be the GUID of master.
+    -- master is the attribute you want to display.
     returns AISPresentation from TPrsStd;
 
 
     ---Category: Presentation attribute implementation
     --          ======================================
-    
+
     Create returns AISPresentation from TPrsStd;
-    
+
     SetDisplayed(me : mutable; B : Boolean from Standard);
-    
+
     Display (me : mutable; update : Boolean from Standard = Standard_False);
-       ---Purpose: Display presentation of object in AIS viewer.
-       --          If <update> = True then AISObject is recomputed and all 
-       --          the visualization settings are applied
-    
+    ---Purpose: Display presentation of object in AIS viewer.
+    -- If <update> = True then AISObject is recomputed and all 
+    -- the visualization settings are applied
+
     Erase (me : mutable; remove : Boolean from Standard = Standard_False);
-       ---Purpose: Removes the presentation of this AIS
-       -- presentation attribute from the TPrsStd_AISViewer.
-       -- If remove is true, this AIS presentation attribute
-       -- is removed from the interactive context.
-    
+    ---Purpose: Removes the presentation of this AIS
+    -- presentation attribute from the TPrsStd_AISViewer.
+    -- If remove is true, this AIS presentation attribute
+    -- is removed from the interactive context.
+
     Update (me : mutable);
     ---Purpose: Recompute presentation of object and apply the visualization settings
-    
-    
+
     GetDriverGUID (me) returns GUID from Standard; 
-     
+
     SetDriverGUID (me: mutable ; guid : GUID from Standard);
-    
-    IsDisplayed (me)
-    returns Boolean from Standard;    
----Purpose:
--- Returns true if this AIS presentation attribute is displayed.
-    GetAIS (me) returns InteractiveObject from AIS;
-    ---Purpose: Returns AIS_InteractiveObject stored in the presentation attribute
-    
-    AISUpdate (me : mutable)
-    ---Purpose: Updates AIS_InteractiveObject stored in the attribute
-    --          and applies the visualization settings
-    is private;
 
-    AISDisplay (me : mutable)
-    ---Purpose: Displays AIS_InteractiveObject stored in the attribute
-    is private;
+    IsDisplayed (me) returns Boolean from Standard;
+    ---Purpose: Returns true if this AIS presentation attribute is displayed.
 
-    AISErase (me : mutable; remove : Boolean from Standard = Standard_False)
-    ---Purpose: Erases AIS_InteractiveObject stored in the attribute in 
-    --          the viewer; If <remove> = True then AISObject is removed 
-    --          from AIS_InteractiveContext instead of simple erasing in the viewer
-    is private;
-    
     ---Category: Visualization settings of AIS_InteractiveObject
     --          ================================================
-    
+
     Material(me) returns NameOfMaterial from Graphic3d;
+    ---Purpose:
+    -- Returns the material setting for this presentation attribute.
+
+    SetMaterial(me : mutable; aName : NameOfMaterial from Graphic3d);
+    ---Purpose: Sets the material aName for this presentation  attribute.
+
+    HasOwnMaterial(me) returns Boolean from Standard;
+    ---Purpose: Returns true if this presentation attribute already has a material setting.
 
----Purpose:
--- Returns the material setting for this presentation attribute.    
-    SetMaterial(me : mutable; aName : NameOfMaterial from Graphic3d); 
----Purpose:        Sets the material aName for this presentation  attribute.    
-    HasOwnMaterial(me) returns Boolean from Standard; 
----Purpose: Returns true if this presentation attribute already has a material setting.    
     UnsetMaterial(me : mutable);
----Purpose: Removes the material setting from this presentation attribute.
+    ---Purpose: Removes the material setting from this presentation attribute.
+
     SetTransparency(me : mutable; aValue : Real from Standard=0.6);
---- Purpose:
--- Sets the transparency value aValue for this
--- presentation attribute.
--- This value is 0.6 by default.    
+    --- Purpose:
+    -- Sets the transparency value aValue for this presentation attribute.
+    -- This value is 0.6 by default.
+
     Transparency(me) returns Real from Standard;
-    
+
     HasOwnTransparency(me) returns Boolean from Standard;
----Purpose: Returns true if this presentation attribute already has a transparency setting.    
+    ---Purpose: Returns true if this presentation attribute already has a transparency setting.
+
     UnsetTransparency(me : mutable);
----Purpose: Removes the transparency setting from this presentation attribute.  
+    ---Purpose: Removes the transparency setting from this presentation attribute.
+
     Color(me) returns NameOfColor from Quantity;
-    
+
     SetColor(me: mutable; aColor : NameOfColor from Quantity);
----Purpose: Sets the color aColor for this presentation attribute.    
+    ---Purpose: Sets the color aColor for this presentation attribute.
+
     HasOwnColor(me) returns Boolean from Standard;
----Purpose: Returns true if this presentation attribute already has a color setting.    
-    UnsetColor(me : mutable); 
----Purpose: Removes the color setting from this presentation attribute.    
-    Width(me) returns Real from Standard ;
-    
+    ---Purpose: Returns true if this presentation attribute already has a color setting.
+
+    UnsetColor(me : mutable);
+    ---Purpose: Removes the color setting from this presentation attribute.
+
+    Width(me) returns Real from Standard;
+
     SetWidth(me: mutable; aWidth : Real from Standard);
----Purpose: Sets the width aWidth for this presentation attribute.    
+    ---Purpose: Sets the width aWidth for this presentation attribute.
+
     HasOwnWidth(me) returns Boolean from Standard;
----Purpose: Returns true if this presentation attribute already has a width setting.
-    UnsetWidth(me : mutable); 
----Purpose: Removes the width setting from this presentation attribute.     
-    Mode(me)  returns  Integer  from  Standard;  
-     
-    SetMode(me: mutable; theMode : Integer from Standard);  
-    
+    ---Purpose: Returns true if this presentation attribute already has a width setting.
+
+    UnsetWidth(me : mutable);
+    ---Purpose: Removes the width setting from this presentation attribute.
+
+    Mode(me)  returns  Integer  from  Standard;
+
+    SetMode(me: mutable; theMode : Integer from Standard);
+
     HasOwnMode(me) returns Boolean from Standard;
-    UnsetMode(me : mutable); 
+
+    UnsetMode(me : mutable);
 
     SelectionMode(me) returns Integer from Standard;
-    
-    SetSelectionMode(me: mutable; theSelectionMode : Integer from Standard);  
+
+    SetSelectionMode(me: mutable; theSelectionMode : Integer from Standard);
 
     HasOwnSelectionMode(me) returns Boolean from Standard;
+
     UnsetSelectionMode(me : mutable); 
 
-               
     ---Category: Methods of TDF_Attribute
     --           ========================
-    
+
     ID(me)returns GUID from Standard;
     ---C++: return const &
 
-    NewEmpty(me)
-    returns Attribute from TDF;    
-    Restore(me: mutable; with : Attribute from TDF);
+    NewEmpty(me) returns Attribute from TDF;
 
-    Paste (me; into : Attribute from TDF;
-              RT   : RelocationTable from TDF);     
+    Restore(me: mutable; theWith : Attribute from TDF);
+
+    Paste(me; into : Attribute from TDF; RT : RelocationTable from TDF);
 
     BackupCopy(me) returns Attribute from TDF is redefined;
-    
+
     ---Category: Callbacks for viewer updating
     --           =============================
 
-    AfterAddition (me: mutable)
-    is redefined;    
+    AfterAddition (me: mutable) is redefined;    
 
-    BeforeRemoval (me: mutable)
-    is redefined;
+    BeforeRemoval (me: mutable) is redefined;
 
-    BeforeForget(me: mutable)
-    is redefined;
+    BeforeForget(me: mutable) is redefined;
+
+    AfterResume(me: mutable) is redefined;    
 
-    AfterResume(me: mutable)   
-    is redefined;    
-    
     BeforeUndo (me: mutable; anAttDelta : AttributeDelta from TDF;
-                             forceIt    : Boolean from Standard = Standard_False)
-    returns Boolean from Standard
-    is redefined;
-    
+                forceIt    : Boolean from Standard = Standard_False)
+    returns Boolean from Standard is redefined;
+
     AfterUndo (me: mutable; anAttDelta : AttributeDelta from TDF;
-                            forceIt    : Boolean from Standard = Standard_False)
+               forceIt    : Boolean from Standard = Standard_False)
     ---Purpose: update AIS viewer according to delta
-    returns Boolean from Standard
-    is redefined;
-   
+    returns Boolean from Standard is redefined;
+
+    getAISContext(me) returns InteractiveContext from AIS
+    ---Purpose: Returns interactive context associated with presentation.
+    is private;
+
+    getData(me) returns Presentation from TDataXtd 
+    ---Purpose: Returns data presentation attribute connected associated with presentation.
+    is private;
+
+    GetAIS(me) returns InteractiveObject from AIS;
+    ---Purpose: Returns AIS_InteractiveObject stored in the presentation attribute.
+
+    AISUpdate (me : mutable)
+    ---Purpose: Updates AIS_InteractiveObject stored in the attribute
+    -- and applies the visualization settings
+    is private;
+
+    AISDisplay (me : mutable)
+    ---Purpose: Displays AIS_InteractiveObject stored in the attribute
+    is private;
+
+    AISErase (me : mutable; remove : Boolean from Standard = Standard_False)
+    ---Purpose: Erases AIS_InteractiveObject stored in the attribute in 
+    -- the viewer; If <remove> = True then AISObject is removed 
+    -- from AIS_InteractiveContext instead of simple erasing in the viewer
+    is private;
+
 fields
 
-    myDriverGUID       : GUID                 from Standard;    
-    myTransparency     : Real                 from Standard;
-    myColor            : NameOfColor          from Quantity;
-    myMaterial         : NameOfMaterial       from Graphic3d;
-    myWidth            : Real                 from Standard; 
-    myMode             : Integer              from Standard;
-    mySelectionMode    : Integer              from Standard;
-    isDisplayed        : Boolean              from Standard; 
-    hasOwnColor        : Boolean              from Standard;
-    hasOwnMaterial     : Boolean              from Standard;
-    hasOwnTransparency : Boolean              from Standard;    
-    hasOwnWidth        : Boolean              from Standard;  
-    hasOwnMode         : Boolean              from Standard;
-    hasOwnSelectionMode: Boolean              from Standard;
-    myAIS              : InteractiveObject    from AIS;    
+    myDriverGUID       : GUID                 from Standard;
+    myAIS              : InteractiveObject    from AIS;
 end AISPresentation;
 
index 70c171c3dbd20678600b70c114a8ba09e243a35d..638f83ff16062dbba765b1271b92252f7b0bfff7 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-// Lastly modified by :
-// +---------------------------------------------------------------------------+
-// !      ivan ! SetMode                                 ! 5-04-2001! 3.0-00-1!
-// +---------------------------------------------------------------------------+
 #include <TPrsStd_AISPresentation.ixx>
 
 #include <TDF_DefaultDeltaOnRemoval.hxx>
 #include <TDF_DeltaOnAddition.hxx>
 #include <TDF_Tool.hxx>
 #include <TCollection_ExtendedString.hxx>
+#include <TDataXtd_Presentation.hxx>
 #include <TPrsStd_AISViewer.hxx>
 #include <AIS_InteractiveContext.hxx>
 #include <AIS_InteractiveObject.hxx>
 #include <TPrsStd_Driver.hxx>
 #include <TPrsStd_DriverTable.hxx>
 
+
+//=======================================================================
+//function : TPrsStd_AISPresentation
+//purpose  : Constructor
+//=======================================================================
+TPrsStd_AISPresentation::TPrsStd_AISPresentation ()
+: myDriverGUID("00000000-0000-0000-0000-000000000000")
+{
+}
+
+
 //=======================================================================
 //function : Set
 //purpose  : 
 //=======================================================================
-Handle(TPrsStd_AISPresentation) TPrsStd_AISPresentation::Set(const TDF_Label& L,const Standard_GUID& driver) 
-{   
-
-  Handle(TPrsStd_AISPresentation) P; 
+Handle(TPrsStd_AISPresentation) TPrsStd_AISPresentation::Set
+             ( const TDF_Label& theLabel, const Standard_GUID& theDriver )
+{
+  Handle(TPrsStd_AISPresentation) aPresentation;
 
-  if (!L.FindAttribute(TPrsStd_AISPresentation::GetID(),P)) { 
-    P = new TPrsStd_AISPresentation ();  
-    L.AddAttribute(P);
+  if ( !theLabel.FindAttribute(TPrsStd_AISPresentation::GetID(), aPresentation) )
+  {
+    aPresentation = new TPrsStd_AISPresentation();
+    theLabel.AddAttribute(aPresentation);
   }
-  P->SetDriverGUID(driver);   
-  return P;
+
+  aPresentation->SetDriverGUID(theDriver);
+  return aPresentation;
 }
 
 
@@ -53,13 +63,12 @@ Handle(TPrsStd_AISPresentation) TPrsStd_AISPresentation::Set(const TDF_Label& L,
 //function : Unset
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::Unset (const TDF_Label& L)
-{   
-  Handle(TPrsStd_AISPresentation) P;  
+void TPrsStd_AISPresentation::Unset (const TDF_Label& theLabel)
+{
+  Handle(TPrsStd_AISPresentation) aPresentation;
 
-  if (L.FindAttribute(TPrsStd_AISPresentation::GetID(),P)) { 
-    L.ForgetAttribute(P);
-  }
+  if ( theLabel.FindAttribute(TPrsStd_AISPresentation::GetID(), aPresentation) )
+    theLabel.ForgetAttribute(aPresentation);
 }
 
 
@@ -67,67 +76,41 @@ void TPrsStd_AISPresentation::Unset (const TDF_Label& L)
 //function : Set
 //purpose  : 
 //=======================================================================
-Handle(TPrsStd_AISPresentation) TPrsStd_AISPresentation::Set (const Handle(TDF_Attribute)& master) 
-{  
-  Handle(TPrsStd_AISPresentation) P;  
-
-  if (!master->Label().FindAttribute(TPrsStd_AISPresentation::GetID(),P)) { 
-    P = new TPrsStd_AISPresentation ();  
-    master->Label().AddAttribute(P);
-  }   
-
-  P->SetDriverGUID( master->ID() );
+Handle(TPrsStd_AISPresentation) TPrsStd_AISPresentation::Set(const Handle(TDF_Attribute)& theMaster)
+{
+  Handle(TPrsStd_AISPresentation) aPresentation;
+  if ( !theMaster->Label().FindAttribute(TPrsStd_AISPresentation::GetID(), aPresentation) )
+  { 
+    aPresentation = new TPrsStd_AISPresentation ();
+    theMaster->Label().AddAttribute(aPresentation);
+  }
 
-  return P;
+  aPresentation->SetDriverGUID( theMaster->ID() );
+  return aPresentation;
 }
 
 
-
-
 //=======================================================================
 //function : GetID
 //purpose  : 
 //=======================================================================
-const Standard_GUID& TPrsStd_AISPresentation::GetID() 
+const Standard_GUID& TPrsStd_AISPresentation::GetID()
 {
-  static Standard_GUID TPrsStd_AISPresentationID("04fb4d00-5690-11d1-8940-080009dc3333");
+  static Standard_GUID TPrsStd_AISPresentationID("3680ac6c-47ae-4366-bb94-26abb6e07341");
   return TPrsStd_AISPresentationID;
 }
 
 
-//=======================================================================
-//function : TPrsStd_AISPresentation
-//purpose  : 
-//=======================================================================
-TPrsStd_AISPresentation::TPrsStd_AISPresentation () : 
-myDriverGUID("00000000-0000-0000-0000-000000000000"),
-myTransparency(0.),
-myColor(Quantity_NOC_WHITE),
-myMaterial(Graphic3d_NOM_BRASS),
-myWidth(0.),
-myMode(0),
-mySelectionMode(0),
-isDisplayed(Standard_False),
-hasOwnColor(Standard_False),
-hasOwnMaterial(Standard_False),
-hasOwnTransparency(Standard_False),
-hasOwnWidth(Standard_False),
-hasOwnMode(Standard_False),
-hasOwnSelectionMode(Standard_False)
-{}
-
-
 //=======================================================================
 //function : Display
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::Display (const Standard_Boolean update)
+void TPrsStd_AISPresentation::Display(const Standard_Boolean theIsUpdate)
 {
-   
-  if( update || myAIS.IsNull() ) {
+  if ( theIsUpdate || myAIS.IsNull() )
     AISUpdate();
-  }
-  AISDisplay();     
+
+  AISDisplay();
 }
 
 
@@ -135,17 +118,23 @@ void TPrsStd_AISPresentation::Display (const Standard_Boolean update)
 //function : Erase
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::Erase (const Standard_Boolean remove)
-{  
-  if( isDisplayed ) AISErase(remove);   
+void TPrsStd_AISPresentation::Erase(const Standard_Boolean theIsRemove)
+{
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+  {
+    if ( aPresentation.IsNull() == Standard_False && aPresentation->IsDisplayed() )
+      AISErase(theIsRemove);
+  }
 }
 
+
 //=======================================================================
 //function : Update
 //purpose  : 
 //=======================================================================
-void  TPrsStd_AISPresentation::Update ()
-{  
+void  TPrsStd_AISPresentation::Update()
+{
   AISUpdate();
 }
 
@@ -154,9 +143,24 @@ void  TPrsStd_AISPresentation::Update ()
 //function : IsDisplayed
 //purpose  : 
 //=======================================================================
-Standard_Boolean TPrsStd_AISPresentation::IsDisplayed () const
+Standard_Boolean TPrsStd_AISPresentation::IsDisplayed() const
 {
-  return isDisplayed;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->IsDisplayed();
+
+  return Standard_False;
+}
+
+
+//=======================================================================
+//function : SetDisplayed
+//purpose  : 
+//=======================================================================
+void TPrsStd_AISPresentation::SetDisplayed(const Standard_Boolean theIsDisplayed)
+{
+  Handle(TDataXtd_Presentation) aPresentation = getData();
+  return aPresentation->SetDisplayed(theIsDisplayed);
 }
 
 
@@ -164,13 +168,13 @@ Standard_Boolean TPrsStd_AISPresentation::IsDisplayed () const
 //function :SetDriverGUID
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::SetDriverGUID(const Standard_GUID& guid) 
+void TPrsStd_AISPresentation::SetDriverGUID(const Standard_GUID& theGUID)
 {
-  // OCC2932 correction
-  if(myDriverGUID == guid) return;
+  if ( myDriverGUID == theGUID )
+    return;
 
-  Backup(); 
-  myDriverGUID = guid;
+  Backup();
+  myDriverGUID = theGUID;
 }
 
 
@@ -190,210 +194,270 @@ Standard_GUID TPrsStd_AISPresentation::GetDriverGUID() const
 //=======================================================================
 Graphic3d_NameOfMaterial TPrsStd_AISPresentation::Material() const
 {
-  return myMaterial; 
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return static_cast<Graphic3d_NameOfMaterial>( aPresentation->Material() );
+
+  return Graphic3d_NOM_BRASS;
 }
 
+
 //=======================================================================
 //function :HasMaterial
 //purpose  : 
 //=======================================================================
 Standard_Boolean TPrsStd_AISPresentation::HasOwnMaterial() const
 {
-  return hasOwnMaterial;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->IsHasOwnMaterial();
+
+  return Standard_False;
 }
 
+
 //=======================================================================
-//function :UnsetMaterial
+//function : UnsetMaterial
 //purpose  : 
 //=======================================================================
 void TPrsStd_AISPresentation::UnsetMaterial()
 {
-  // OCC2932 correction
-  if(hasOwnMaterial == Standard_False && !myAIS.IsNull()) {
-      if(!myAIS->HasMaterial())
-       return;
-  }
-    
-  Backup();
-  hasOwnMaterial = Standard_False;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() &&  myAIS->HasMaterial() ) {
-    Handle(AIS_InteractiveContext) ctx;
-    Handle(TPrsStd_AISViewer) viewer;
-    if( TPrsStd_AISViewer::Find(Label(), viewer) ) ctx = viewer->GetInteractiveContext(); 
-    if( !ctx.IsNull() )   
-      ctx->UnsetMaterial(myAIS, Standard_False);
-    else  
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( !FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return;
+
+  if ( !aPresentation->IsHasOwnMaterial() )
+    if( !myAIS.IsNull() && !myAIS->HasMaterial() )
+      return;
+
+  aPresentation->UnsetMaterial();
+
+  if ( myAIS.IsNull() )
+    AISUpdate();
+
+  if ( !myAIS.IsNull() && myAIS->HasMaterial() )
+  {
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
+
+    if ( !aContext.IsNull() )
+      aContext->UnsetMaterial(myAIS, Standard_False);
+    else
       myAIS->UnsetMaterial();
   }
 }
 
+
 //=======================================================================
-//function :SetMaterial
+//function : SetMaterial
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::SetMaterial(const Graphic3d_NameOfMaterial aName) 
+void TPrsStd_AISPresentation::SetMaterial(const Graphic3d_NameOfMaterial theName)
 {
-  // OCC2932 correction
-  if(myMaterial == aName && hasOwnMaterial == Standard_True && !myAIS.IsNull()) {
-      if(myAIS->HasMaterial() && myAIS->Material() == aName)
-       return;
-  }
+  const Standard_Integer aName = static_cast<Standard_Integer>(theName);
 
-  Backup();
-  myMaterial = aName;
-  hasOwnMaterial = Standard_True;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() ) { 
-    if( myAIS->HasMaterial() && myAIS->Material() == aName ) return;   // AIS has already had that material     
-    Handle(AIS_InteractiveContext) ctx;
-    Handle(TPrsStd_AISViewer) viewer;
-    if( TPrsStd_AISViewer::Find(Label(), viewer) ) ctx = viewer->GetInteractiveContext(); 
-    if( !ctx.IsNull() )   
-      ctx->SetMaterial(myAIS, aName,  Standard_False);
-    else  
-      myAIS->SetMaterial(aName);
+  Handle(TDataXtd_Presentation) aPresentation = getData();
+
+  if ( aPresentation->IsHasOwnMode() && aPresentation->Material() == aName )
+    if ( !myAIS.IsNull() && myAIS->HasMaterial() && myAIS->Material() == theName )
+      return;
+
+  aPresentation->SetMaterial(aName);
+
+  if ( myAIS.IsNull() )
+    AISUpdate();
+
+  if ( !myAIS.IsNull() )
+  {
+    if ( myAIS->HasMaterial() && myAIS->Material() == theName )
+      return;   // AIS has already had that material
+
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
+
+    if ( !aContext.IsNull() )
+      aContext->SetMaterial(myAIS, theName,  Standard_False);
+    else
+      myAIS->SetMaterial(theName);
   }
 }
 
 
 //=======================================================================
-//function :SetTransparency
+//function :Transparency
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::SetTransparency(const Standard_Real aValue) 
+Standard_Real TPrsStd_AISPresentation::Transparency() const
 {
-  // OCC2932 correction
-  if(hasOwnTransparency == Standard_True && myTransparency == aValue && !myAIS.IsNull())
-      if(myAIS->Transparency() == aValue)
-       return;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->Transparency();
 
-  Backup();
-  myTransparency = aValue;
-  hasOwnTransparency = Standard_True;
-  if( myAIS.IsNull() ) AISUpdate(); 
-  if( !myAIS.IsNull() ) { 
-    if( myAIS->Transparency() == aValue ) return;   // AIS has already had that transparency 
-    Handle(AIS_InteractiveContext) ctx;
-    Handle(TPrsStd_AISViewer) viewer;
-    if( TPrsStd_AISViewer::Find(Label(), viewer) ) ctx = viewer->GetInteractiveContext();
-    if( !ctx.IsNull() )  
-      ctx->SetTransparency(myAIS, aValue, Standard_False);
-    else 
-      myAIS->SetTransparency(aValue);
-  }
+  return 0.0;
 }
 
 
 //=======================================================================
-//function :Transparency
+//function :SetTransparency
 //purpose  : 
 //=======================================================================
-Standard_Real TPrsStd_AISPresentation::Transparency() const
+void TPrsStd_AISPresentation::SetTransparency(const Standard_Real theValue)
 {
-  return myTransparency;
+  Handle(TDataXtd_Presentation) aPresentation = getData();
+
+  if( aPresentation->IsHasOwnTransparency() && aPresentation->Transparency() == theValue )
+    if ( !myAIS.IsNull() && myAIS->Transparency() == theValue )
+      return;
+
+  aPresentation->SetTransparency(theValue);
+
+  if ( myAIS.IsNull() )
+    AISUpdate();
+
+  if ( !myAIS.IsNull() )
+  {
+    if ( myAIS->Transparency() == theValue )
+      return;   // AIS has already had that transparency 
+
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
+
+    if ( !aContext.IsNull() )
+      aContext->SetTransparency(myAIS, theValue, Standard_False);
+    else
+      myAIS->SetTransparency(theValue);
+  }
 }
 
+
 //=======================================================================
 //function :UnsetTransparency
 //purpose  : 
 //=======================================================================
 void TPrsStd_AISPresentation::UnsetTransparency()
 {
-  // OCC2932 correction
-  if(!hasOwnTransparency)
-    return;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+  {
+    if ( !aPresentation->IsHasOwnTransparency() )
+      return;
 
-  Backup(); 
-  hasOwnTransparency = Standard_False;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() ) {
-    Handle(AIS_InteractiveContext) ctx;
-    Handle(TPrsStd_AISViewer) viewer;
-    if( TPrsStd_AISViewer::Find(Label(), viewer) ) ctx = viewer->GetInteractiveContext(); 
-    if( !ctx.IsNull() )   
-      ctx->UnsetTransparency(myAIS, Standard_False);
-    else  
+    aPresentation->UnsetTransparency();
+  }
+
+  if ( myAIS.IsNull() )
+    AISUpdate();
+
+  if ( !myAIS.IsNull() )
+  {
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
+
+    if( !aContext.IsNull() )
+      aContext->UnsetTransparency(myAIS, Standard_False);
+    else
       myAIS->UnsetTransparency();
   }
 }
 
+
 //=======================================================================
-//function :HasTransparency
+//function : HasTransparency
 //purpose  : 
 //=======================================================================
 Standard_Boolean TPrsStd_AISPresentation::HasOwnTransparency() const
 {
-  return hasOwnTransparency;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->IsHasOwnTransparency();
+
+  return Standard_False;
 }
 
+
 //=======================================================================
-//function :Color
+//function : Color
 //purpose  : 
 //=======================================================================
 Quantity_NameOfColor TPrsStd_AISPresentation::Color() const
 {
-  return myColor;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return static_cast<Quantity_NameOfColor>(aPresentation->Color());
+
+  return Quantity_NOC_WHITE;
 }
 
 //=======================================================================
-//function :HasColor
+//function : HasOwnColor
 //purpose  : 
 //=======================================================================
 Standard_Boolean TPrsStd_AISPresentation::HasOwnColor() const
 {
-  return hasOwnColor;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->IsHasOwnColor();
+
+  return Standard_False;
 }
 
+
 //=======================================================================
-//function :UnsetColor
+//function : UnsetColor
 //purpose  : 
 //=======================================================================
 void TPrsStd_AISPresentation::UnsetColor()
 {
-  // OCC2932 correction
-  if(!hasOwnColor && !myAIS.IsNull()) 
-      if(!myAIS->HasColor())
-       return;
-  
-  Backup();
-  hasOwnColor = Standard_False;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() &&  myAIS->HasColor() ) {
-    Handle(AIS_InteractiveContext) ctx;
-    Handle(TPrsStd_AISViewer) viewer;
-    if( TPrsStd_AISViewer::Find(Label(), viewer) ) ctx = viewer->GetInteractiveContext(); 
-    if( !ctx.IsNull() )   
-      ctx->UnsetColor(myAIS, Standard_False);
-    else  
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+  {
+    if ( aPresentation->IsHasOwnColor() )
+      if ( !myAIS.IsNull() && !myAIS->HasColor() )
+        return;
+
+    aPresentation->UnsetColor();
+  }
+
+  if ( myAIS.IsNull() )
+    AISUpdate();
+
+  if ( !myAIS.IsNull() && myAIS->HasColor() )
+  {
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
+
+    if ( !aContext.IsNull() )
+      aContext->UnsetColor(myAIS, Standard_False);
+    else
       myAIS->UnsetColor();
   }
 }
 
+
 //=======================================================================
-//function :SetColor
+//function : SetColor
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::SetColor(const Quantity_NameOfColor aColor) 
+void TPrsStd_AISPresentation::SetColor(const Quantity_NameOfColor theColor)
 {
-  // OCC2932 correction
-  if(hasOwnColor && myColor == aColor && ! myAIS.IsNull()) 
-    if(myAIS->HasColor() && myAIS->Color() == aColor ) 
+  Handle(TDataXtd_Presentation) aPresentation = getData();
+
+  const Standard_Integer aColor = static_cast<Standard_Integer>(theColor);
+  if ( aPresentation->IsHasOwnColor() && aPresentation->Color() == aColor )
+    if ( !myAIS.IsNull() && myAIS->HasColor() && myAIS->Color() == theColor )
       return;
-  
-  Backup();
-  myColor = aColor;
-  hasOwnColor = Standard_True;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() ) {
-    if( myAIS->HasColor() && myAIS->Color() == aColor ) return;   // AIS has already had that color     
-    Handle(AIS_InteractiveContext) ctx;
-    Handle(TPrsStd_AISViewer) viewer;
-    if( TPrsStd_AISViewer::Find(Label(), viewer) ) ctx = viewer->GetInteractiveContext();
-    if( !ctx.IsNull() )  
-      ctx->SetColor(myAIS, aColor, Standard_False);
+
+  aPresentation->SetColor(aColor);
+
+  if ( myAIS.IsNull() )
+    AISUpdate();
+
+  if ( !myAIS.IsNull() )
+  {
+    if ( myAIS->HasColor() && myAIS->Color() == theColor )
+      return;   // AIS has already had that color
+
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
+
+    if( !aContext.IsNull() )
+      aContext->SetColor(myAIS, theColor, Standard_False);
     else 
-      myAIS->SetColor(aColor);
+      myAIS->SetColor(theColor);
   }
 }
 
@@ -404,208 +468,273 @@ void TPrsStd_AISPresentation::SetColor(const Quantity_NameOfColor aColor)
 //=======================================================================
 Standard_Real TPrsStd_AISPresentation::Width() const
 {
-   return myWidth;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->Width();
+
+  return 0.0;
 }
 
+
 //=======================================================================
-//function :HasWidth
+//function : HasWidth
 //purpose  : 
 //=======================================================================
 Standard_Boolean TPrsStd_AISPresentation::HasOwnWidth() const
 {
-  return hasOwnWidth;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->IsHasOwnWidth();
+
+  return Standard_False;
 }
 
+
 //=======================================================================
-//function :SetWidth
+//function : SetWidth
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::SetWidth(const Standard_Real aWidth) 
+void TPrsStd_AISPresentation::SetWidth(const Standard_Real theWidth)
 {
-  // OCC2932 correction
-  if(hasOwnWidth && myWidth == aWidth && myAIS.IsNull()) 
-    if(myAIS->HasWidth() && myAIS->Width() == aWidth ) 
+  Handle(TDataXtd_Presentation) aPresentation = getData();
+
+  if ( aPresentation->IsHasOwnWidth() && aPresentation->Width() == theWidth )
+    if ( !myAIS.IsNull() && myAIS->HasWidth() && myAIS->Width() == theWidth )
       return;
 
-  Backup();
-  myWidth = aWidth;
-  hasOwnWidth = Standard_True;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() ) {
-    if( myAIS->HasWidth() && myAIS->Width() == aWidth ) return;   // AIS has already had that width     
-    Handle(AIS_InteractiveContext) ctx;
-    Handle(TPrsStd_AISViewer) viewer;
-    if( TPrsStd_AISViewer::Find(Label(), viewer) ) ctx = viewer->GetInteractiveContext();
-    if( !ctx.IsNull() )  
-      ctx->SetWidth(myAIS, aWidth, Standard_False);
+  aPresentation->SetWidth(theWidth);
+
+  if( !myAIS.IsNull() )
+  {
+    if ( myAIS->HasWidth() && myAIS->Width() == theWidth )
+      return;   // AIS has already had that width
+
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
+
+    if( !aContext.IsNull() )
+      aContext->SetWidth(myAIS, theWidth, Standard_False);
     else 
-      myAIS->SetWidth(aWidth);
+      myAIS->SetWidth(theWidth);
   }
 }
 
+
 //=======================================================================
-//function :UnsetWidth
+//function : UnsetWidth
 //purpose  : 
 //=======================================================================
 void TPrsStd_AISPresentation::UnsetWidth()
 {
-  // OCC2932 correction
-  if(!hasOwnWidth && !myAIS.IsNull())
-    if(!myAIS->HasWidth())
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( !FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+  {
+    // create new
+    return;
+  }
+
+  if ( !aPresentation->IsHasOwnWidth() )
+    if ( !myAIS.IsNull() && !myAIS->HasWidth() )
       return;
 
-  Backup();
-  hasOwnWidth = Standard_False;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() &&  myAIS->HasWidth() ) {
-    Handle(AIS_InteractiveContext) ctx;
-    Handle(TPrsStd_AISViewer) viewer;
-    if( TPrsStd_AISViewer::Find(Label(), viewer) ) ctx = viewer->GetInteractiveContext(); 
-    if( !ctx.IsNull() )   
-      ctx->UnsetWidth(myAIS, Standard_False);
-    else  
+  aPresentation->UnsetWidth();
+
+  if( myAIS.IsNull() )
+    AISUpdate();
+
+  if ( !myAIS.IsNull() && myAIS->HasWidth() )
+  {
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
+
+    if ( !aContext.IsNull() )
+      aContext->UnsetWidth(myAIS, Standard_False);
+    else
       myAIS->UnsetWidth();
   }
 }
 
 
-
 //=======================================================================
 //function : Mode
 //purpose  : 
 //=======================================================================
-
 Standard_Integer TPrsStd_AISPresentation::Mode() const
 {
-   return myMode;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->Mode();
+
+  return 0;
 }
 
+
 //=======================================================================
-//function :HasOwnMode
+//function : HasOwnMode
 //purpose  : 
 //=======================================================================
 Standard_Boolean TPrsStd_AISPresentation::HasOwnMode() const
 {
-  return hasOwnMode;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->IsHasOwnMode();
+
+  return Standard_False;
 }
 
+
 //=======================================================================
-//function :SetMode
+//function : SetMode
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::SetMode(const Standard_Integer theMode) 
+void TPrsStd_AISPresentation::SetMode(const Standard_Integer theMode)
 {
-  // OCC2932 correction
-  if(hasOwnMode && myMode == theMode && !myAIS.IsNull()) 
-    if(myAIS->DisplayMode() == theMode ) 
+  Handle(TDataXtd_Presentation) aPresentation = getData();
+
+  if ( aPresentation->IsHasOwnMode() && aPresentation->Mode() == theMode )
+    if ( !myAIS.IsNull() && myAIS->DisplayMode() == theMode )
       return;
 
-  Backup();
-  myMode = theMode;
-  hasOwnMode = Standard_True;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() ) {
-    if(  myAIS->DisplayMode() == theMode ) return;   // AIS has already had that mode    
-    Handle(AIS_InteractiveContext) ctx;
-    Handle(TPrsStd_AISViewer) viewer;
-    if( TPrsStd_AISViewer::Find(Label(), viewer) )
-      ctx = viewer->GetInteractiveContext();
-    if( !ctx.IsNull() )  
-      ctx->SetDisplayMode(myAIS, theMode, Standard_False);
+  aPresentation->SetMode(theMode);
+
+  if ( myAIS.IsNull() )
+    AISUpdate();
+
+  if ( !myAIS.IsNull() )
+  {
+    if (  myAIS->DisplayMode() == theMode )
+      return;   // AIS has already had that mode
+
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
+
+    if( !aContext.IsNull() )
+      aContext->SetDisplayMode(myAIS, theMode, Standard_False);
     else 
       myAIS->SetDisplayMode(theMode);
   }
 }
 
+
 //=======================================================================
-//function :UnsetMode
+//function : UnsetMode
 //purpose  : 
 //=======================================================================
 void TPrsStd_AISPresentation::UnsetMode()
 {
-  // OCC2932 correction
-  if(HasOwnMode() == Standard_False && myAIS.IsNull() == Standard_False)
-    if(!myAIS->HasDisplayMode())
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( !FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return;
+
+  if ( !aPresentation->IsHasOwnMode() )
+    if ( !myAIS.IsNull() && !myAIS->HasDisplayMode() )
       return;
 
-  Backup();
-  hasOwnMode = Standard_False;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() &&  myAIS->HasDisplayMode() ) {
-       Handle(AIS_InteractiveContext) ctx;
-       Handle(TPrsStd_AISViewer) viewer;
-       if( TPrsStd_AISViewer::Find(Label(), viewer) )
-       ctx = viewer->GetInteractiveContext(); 
-       if( !ctx.IsNull() )
-        ctx->UnsetDisplayMode(myAIS, Standard_False);
-    else  
-               myAIS->UnsetDisplayMode();
+  aPresentation->UnsetMode();
+
+  if ( myAIS.IsNull() )
+    AISUpdate();
+
+  if( !myAIS.IsNull() &&  myAIS->HasDisplayMode() )
+  {
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
+
+    if ( !aContext.IsNull() )
+      aContext->UnsetDisplayMode(myAIS, Standard_False);
+    else
+      myAIS->UnsetDisplayMode();
   }
 }
 
+
 //=======================================================================
 //function : SelectionMode
 //purpose  : 
 //=======================================================================
-
 Standard_Integer TPrsStd_AISPresentation::SelectionMode() const
 {
-   return mySelectionMode;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->SelectionMode();
+
+  return 0;
 }
 
+
 //=======================================================================
-//function :HasOwnSelectionMode
+//function : HasOwnSelectionMode
 //purpose  : 
 //=======================================================================
 Standard_Boolean TPrsStd_AISPresentation::HasOwnSelectionMode() const
 {
-  return hasOwnSelectionMode;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+    return aPresentation->IsHasOwnSelectionMode();
+
+  return Standard_False;
 }
 
+
 //=======================================================================
-//function :SetSelectionMode
+//function : SetSelectionMode
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::SetSelectionMode(const Standard_Integer theSelectionMode) 
+void TPrsStd_AISPresentation::SetSelectionMode(const Standard_Integer theSelectionMode)
 {
-  // OCC2932 correction
-  if(hasOwnSelectionMode && mySelectionMode == theSelectionMode && !myAIS.IsNull())
-    if(myAIS->SelectionMode() == theSelectionMode )
+  Handle(TDataXtd_Presentation) aPresentation = getData();
+
+  if ( aPresentation->IsHasOwnSelectionMode() &&
+       aPresentation->SelectionMode() == theSelectionMode )
+  {
+    if ( !myAIS.IsNull() && myAIS->SelectionMode() == theSelectionMode )
+      return;
+  }
+
+  aPresentation->SetSelectionMode(theSelectionMode);
+
+  if ( myAIS.IsNull() )
+    AISUpdate();
+
+  if ( !myAIS.IsNull() )
+  {
+    if ( myAIS->SelectionMode() == theSelectionMode )
       return;
 
-  Backup();
-  mySelectionMode = theSelectionMode;
-  hasOwnSelectionMode = Standard_True;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() ) {
-    if(  myAIS->SelectionMode() == theSelectionMode ) return;
     myAIS->SetSelectionMode(theSelectionMode);
   }
 }
 
+
 //=======================================================================
-//function :UnsetSelectionMode
+//function : UnsetSelectionMode
 //purpose  : 
 //=======================================================================
 void TPrsStd_AISPresentation::UnsetSelectionMode()
 {
-  if(!hasOwnSelectionMode && !myAIS.IsNull())
-    if(!myAIS->HasSelectionMode())
-      return;
+  Handle(TDataXtd_Presentation) aPresentation;
+  if ( FindAttribute(TDataXtd_Presentation::GetID(), aPresentation) )
+  {
 
-  Backup();
-  hasOwnSelectionMode = Standard_False;
-  if( myAIS.IsNull() ) AISUpdate();
-  if( !myAIS.IsNull() &&  myAIS->HasSelectionMode() ) {
-    myAIS->UnsetSelectionMode();
+    if ( !aPresentation->IsHasOwnSelectionMode() )
+      if ( !myAIS.IsNull() && !myAIS->HasSelectionMode() )
+        return;
+
+    aPresentation->UnsetSelectionMode();
   }
+
+  if ( myAIS.IsNull() )
+    AISUpdate();
+
+  if ( !myAIS.IsNull() && myAIS->HasSelectionMode() )
+    myAIS->UnsetSelectionMode();
 }
 
+
 //=======================================================================
 //function : ID
 //purpose  : 
 //=======================================================================
-const Standard_GUID& TPrsStd_AISPresentation::ID() const { return GetID(); }
+const Standard_GUID& TPrsStd_AISPresentation::ID() const
+{
+  return GetID();
+}
 
 
 //=======================================================================
@@ -614,23 +743,7 @@ const Standard_GUID& TPrsStd_AISPresentation::ID() const { return GetID(); }
 //=======================================================================
 Handle(TDF_Attribute) TPrsStd_AISPresentation::BackupCopy() const 
 {
-  Handle(TPrsStd_AISPresentation) copy = new TPrsStd_AISPresentation;
-  copy->myTransparency = myTransparency;
-  copy->myColor = myColor;
-  copy->myMode= myMode;
-  copy->myWidth= myWidth;
-  copy->myMaterial = myMaterial;
-  copy->hasOwnColor = hasOwnColor;
-  copy->hasOwnMaterial = hasOwnMaterial;
-  copy->hasOwnWidth = hasOwnWidth;
-  copy->hasOwnMode=hasOwnMode;
-  copy->hasOwnTransparency = hasOwnTransparency;
-  copy->myAIS.Nullify();
-  copy->isDisplayed = isDisplayed;
-  copy->myDriverGUID = myDriverGUID;
-  copy->mySelectionMode= mySelectionMode;
-  copy->hasOwnSelectionMode = hasOwnSelectionMode;
-  return copy; 
+  return new TPrsStd_AISPresentation;
 }
 
 
@@ -640,140 +753,68 @@ Handle(TDF_Attribute) TPrsStd_AISPresentation::BackupCopy() const
 //=======================================================================
 Handle(TDF_Attribute) TPrsStd_AISPresentation::NewEmpty() const
 {   
-  return new TPrsStd_AISPresentation ();
+  return new TPrsStd_AISPresentation();
 }
 
+
 //=======================================================================
-//function : Restore
+//function : Paste
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::Restore (const Handle(TDF_Attribute)& With) 
-{ 
-  Handle(TPrsStd_AISPresentation) with = Handle(TPrsStd_AISPresentation)::DownCast(With);
+void TPrsStd_AISPresentation::Restore(const Handle(TDF_Attribute)& theWith)
+{
+  Handle(TPrsStd_AISPresentation) aWith =
+    Handle(TPrsStd_AISPresentation)::DownCast(theWith);
 
   myAIS.Nullify();
-
-  if(!with->HasOwnMaterial()) hasOwnMaterial = Standard_False;
-  else { 
-    hasOwnMaterial = Standard_True;
-  }
-  myMaterial = with->Material();
-
-  if(!with->HasOwnColor()) hasOwnColor = Standard_False;
-  else { 
-    hasOwnColor = Standard_True;
-  }
-  myColor = with->Color(); 
-
-  if(!with->HasOwnWidth()) hasOwnWidth = Standard_False;
-  else { 
-    hasOwnWidth = Standard_True;
-  }
-  myWidth = with->Width();
-
- if(!with->HasOwnMode()) hasOwnMode = Standard_False;
-  else { 
-    hasOwnMode = Standard_True;
-  }
-  myMode = with->Mode();
-  
-  if(!with->HasOwnSelectionMode()) hasOwnSelectionMode = Standard_False;
-  else { 
-    hasOwnSelectionMode = Standard_True;
-  }
-  mySelectionMode = with->SelectionMode();
-
-  if(!with->HasOwnTransparency()) hasOwnTransparency = Standard_False;
-  else { 
-    hasOwnTransparency = Standard_True;
-  }
-  myTransparency = with->Transparency();
-
-  isDisplayed = with->IsDisplayed();
-  myDriverGUID  = with->GetDriverGUID();
+  myDriverGUID  = aWith->GetDriverGUID();
 }
 
+
 //=======================================================================
 //function : Paste
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::Paste (const Handle(TDF_Attribute)& Into,
-                                    const Handle(TDF_RelocationTable)& ) const
-{  
-  Handle(TPrsStd_AISPresentation) into = Handle(TPrsStd_AISPresentation)::DownCast(Into);
-  
-  into->Backup();
-
-  if(!hasOwnMaterial) into->hasOwnMaterial = Standard_False;
-  else {
-    into->myMaterial = myMaterial;
-    into->hasOwnMaterial = Standard_True;
-  }
-
-  if(!hasOwnColor) into->hasOwnColor = Standard_False;
-  else {
-    into->myColor = myColor; 
-    into->hasOwnColor = Standard_True;
-  }
-
-  if(!hasOwnWidth) into->hasOwnWidth = Standard_False;
-  else {
-    into->myWidth = myWidth;
-    into->hasOwnWidth = Standard_True;
-  }
- if(!hasOwnMode) into->hasOwnMode = Standard_False;
-  else {
-    into->myMode = myMode;
-    into->hasOwnMode = Standard_True;
-  }
-
- if(!hasOwnSelectionMode) into->hasOwnSelectionMode = Standard_False;
-  else {
-    into->mySelectionMode = mySelectionMode;
-    into->hasOwnSelectionMode = Standard_True;
-  }
-
-  if(!hasOwnTransparency) into->hasOwnTransparency = Standard_False;
-  else {
-    into->myTransparency = myTransparency;
-    into->hasOwnTransparency = Standard_True;
-  }
-
-  if (into->isDisplayed)
-    into->AISErase(Standard_True);
-
-  into->isDisplayed = isDisplayed;   
-  into->myDriverGUID = myDriverGUID;
+void TPrsStd_AISPresentation::Paste (const Handle(TDF_Attribute)& theInto,
+                                     const Handle(TDF_RelocationTable)& ) const
+{
+  Handle(TPrsStd_AISPresentation) anInto =
+    Handle(TPrsStd_AISPresentation)::DownCast(theInto);
 
-  into->myAIS.Nullify();
+  anInto->Backup();
+  anInto->myAIS.Nullify();
 }
 
+
 //=======================================================================
 //function : AfterAddition
 //purpose  : erase if displayed
 //=======================================================================
 void TPrsStd_AISPresentation::AfterAddition() 
-{ 
+{
   AfterResume();
 }
 
+
 //=======================================================================
 //function : BeforeRemoval
 //purpose  : erase if displayed
 //=======================================================================
 void TPrsStd_AISPresentation::BeforeRemoval() 
-{ 
-   BeforeForget();
+{
+  BeforeForget();
 }
 
+
 //=======================================================================
 //function : BeforeForget
 //purpose  : erase if displayed
 //=======================================================================
 void TPrsStd_AISPresentation::BeforeForget() 
 { 
-  if( !myAIS.IsNull() ) {
-    AISErase(Standard_True);   //Remove AISObject from context
+  if ( !myAIS.IsNull() )
+  { // Remove AISObject from context.
+    AISErase(Standard_True);
     myAIS.Nullify();
   }
 }
@@ -783,32 +824,39 @@ void TPrsStd_AISPresentation::BeforeForget()
 //function : AfterResume
 //purpose  : display if displayed
 //=======================================================================
-void TPrsStd_AISPresentation::AfterResume() 
+void TPrsStd_AISPresentation::AfterResume()
 {
   AISUpdate();
-  if( IsDisplayed() ) AISDisplay();
-  else AISErase();
+
+  if ( IsDisplayed() )
+    AISDisplay();
+  else
+    AISErase();
 }
 
+
 //=======================================================================
 //function : BeforeUndo
 //purpose  : le NamedShape associe doit etre present
 //=======================================================================
-
 Standard_Boolean TPrsStd_AISPresentation::BeforeUndo (const Handle(TDF_AttributeDelta)& AD,
-                                                     const Standard_Boolean ) 
+                                                      const Standard_Boolean ) 
 {
   Handle(TPrsStd_AISPresentation) P;
-  AD->Label().FindAttribute(TPrsStd_AISPresentation::GetID(), P); 
+  AD->Label().FindAttribute(TPrsStd_AISPresentation::GetID(), P);
 
-  if (AD->IsKind(STANDARD_TYPE(TDF_DeltaOnAddition))) {    
-    if( !P.IsNull() ) P->BeforeForget();
+  if (AD->IsKind(STANDARD_TYPE(TDF_DeltaOnAddition)))
+  {
+    if ( !P.IsNull() )
+      P->BeforeForget();
   }
   else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnRemoval))) {
-  }  
-  else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnModification))) {
-    if( !P.IsNull() ) P->BeforeForget();
-  } 
+  }
+  else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnModification)))
+  {
+    if ( !P.IsNull() )
+      P->BeforeForget();
+  }
 
   return Standard_True;
 }
@@ -818,113 +866,134 @@ Standard_Boolean TPrsStd_AISPresentation::BeforeUndo (const Handle(TDF_Attribute
 //function : AfterUndo
 //purpose  : le NamedShape associe doit etre present
 //=======================================================================
-
 Standard_Boolean TPrsStd_AISPresentation::AfterUndo (const Handle(TDF_AttributeDelta)& AD,
-                                                    const Standard_Boolean ) 
+                                                     const Standard_Boolean ) 
 { 
   Handle(TPrsStd_AISPresentation) P;
   AD->Label().FindAttribute(TPrsStd_AISPresentation::GetID(), P);
 
-  if (AD->IsKind(STANDARD_TYPE(TDF_DeltaOnAddition))) {
+  if (AD->IsKind(STANDARD_TYPE(TDF_DeltaOnAddition)))
+  {}
+  else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnRemoval)))
+  {
+    if ( !P.IsNull() )
+      P->AfterAddition();
   }
-  else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnRemoval))) {  
-    if( !P.IsNull() ) P->AfterAddition();
-  }  
-  else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnModification))) {
-    if( !P.IsNull() ) P->AfterResume();
+  else if (AD->IsKind(STANDARD_TYPE(TDF_DefaultDeltaOnModification)))
+  {
+    if ( !P.IsNull() )
+      P->AfterResume();
   }
 
   return Standard_True;
 }
 
 
-
 //=======================================================================
 //function : AISUpdate
 //purpose  : 
 //=======================================================================
-
-void TPrsStd_AISPresentation::AISUpdate ()
-{ 
+void TPrsStd_AISPresentation::AISUpdate()
+{
   Backup();
 
-  Handle(AIS_InteractiveContext) ctx;
-  if(!Label().IsNull()) {  
-    Handle(TPrsStd_AISViewer) viewer;
-    if( TPrsStd_AISViewer::Find(Label(), viewer) ) ctx = viewer->GetInteractiveContext();
-
-    Handle(TPrsStd_Driver) driver;
-    if (TPrsStd_DriverTable::Get()->FindDriver(GetDriverGUID(), driver)) {
-      if (myAIS.IsNull()) {              // build a new  AIS
-       Handle(AIS_InteractiveObject) newais;
-       if (driver->Update (Label(), newais))  {
-         myAIS = newais;
-         newais->SetOwner(this);
-       }
+  Handle(AIS_InteractiveContext) aContext;
+  if ( !Label().IsNull() )
+  {
+    aContext = getAISContext();
+
+    Handle(TPrsStd_Driver) aDriver;
+    if ( TPrsStd_DriverTable::Get()->FindDriver(GetDriverGUID(), aDriver) )
+    {
+      // Build a new  AIS.
+      if ( myAIS.IsNull() )
+      {
+        Handle(AIS_InteractiveObject) aNewObj;
+        if ( aDriver->Update(Label(), aNewObj) )
+        {
+          myAIS = aNewObj;
+          aNewObj->SetOwner(this);
+        }
       }
-      else {
-       Handle(AIS_InteractiveObject) theais = myAIS;
-       if (driver->Update (Label(), theais)) {
-         if (! (theais ==  myAIS)) {    
-           if(!ctx.IsNull()) ctx->Remove(myAIS);
-           myAIS = theais;               //Driver has built new AIS
-           theais->SetOwner(this);
-         }
-       }
+      else
+      {
+        Handle(AIS_InteractiveObject) anObj = myAIS;
+        if ( aDriver->Update(Label(), anObj) )
+          if ( !(anObj ==  myAIS) )
+          {
+            if ( !aContext.IsNull() )
+              aContext->Remove(myAIS);
+
+            // Driver has built new AIS.
+            myAIS = anObj;
+            anObj->SetOwner(this);
+          }
       }
     }
   }
   else return;
 
-//Apply the visualization settings
-  if( !myAIS.IsNull() ) {
-
-    if( hasOwnColor ) { 
-      if( !(myAIS->HasColor()) || (myAIS->HasColor() && myAIS->Color() != myColor) ) {
-       if(!ctx.IsNull()) ctx->SetColor(myAIS, myColor, Standard_False);
-       else myAIS->SetColor(myColor);  
-      }
-    } 
+  // Apply the visualization settings.
+  if ( !myAIS.IsNull() )
+  {
+    if ( HasOwnColor() )
+    {
+      Quantity_NameOfColor aColor = Color();
+      if ( !(myAIS->HasColor()) || (myAIS->HasColor() && myAIS->Color() != aColor) )
+        if ( !aContext.IsNull() )
+          aContext->SetColor(myAIS, aColor, Standard_False);
+        else
+          myAIS->SetColor(aColor);
+    }
 
-    if( hasOwnMaterial ) { 
-      if( !(myAIS->HasMaterial()) || (myAIS->HasMaterial() && myAIS->Material() != myMaterial) ) {
-       if(!ctx.IsNull()) ctx->SetMaterial(myAIS, myMaterial, Standard_False );
-       else myAIS->SetMaterial(myMaterial);  
-      }
-    } 
-    
-    if( hasOwnTransparency ) {
-      if(  myAIS->Transparency() != myTransparency )  {
-       if(!ctx.IsNull()) ctx->SetTransparency(myAIS, myTransparency, Standard_False);
-       else myAIS->SetTransparency(myTransparency);  
-      }
+    if ( HasOwnMaterial() )
+    {
+      Graphic3d_NameOfMaterial aMaterial = Material();
+      if ( !(myAIS->HasMaterial()) || (myAIS->HasMaterial() && myAIS->Material() != aMaterial) )
+        if ( !aContext.IsNull() )
+          aContext->SetMaterial(myAIS, aMaterial, Standard_False );
+        else
+          myAIS->SetMaterial(aMaterial);
     }
 
-    if( hasOwnWidth ) { 
-      if( !(myAIS->HasWidth()) || (myAIS->HasWidth() && myAIS->Width() != myWidth) ) {
-       if(!ctx.IsNull()) ctx->SetWidth(myAIS, myWidth, Standard_False);
-       else myAIS->SetWidth(myWidth); 
-      }
+    if ( HasOwnTransparency() )
+    {
+      const Standard_Real aTransparency = Transparency();
+      if ( myAIS->Transparency() != aTransparency )
+        if( !aContext.IsNull() )
+          aContext->SetTransparency(myAIS, aTransparency, Standard_False);
+        else
+          myAIS->SetTransparency(aTransparency);
     }
 
-    if( hasOwnMode) { 
-      if(  myAIS->DisplayMode() != myMode ) {
-         myAIS->SetDisplayMode(myMode); 
-      } 
-     
-           
+    if ( HasOwnWidth() )
+    {
+      const Standard_Real aWidth = Width();
+      if ( !(myAIS->HasWidth()) || (myAIS->HasWidth() && myAIS->Width() != aWidth) )
+        if ( !aContext.IsNull() )
+          aContext->SetWidth(myAIS, aWidth, Standard_False);
+        else
+          myAIS->SetWidth(aWidth);
     }
 
-    if (hasOwnSelectionMode) { 
-      if (myAIS->SelectionMode() != mySelectionMode ) {
-       myAIS->SetSelectionMode(mySelectionMode); 
-      } 
+    if ( HasOwnMode() )
+    {
+      const Standard_Integer aMode = Mode();
+      if ( myAIS->DisplayMode() != aMode )
+        myAIS->SetDisplayMode(aMode);
     }
 
+    if ( HasOwnSelectionMode() )
+    {
+      const Standard_Integer aMode = SelectionMode();
+      if (myAIS->SelectionMode() != aMode )
+        myAIS->SetSelectionMode(aMode);
+    }
   }
-  
-  if( isDisplayed && !ctx.IsNull() ) ctx->Redisplay(myAIS, Standard_False);
+
+  if ( !aContext.IsNull() && IsDisplayed() )
+    aContext->Redisplay(myAIS, Standard_False);
+
   return;
 }
 
@@ -932,25 +1001,27 @@ void TPrsStd_AISPresentation::AISUpdate ()
 //function : AISDisplay
 //purpose  : 
 //=======================================================================
+void TPrsStd_AISPresentation::AISDisplay()
+{
+  if ( !Label().IsNull() )
+  {
+    Handle(AIS_InteractiveContext) aContext = getAISContext();
 
-void TPrsStd_AISPresentation::AISDisplay ()
-{   
-  
-  if (!Label().IsNull()) {  
-    Handle(TPrsStd_AISViewer) viewer;
-    if( !TPrsStd_AISViewer::Find(Label(), viewer) ) return;   
-    Handle(AIS_InteractiveContext) ctx = viewer->GetInteractiveContext();
-    if( ctx.IsNull() ) return;
-
-    if (!myAIS.IsNull()) { 
-
-      if( !(myAIS->GetContext()).IsNull() && (myAIS->GetContext()) != ctx ) myAIS->GetContext()->Remove(myAIS);
-      
-      if( isDisplayed && ctx->IsDisplayed(myAIS) ) return;
-
-      ctx->Display(myAIS, Standard_False);
-      
-      if( ctx->IsDisplayed(myAIS) ) SetDisplayed(Standard_True); 
+    if ( aContext.IsNull() )
+      return;
+
+    if ( !myAIS.IsNull() )
+    {
+      if ( !(myAIS->GetContext()).IsNull() && (myAIS->GetContext()) != aContext )
+        myAIS->GetContext()->Remove(myAIS);
+
+      if ( IsDisplayed() && aContext->IsDisplayed(myAIS) )
+        return;
+
+      aContext->Display(myAIS, Standard_False);
+
+      if ( aContext->IsDisplayed(myAIS) )
+        SetDisplayed(Standard_True);
     }
   }
 }
@@ -960,37 +1031,51 @@ void TPrsStd_AISPresentation::AISDisplay ()
 //function : AISErase
 //purpose  : 
 //=======================================================================
+void TPrsStd_AISPresentation::AISErase(const Standard_Boolean theIsRemove)
+{
+  SetDisplayed(Standard_False);
+  Handle(AIS_InteractiveContext) aContext, anOwnContext;
 
-void TPrsStd_AISPresentation::AISErase (const Standard_Boolean remove)
-{   
-  SetDisplayed(Standard_False);  
-  Handle(AIS_InteractiveContext) ctx, ownctx;
-
-  if ( !myAIS.IsNull() ) {   
-    
-    if ( !Label().IsNull()) {  
+  if ( !myAIS.IsNull() )
+  {
+    if ( !Label().IsNull() )
+    {
       Handle(TPrsStd_AISViewer) viewer;
-      if( !TPrsStd_AISViewer::Find(Label(), viewer) ) return;  
-      ownctx = myAIS->GetContext();
-      ctx = viewer->GetInteractiveContext();
-      if( remove ) {
-       if( !ctx.IsNull() ) ctx->Remove (myAIS,Standard_False); 
-       if( !ownctx.IsNull() && ownctx != ctx ) ownctx->Remove (myAIS,Standard_False);
+      if( !TPrsStd_AISViewer::Find(Label(), viewer) )
+        return;
+      anOwnContext = myAIS->GetContext();
+      aContext = viewer->GetInteractiveContext();
+
+      if ( theIsRemove )
+      {
+        if ( !aContext.IsNull() )
+          aContext->Remove(myAIS, Standard_False);
+        if ( !anOwnContext.IsNull() && anOwnContext != aContext )
+          anOwnContext->Remove(myAIS, Standard_False);
+
         myAIS->SetToUpdate();
       }
-      else {
-       if( !ctx.IsNull() ) ctx->Erase (myAIS,Standard_False); 
-       if( !ownctx.IsNull() && ownctx != ctx ) ownctx->Erase (myAIS,Standard_False);
+      else
+      {
+        if ( !aContext.IsNull() )
+          aContext->Erase(myAIS, Standard_False);
+        if ( !anOwnContext.IsNull() && anOwnContext != aContext )
+          anOwnContext->Erase(myAIS, Standard_False);
       }
     }
-    else {
-     if( remove ) {
-      if( !ownctx.IsNull() ) {
-       ownctx->Remove (myAIS,Standard_False);
-       myAIS->SetToUpdate();
+    else
+    {
+      if ( theIsRemove )
+      {
+        if ( !anOwnContext.IsNull() )
+        {
+          anOwnContext->Remove(myAIS, Standard_False);
+          myAIS->SetToUpdate();
+        }
       }
-     } else
-      if( !ownctx.IsNull() ) ownctx->Erase (myAIS,Standard_False); 
+      else
+        if( !anOwnContext.IsNull() )
+          anOwnContext->Erase(myAIS, Standard_False);
     }
   }
 }
@@ -1007,12 +1092,24 @@ Handle(AIS_InteractiveObject) TPrsStd_AISPresentation::GetAIS() const
 
 
 //=======================================================================
-//function :SetDisplayed
+//function : getAISContext
 //purpose  : 
 //=======================================================================
-void TPrsStd_AISPresentation::SetDisplayed(const Standard_Boolean B) 
+Handle(AIS_InteractiveContext) TPrsStd_AISPresentation::getAISContext() const
 {
-  Backup();
-  isDisplayed = B;
+  Handle(TPrsStd_AISViewer) aViewer;
+  if ( TPrsStd_AISViewer::Find(Label(), aViewer) )
+    return aViewer->GetInteractiveContext();
+
+  return Handle_AIS_InteractiveContext();
 }
 
+
+//=======================================================================
+//function : getData
+//purpose  : 
+//=======================================================================
+Handle(TDataXtd_Presentation) TPrsStd_AISPresentation::getData() const
+{
+  return TDataXtd_Presentation::Set(this);
+}
index 5f2e9163c5dab1055f4f3cfb74b71a48ef243fff..9a92a3381bfc2fed74851b4848f7fe1f235153fe 100644 (file)
@@ -33,7 +33,7 @@ const Standard_GUID& TPrsStd_AISViewer::GetID ()
 //=======================================================================
 
 Handle(TPrsStd_AISViewer) TPrsStd_AISViewer::New (const TDF_Label& acces, 
-                                                 const Handle(V3d_Viewer)& viewer)
+                                                  const Handle(V3d_Viewer)& viewer)
 {   
   Handle(TPrsStd_AISViewer) V;
   if (acces.Root().FindAttribute(TPrsStd_AISViewer::GetID(),V)) { 
@@ -50,7 +50,7 @@ Handle(TPrsStd_AISViewer) TPrsStd_AISViewer::New (const TDF_Label& acces,
 //purpose  : 
 //=======================================================================
 Handle(TPrsStd_AISViewer) TPrsStd_AISViewer::New (const TDF_Label& acces, 
-                                                 const Handle(AIS_InteractiveContext)& IC) 
+                                                  const Handle(AIS_InteractiveContext)& IC) 
 {   
   Handle(TPrsStd_AISViewer) V;
   if (acces.Root().FindAttribute(TPrsStd_AISViewer::GetID(),V)) { 
@@ -67,7 +67,7 @@ Handle(TPrsStd_AISViewer) TPrsStd_AISViewer::New (const TDF_Label& acces,
 //purpose  : 
 //=======================================================================
 Standard_Boolean TPrsStd_AISViewer::Find (const TDF_Label& acces, 
-                                         Handle(TPrsStd_AISViewer)& V) 
+                                          Handle(TPrsStd_AISViewer)& V) 
 { 
   return (acces.Root().FindAttribute(TPrsStd_AISViewer::GetID(),V)); 
 }
@@ -77,7 +77,7 @@ Standard_Boolean TPrsStd_AISViewer::Find (const TDF_Label& acces,
 //purpose  : 
 //=======================================================================
 Standard_Boolean TPrsStd_AISViewer::Find (const TDF_Label& acces, 
-                                         Handle(AIS_InteractiveContext)& IC)
+                                          Handle(AIS_InteractiveContext)& IC)
 { 
   Handle(TPrsStd_AISViewer) V; 
   if (acces.Root().FindAttribute(TPrsStd_AISViewer::GetID(),V)) { 
@@ -93,7 +93,7 @@ Standard_Boolean TPrsStd_AISViewer::Find (const TDF_Label& acces,
 //=======================================================================
 
 Standard_Boolean TPrsStd_AISViewer::Find (const TDF_Label& acces, 
-                                         Handle(V3d_Viewer)& VIEW) 
+                                          Handle(V3d_Viewer)& VIEW) 
 { 
   Handle(TPrsStd_AISViewer) V;
   if (acces.Root().FindAttribute(TPrsStd_AISViewer::GetID(),V)) { 
@@ -139,9 +139,9 @@ TPrsStd_AISViewer::TPrsStd_AISViewer()
 
 void TPrsStd_AISViewer::Update () const
 {
-  myInteractiveContext->UpdateCurrentViewer();  
+  myInteractiveContext->UpdateCurrentViewer();
 }
+
 //=======================================================================
 //function : SetInteractiveContext
 //purpose  : 
@@ -196,7 +196,7 @@ Handle(TDF_Attribute) TPrsStd_AISViewer::NewEmpty() const
 //=======================================================================
 
 void TPrsStd_AISViewer::Paste (const Handle(TDF_Attribute)&,
-                            const Handle(TDF_RelocationTable)&) const
+                               const Handle(TDF_RelocationTable)&) const
 {
 }
 
index 27e94e64b0e3b83a75168d2c504c3b2ce07b89a9..dda6a176e15587e2f23a411043c6bf3f6f74bfd3 100644 (file)
@@ -23,7 +23,6 @@
 #include <XmlMDataXtd.hxx>
 #include <XmlMDocStd.hxx>
 #include <XmlMNaming.hxx>
-#include <XmlMPrsStd.hxx>
 #include <XmlMFunction.hxx>
 
 #include <Standard_GUID.hxx>
@@ -82,7 +81,6 @@ Handle(XmlMDF_ADriverTable) XmlDrivers::AttributeDrivers
   XmlMNaming    ::AddDrivers (aTable, theMessageDriver);
   XmlMFunction  ::AddDrivers (aTable, theMessageDriver); 
   XmlMDocStd    ::AddDrivers (aTable, theMessageDriver); 
-  XmlMPrsStd    ::AddDrivers (aTable, theMessageDriver); 
   //
   return aTable;
 }
index c99ba2d3d311664ceee06b5a3fd094dd4678f1dc..f4e0253d357033ddfa6683afe6b9d55d2f4bda15 100644 (file)
@@ -40,6 +40,10 @@ is
         class PlacementDriver;
         
         class PatternStdDriver;
+
+        class PresentationDriver;
+
+        class PositionDriver;
         
 
     AddDrivers (aDriverTable : ADriverTable  from XmlMDF;
index b8fc213ce31026ca9ea2ae79e5dbcc196804db03..1d0f959b57fc4d5c7c78a26828d475daec18ca60 100644 (file)
@@ -25,6 +25,8 @@
 #include <XmlMDataXtd_ConstraintDriver.hxx>
 #include <XmlMDataXtd_PlacementDriver.hxx>
 #include <XmlMDataXtd_PatternStdDriver.hxx>
+#include <XmlMDataXtd_PositionDriver.hxx>
+#include <XmlMDataXtd_PresentationDriver.hxx>
 
 static Standard_Integer myDocumentVersion = -1;
 //=======================================================================
@@ -34,14 +36,16 @@ static Standard_Integer myDocumentVersion = -1;
 void XmlMDataXtd::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable,
                               const Handle(CDM_MessageDriver)&   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_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_PositionDriver      (anMsgDrv)); 
+  aDriverTable->AddDriver(new XmlMDataXtd_PresentationDriver  (anMsgDrv));
 }
 
 //=======================================================================
diff --git a/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cdl b/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cdl
new file mode 100644 (file)
index 0000000..34701f2
--- /dev/null
@@ -0,0 +1,42 @@
+-- Created on: 2001-09-04
+-- Created by: Julia DOROVSKIKH
+-- Copyright (c) 2001-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+class PositionDriver from XmlMDataXtd  inherits ADriver from XmlMDF
+
+        ---Purpose: Attribute Driver.
+
+uses
+    SRelocationTable from XmlObjMgt,
+    RRelocationTable from XmlObjMgt,
+    Persistent       from XmlObjMgt,
+    MessageDriver    from CDM,
+    Attribute        from TDF
+
+is
+    Create (theMessageDriver:MessageDriver from CDM)
+        returns PositionDriver from XmlMDataXtd;
+
+    NewEmpty (me)  returns Attribute from TDF;
+
+    Paste(me; Source     : Persistent from XmlObjMgt;
+              Target     : Attribute from TDF;
+              RelocTable : out RRelocationTable from XmlObjMgt)
+        returns Boolean from Standard;
+
+    Paste(me; Source     : Attribute from TDF;
+              Target     : in out Persistent from XmlObjMgt;
+              RelocTable : out SRelocationTable from XmlObjMgt);
+
+end PositionDriver;
diff --git a/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx b/src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx
new file mode 100644 (file)
index 0000000..7403efc
--- /dev/null
@@ -0,0 +1,123 @@
+// Created on: 2001-09-04
+// Created by: Julia DOROVSKIKH
+// Copyright (c) 2001-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <XmlMDataXtd_PositionDriver.ixx>
+
+#include <XmlObjMgt.hxx>
+#include <TDataXtd_Position.hxx>
+#include <gp_XYZ.hxx>
+
+#include <stdio.h>
+
+//=======================================================================
+//function : XmlMDataXtd_PositionDriver
+//purpose  : Constructor
+//=======================================================================
+XmlMDataXtd_PositionDriver::XmlMDataXtd_PositionDriver
+                        (const Handle(CDM_MessageDriver)& theMsgDriver)
+: XmlMDF_ADriver (theMsgDriver, NULL)
+{}
+
+//=======================================================================
+//function : NewEmpty
+//purpose  : 
+//=======================================================================
+Handle(TDF_Attribute) XmlMDataXtd_PositionDriver::NewEmpty() const
+{
+  return (new TDataXtd_Position());
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : persistent -> transient (retrieve)
+//=======================================================================
+Standard_Boolean XmlMDataXtd_PositionDriver::Paste
+                (const XmlObjMgt_Persistent&  theSource,
+                 const Handle(TDF_Attribute)& theTarget,
+                 XmlObjMgt_RRelocationTable&  ) const
+{
+  Handle(TDataXtd_Position) aTPos = Handle(TDataXtd_Position)::DownCast(theTarget);
+
+  // position
+  XmlObjMgt_DOMString aPosStr = XmlObjMgt::GetStringValue(theSource.Element());
+  if (aPosStr == NULL)
+  {
+    WriteMessage ("Cannot retrieve position string from element");
+    return Standard_False;
+  }
+
+  gp_Pnt aPos;
+  Standard_Real aValue;
+  Standard_CString aValueStr = Standard_CString(aPosStr.GetString());
+
+  // X
+  if (!XmlObjMgt::GetReal(aValueStr, aValue))
+  {
+    TCollection_ExtendedString aMessageString =
+      TCollection_ExtendedString
+        ("Cannot retrieve X coordinate for TDataXtd_Position attribute as \"")
+          + aValueStr + "\"";
+    WriteMessage (aMessageString);
+    return Standard_False;
+  }
+  aPos.SetX(aValue);
+
+  // Y
+  if (!XmlObjMgt::GetReal(aValueStr, aValue))
+  {
+    TCollection_ExtendedString aMessageString =
+      TCollection_ExtendedString
+        ("Cannot retrieve Y coordinate for TDataXtd_Position attribute as \"")
+          + aValueStr + "\"";
+    WriteMessage (aMessageString);
+    return Standard_False;
+  }
+  aPos.SetY(aValue);
+
+  // Z
+  if (!XmlObjMgt::GetReal(aValueStr, aValue))
+  {
+    TCollection_ExtendedString aMessageString =
+      TCollection_ExtendedString
+        ("Cannot retrieve Z coordinate for TDataXtd_Position attribute as \"")
+          + aValueStr + "\"";
+    WriteMessage (aMessageString);
+    return Standard_False;
+  }
+  aPos.SetZ(aValue);
+
+  aTPos->SetPosition(aPos);
+
+  return Standard_True;
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : transient -> persistent (store)
+//=======================================================================
+void XmlMDataXtd_PositionDriver::Paste
+                (const Handle(TDF_Attribute)& theSource,
+                 XmlObjMgt_Persistent&        theTarget,
+                 XmlObjMgt_SRelocationTable&  ) const
+{
+  Handle(TDataXtd_Position) aTPos = Handle(TDataXtd_Position)::DownCast(theSource);
+  if (!aTPos.IsNull())
+  {
+    gp_Pnt aPos = aTPos->GetPosition();
+    char buf [64];
+    Sprintf (buf, "%.17g %.17g %.17g", aPos.X(), aPos.Y(), aPos.Z());
+    XmlObjMgt::SetStringValue(theTarget.Element(), buf);
+  }
+}
diff --git a/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cdl b/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cdl
new file mode 100644 (file)
index 0000000..b39195e
--- /dev/null
@@ -0,0 +1,42 @@
+-- Created on: 2001-09-04
+-- Created by: Julia DOROVSKIKH
+-- Copyright (c) 2001-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+class PresentationDriver from XmlMDataXtd  inherits ADriver from XmlMDF
+
+        ---Purpose: Attribute Driver.
+
+uses
+    SRelocationTable from XmlObjMgt,
+    RRelocationTable from XmlObjMgt,
+    Persistent       from XmlObjMgt,
+    MessageDriver    from CDM,
+    Attribute        from TDF
+
+is
+    Create (theMessageDriver:MessageDriver from CDM)
+        returns PresentationDriver from XmlMDataXtd;
+
+    NewEmpty (me)  returns Attribute from TDF;
+
+    Paste(me; Source     : Persistent from XmlObjMgt;
+              Target     : Attribute from TDF;
+              RelocTable : out RRelocationTable from XmlObjMgt)
+        returns Boolean from Standard;
+
+    Paste(me; Source     : Attribute from TDF;
+              Target     : in out Persistent from XmlObjMgt;
+              RelocTable : out SRelocationTable from XmlObjMgt);
+
+end PresentationDriver;
diff --git a/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cxx b/src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cxx
new file mode 100644 (file)
index 0000000..a20b36d
--- /dev/null
@@ -0,0 +1,239 @@
+// Created on: 2001-09-04
+// Created by: Julia DOROVSKIKH
+// Copyright (c) 2001-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <XmlMDataXtd_PresentationDriver.ixx>
+
+#include <XmlObjMgt.hxx>
+
+#include <TDataXtd_Presentation.hxx>
+
+IMPLEMENT_DOMSTRING (GuidString,        "guid")
+IMPLEMENT_DOMSTRING (IsDisplayedString, "isdisplayed")
+IMPLEMENT_DOMSTRING (ColorString,       "color")
+IMPLEMENT_DOMSTRING (MaterialString,    "material")
+IMPLEMENT_DOMSTRING (TransparencyString,"transparency")
+IMPLEMENT_DOMSTRING (WidthString,       "width")
+IMPLEMENT_DOMSTRING (ModeString,        "mode")
+
+IMPLEMENT_DOMSTRING (DisplayedString,   "true")
+
+//=======================================================================
+//function : XmlMDataXtd_PresentationDriver
+//purpose  : Constructor
+//=======================================================================
+XmlMDataXtd_PresentationDriver::XmlMDataXtd_PresentationDriver
+  (const Handle(CDM_MessageDriver)& theMsgDriver)
+  : XmlMDF_ADriver (theMsgDriver, NULL)
+{}
+
+//=======================================================================
+//function : NewEmpty
+//purpose  : 
+//=======================================================================
+Handle(TDF_Attribute) XmlMDataXtd_PresentationDriver::NewEmpty() const
+{
+  return (new TDataXtd_Presentation());
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : persistent -> transient (retrieve)
+//=======================================================================
+Standard_Boolean XmlMDataXtd_PresentationDriver::Paste
+  (const XmlObjMgt_Persistent&  theSource,
+  const Handle(TDF_Attribute)& theTarget,
+  XmlObjMgt_RRelocationTable&  ) const
+{
+  TCollection_ExtendedString aMessageString;
+  XmlObjMgt_DOMString aDOMStr;
+
+  Handle(TDataXtd_Presentation) aTPrs =
+    Handle(TDataXtd_Presentation)::DownCast(theTarget);
+  const XmlObjMgt_Element& anElem = theSource;
+
+  //convert attribute value into GUID
+  aDOMStr = anElem.getAttribute(::GuidString());
+  if (aDOMStr == NULL)
+  {
+    WriteMessage("Cannot retrieve guid string from attribute");
+    return Standard_False;
+  }
+  Standard_CString aGuidStr = (Standard_CString) aDOMStr.GetString();
+  aTPrs->SetDriverGUID(aGuidStr);
+
+  // is displayed
+  aDOMStr = anElem.getAttribute(::IsDisplayedString());
+  aTPrs->SetDisplayed(aDOMStr != NULL);
+
+  Standard_Integer anIValue;
+
+  // color
+  aDOMStr = anElem.getAttribute(::ColorString());
+  if (aDOMStr != NULL)
+  {
+    if (!aDOMStr.GetInteger(anIValue))
+    {
+      aMessageString = TCollection_ExtendedString
+        ("Cannot retrieve Integer value from \"") + aDOMStr + "\"";
+      WriteMessage (aMessageString);
+      return Standard_False;
+    }
+    aTPrs->SetColor(anIValue);
+  }
+  else
+  {
+    aTPrs->UnsetColor();
+  }
+
+  // material
+  aDOMStr = anElem.getAttribute(::MaterialString());
+  if (aDOMStr != NULL)
+  {
+    if (!aDOMStr.GetInteger(anIValue))
+    {
+      aMessageString = TCollection_ExtendedString
+        ("Cannot retrieve Integer value from \"") + aDOMStr + "\"";
+      WriteMessage (aMessageString);
+      return Standard_False;
+    }
+    aTPrs->SetMaterial(anIValue);
+  }
+  else
+  {
+    aTPrs->UnsetMaterial();
+  }
+
+  Standard_Real aValue;
+
+  // transparency
+  aDOMStr = anElem.getAttribute(::TransparencyString());
+  if (aDOMStr != NULL)
+  {
+    if (!XmlObjMgt::GetReal(aDOMStr, aValue))
+    {
+      aMessageString = TCollection_ExtendedString
+        ("Cannot retrieve Real value from \"") + aDOMStr + "\"";
+      WriteMessage (aMessageString);
+      return Standard_False;
+    }
+    aTPrs->SetTransparency(aValue);
+  }
+  else
+  {
+    aTPrs->UnsetTransparency();
+  }
+
+  // width
+  aDOMStr = anElem.getAttribute(::WidthString());
+  if (aDOMStr != NULL)
+  {
+    if (!XmlObjMgt::GetReal(aDOMStr, aValue))
+    {
+      aMessageString = TCollection_ExtendedString
+        ("Cannot retrieve Real value from \"") + aDOMStr + "\"";
+      WriteMessage (aMessageString);
+      return Standard_False;
+    }
+    aTPrs->SetWidth(aValue);
+  }
+  else
+  {
+    aTPrs->UnsetWidth();
+  }
+
+  // mode
+  aDOMStr = anElem.getAttribute(::ModeString());
+  if (aDOMStr != NULL)
+  {
+    if (!aDOMStr.GetInteger(anIValue))
+    {
+      aMessageString = TCollection_ExtendedString
+        ("Cannot retrieve Integer value from \"") + aDOMStr + "\"";
+      WriteMessage (aMessageString);
+      return Standard_False;
+    }
+    aTPrs->SetMode(anIValue);
+  }
+  else
+  {
+    aTPrs->UnsetMode();
+  }
+
+  return Standard_True;
+}
+
+//=======================================================================
+//function : Paste
+//purpose  : transient -> persistent (store)
+//=======================================================================
+void XmlMDataXtd_PresentationDriver::Paste
+                                  (const Handle(TDF_Attribute)& theSource,
+                                   XmlObjMgt_Persistent&        theTarget,
+                                   XmlObjMgt_SRelocationTable&) const
+{
+  Handle(TDataXtd_Presentation) aTPrs =
+    Handle(TDataXtd_Presentation)::DownCast(theSource);
+  if (aTPrs.IsNull()) return;
+
+  //convert GUID into attribute value
+  Standard_Character aGuidStr [40];
+  Standard_PCharacter pGuidStr;
+  pGuidStr=aGuidStr;
+  aTPrs->GetDriverGUID().ToCString (pGuidStr);
+  theTarget.Element().setAttribute(::GuidString(), aGuidStr);
+
+  // is displayed
+  if (aTPrs->IsDisplayed())
+    theTarget.Element().setAttribute(::IsDisplayedString(), ::DisplayedString());
+
+  Standard_Integer aNb;
+
+  // color
+  if (aTPrs->IsHasOwnColor())
+  {
+    aNb = aTPrs->Color();
+    theTarget.Element().setAttribute(::ColorString(), aNb);
+  }
+
+  // material
+  if (aTPrs->IsHasOwnMaterial())
+  {
+    aNb = (Standard_Integer)(aTPrs->Material());
+    theTarget.Element().setAttribute(::MaterialString(), aNb);
+  }
+
+  // transparency
+  if (aTPrs->IsHasOwnTransparency())
+  {
+    TCollection_AsciiString aRNbStr (aTPrs->Transparency());
+    theTarget.Element().setAttribute(::TransparencyString(), aRNbStr.ToCString());
+  }
+
+  // width
+  if (aTPrs->IsHasOwnWidth())
+  {
+    TCollection_AsciiString aRNbStr (aTPrs->Width());
+    theTarget.Element().setAttribute(::WidthString(), aRNbStr.ToCString());
+  }
+
+#ifdef OCC6010
+  // mode
+  if (aTPrs->IsHasOwnMode())
+  {
+    aNb = aTPrs->Mode();
+    theTarget.Element().setAttribute(::ModeString(), aNb);
+  }
+#endif
+}
diff --git a/src/XmlMPrsStd/XmlMPrsStd.cdl b/src/XmlMPrsStd/XmlMPrsStd.cdl
deleted file mode 100644 (file)
index 667308b..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
--- Created on: 2001-07-09
--- Created by: Julia DOROVSKIKH
--- Copyright (c) 2001-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-package XmlMPrsStd
-
-
-uses
-    TDF,
-    CDM,
-    XmlMDF,
-    XmlObjMgt
-
-is
-    ---Category: Classes
-    --           =============================================================
-
-    class PositionDriver;
-
-    class AISPresentationDriver;
-
-    AddDrivers (aDriverTable    : ADriverTable  from XmlMDF;
-                theMessageDriver: MessageDriver from CDM);
-        ---Purpose: Adds the attribute storage drivers to <aDriverTable>.
-
-end XmlMPrsStd;
diff --git a/src/XmlMPrsStd/XmlMPrsStd.cxx b/src/XmlMPrsStd/XmlMPrsStd.cxx
deleted file mode 100644 (file)
index 9989ab3..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// Created on: 2001-07-09
-// Created by: Julia DOROVSKIKH
-// Copyright (c) 2001-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <XmlMPrsStd.ixx>
-
-#include <XmlMPrsStd_PositionDriver.hxx>
-#include <XmlMPrsStd_AISPresentationDriver.hxx>
-
-///=======================================================================
-//function : AddDrivers
-//purpose  : 
-//=======================================================================
-void XmlMPrsStd::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable,
-                             const Handle(CDM_MessageDriver)&   aMessageDriver)
-{
-  aDriverTable->AddDriver(new XmlMPrsStd_PositionDriver(aMessageDriver)); 
-  aDriverTable->AddDriver(new XmlMPrsStd_AISPresentationDriver(aMessageDriver));
-}
diff --git a/src/XmlMPrsStd/XmlMPrsStd_AISPresentationDriver.cdl b/src/XmlMPrsStd/XmlMPrsStd_AISPresentationDriver.cdl
deleted file mode 100644 (file)
index 540ec13..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
--- Created on: 2001-09-04
--- Created by: Julia DOROVSKIKH
--- Copyright (c) 2001-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-class AISPresentationDriver from XmlMPrsStd  inherits ADriver from XmlMDF
-
-        ---Purpose: Attribute Driver.
-
-uses
-    SRelocationTable from XmlObjMgt,
-    RRelocationTable from XmlObjMgt,
-    Persistent       from XmlObjMgt,
-    MessageDriver    from CDM,
-    Attribute        from TDF
-
-is
-    Create (theMessageDriver:MessageDriver from CDM)
-        returns AISPresentationDriver from XmlMPrsStd;
-
-    NewEmpty (me)  returns Attribute from TDF;
-
-    Paste(me; Source     : Persistent from XmlObjMgt;
-              Target     : Attribute from TDF;
-              RelocTable : out RRelocationTable from XmlObjMgt)
-        returns Boolean from Standard;
-
-    Paste(me; Source     : Attribute from TDF;
-              Target     : in out Persistent from XmlObjMgt;
-              RelocTable : out SRelocationTable from XmlObjMgt);
-
-end AISPresentationDriver;
diff --git a/src/XmlMPrsStd/XmlMPrsStd_AISPresentationDriver.cxx b/src/XmlMPrsStd/XmlMPrsStd_AISPresentationDriver.cxx
deleted file mode 100644 (file)
index 93f4685..0000000
+++ /dev/null
@@ -1,239 +0,0 @@
-// Created on: 2001-09-04
-// Created by: Julia DOROVSKIKH
-// Copyright (c) 2001-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <XmlMPrsStd_AISPresentationDriver.ixx>
-
-#include <XmlObjMgt.hxx>
-
-#include <TPrsStd_AISPresentation.hxx>
-
-IMPLEMENT_DOMSTRING (GuidString,        "guid")
-IMPLEMENT_DOMSTRING (IsDisplayedString, "isdisplayed")
-IMPLEMENT_DOMSTRING (ColorString,       "color")
-IMPLEMENT_DOMSTRING (MaterialString,    "material")
-IMPLEMENT_DOMSTRING (TransparencyString,"transparency")
-IMPLEMENT_DOMSTRING (WidthString,       "width")
-IMPLEMENT_DOMSTRING (ModeString,        "mode")
-
-IMPLEMENT_DOMSTRING (DisplayedString,   "true")
-
-//=======================================================================
-//function : XmlMPrsStd_AISPresentationDriver
-//purpose  : Constructor
-//=======================================================================
-XmlMPrsStd_AISPresentationDriver::XmlMPrsStd_AISPresentationDriver
-                        (const Handle(CDM_MessageDriver)& theMsgDriver)
-      : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose  : 
-//=======================================================================
-Handle(TDF_Attribute) XmlMPrsStd_AISPresentationDriver::NewEmpty() const
-{
-  return (new TPrsStd_AISPresentation());
-}
-
-//=======================================================================
-//function : Paste
-//purpose  : persistent -> transient (retrieve)
-//=======================================================================
-Standard_Boolean XmlMPrsStd_AISPresentationDriver::Paste
-                                (const XmlObjMgt_Persistent&  theSource,
-                                 const Handle(TDF_Attribute)& theTarget,
-                                 XmlObjMgt_RRelocationTable&  ) const
-{
-  TCollection_ExtendedString aMessageString;
-  XmlObjMgt_DOMString aDOMStr;
-
-  Handle(TPrsStd_AISPresentation) aTPrs =
-    Handle(TPrsStd_AISPresentation)::DownCast(theTarget);
-  const XmlObjMgt_Element& anElem = theSource;
-
-  //convert attribute value into GUID
-  aDOMStr = anElem.getAttribute(::GuidString());
-  if (aDOMStr == NULL)
-  {
-    WriteMessage("Cannot retrieve guid string from attribute");
-    return Standard_False;
-  }
-  Standard_CString aGuidStr = (Standard_CString) aDOMStr.GetString();
-  aTPrs->SetDriverGUID(aGuidStr);
-
-  // is displayed
-  aDOMStr = anElem.getAttribute(::IsDisplayedString());
-  aTPrs->SetDisplayed(aDOMStr != NULL);
-
-  Standard_Integer anIValue;
-
-  // color
-  aDOMStr = anElem.getAttribute(::ColorString());
-  if (aDOMStr != NULL)
-  {
-    if (!aDOMStr.GetInteger(anIValue))
-    {
-      aMessageString = TCollection_ExtendedString
-        ("Cannot retrieve Integer value from \"") + aDOMStr + "\"";
-      WriteMessage (aMessageString);
-      return Standard_False;
-    }
-    aTPrs->SetColor((Quantity_NameOfColor)anIValue);
-  }
-  else
-  {
-    aTPrs->UnsetColor();
-  }
-
-  // material
-  aDOMStr = anElem.getAttribute(::MaterialString());
-  if (aDOMStr != NULL)
-  {
-    if (!aDOMStr.GetInteger(anIValue))
-    {
-      aMessageString = TCollection_ExtendedString
-        ("Cannot retrieve Integer value from \"") + aDOMStr + "\"";
-      WriteMessage (aMessageString);
-      return Standard_False;
-    }
-    aTPrs->SetMaterial((Graphic3d_NameOfMaterial)anIValue);
-  }
-  else
-  {
-    aTPrs->UnsetMaterial();
-  }
-
-  Standard_Real aValue;
-
-  // transparency
-  aDOMStr = anElem.getAttribute(::TransparencyString());
-  if (aDOMStr != NULL)
-  {
-    if (!XmlObjMgt::GetReal(aDOMStr, aValue))
-    {
-      aMessageString = TCollection_ExtendedString
-        ("Cannot retrieve Real value from \"") + aDOMStr + "\"";
-      WriteMessage (aMessageString);
-      return Standard_False;
-    }
-    aTPrs->SetTransparency(aValue);
-  }
-  else
-  {
-    aTPrs->UnsetTransparency();
-  }
-
-  // width
-  aDOMStr = anElem.getAttribute(::WidthString());
-  if (aDOMStr != NULL)
-  {
-    if (!XmlObjMgt::GetReal(aDOMStr, aValue))
-    {
-      aMessageString = TCollection_ExtendedString
-        ("Cannot retrieve Real value from \"") + aDOMStr + "\"";
-      WriteMessage (aMessageString);
-      return Standard_False;
-    }
-    aTPrs->SetWidth(aValue);
-  }
-  else
-  {
-    aTPrs->UnsetWidth();
-  }
-
-  // mode
-  aDOMStr = anElem.getAttribute(::ModeString());
-  if (aDOMStr != NULL)
-  {
-    if (!aDOMStr.GetInteger(anIValue))
-    {
-      aMessageString = TCollection_ExtendedString
-        ("Cannot retrieve Integer value from \"") + aDOMStr + "\"";
-      WriteMessage (aMessageString);
-      return Standard_False;
-    }
-    aTPrs->SetMode(anIValue);
-  }
-  else
-  {
-    aTPrs->UnsetMode();
-  }
-
-  return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose  : transient -> persistent (store)
-//=======================================================================
-void XmlMPrsStd_AISPresentationDriver::Paste
-                                        (const Handle(TDF_Attribute)& theSource,
-                                         XmlObjMgt_Persistent&        theTarget,
-                                         XmlObjMgt_SRelocationTable&  ) const
-{
-  Handle(TPrsStd_AISPresentation) aTPrs =
-    Handle(TPrsStd_AISPresentation)::DownCast(theSource);
-  if (aTPrs.IsNull()) return;
-
-  //convert GUID into attribute value
-  Standard_Character aGuidStr [40];
-  Standard_PCharacter pGuidStr;
-  pGuidStr=aGuidStr;
-  aTPrs->GetDriverGUID().ToCString (pGuidStr);
-  theTarget.Element().setAttribute(::GuidString(), aGuidStr);
-
-  // is displayed
-  if (aTPrs->IsDisplayed())
-    theTarget.Element().setAttribute(::IsDisplayedString(), ::DisplayedString());
-
-  Standard_Integer aNb;
-
-  // color
-  if (aTPrs->HasOwnColor())
-  {
-    aNb = (Standard_Integer)(aTPrs->Color());
-    theTarget.Element().setAttribute(::ColorString(), aNb);
-  }
-
-  // material
-  if (aTPrs->HasOwnMaterial())
-  {
-    aNb = (Standard_Integer)(aTPrs->Material());
-    theTarget.Element().setAttribute(::MaterialString(), aNb);
-  }
-
-  // transparency
-  if (aTPrs->HasOwnTransparency())
-  {
-    TCollection_AsciiString aRNbStr (aTPrs->Transparency());
-    theTarget.Element().setAttribute(::TransparencyString(), aRNbStr.ToCString());
-  }
-
-  // width
-  if (aTPrs->HasOwnWidth())
-  {
-    TCollection_AsciiString aRNbStr (aTPrs->Width());
-    theTarget.Element().setAttribute(::WidthString(), aRNbStr.ToCString());
-  }
-
-#ifdef OCC6010
-  // mode
-  if (aTPrs->HasOwnMode())
-  {
-    aNb = aTPrs->Mode();
-    theTarget.Element().setAttribute(::ModeString(), aNb);
-  }
-#endif
-}
diff --git a/src/XmlMPrsStd/XmlMPrsStd_PositionDriver.cdl b/src/XmlMPrsStd/XmlMPrsStd_PositionDriver.cdl
deleted file mode 100644 (file)
index ad3d76c..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
--- Created on: 2001-09-04
--- Created by: Julia DOROVSKIKH
--- Copyright (c) 2001-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-class PositionDriver from XmlMPrsStd  inherits ADriver from XmlMDF
-
-        ---Purpose: Attribute Driver.
-
-uses
-    SRelocationTable from XmlObjMgt,
-    RRelocationTable from XmlObjMgt,
-    Persistent       from XmlObjMgt,
-    MessageDriver    from CDM,
-    Attribute        from TDF
-
-is
-    Create (theMessageDriver:MessageDriver from CDM)
-        returns PositionDriver from XmlMPrsStd;
-
-    NewEmpty (me)  returns Attribute from TDF;
-
-    Paste(me; Source     : Persistent from XmlObjMgt;
-              Target     : Attribute from TDF;
-              RelocTable : out RRelocationTable from XmlObjMgt)
-        returns Boolean from Standard;
-
-    Paste(me; Source     : Attribute from TDF;
-              Target     : in out Persistent from XmlObjMgt;
-              RelocTable : out SRelocationTable from XmlObjMgt);
-
-end PositionDriver;
diff --git a/src/XmlMPrsStd/XmlMPrsStd_PositionDriver.cxx b/src/XmlMPrsStd/XmlMPrsStd_PositionDriver.cxx
deleted file mode 100644 (file)
index bf575b5..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-// Created on: 2001-09-04
-// Created by: Julia DOROVSKIKH
-// Copyright (c) 2001-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <XmlMPrsStd_PositionDriver.ixx>
-
-#include <XmlObjMgt.hxx>
-#include <TDataXtd_Position.hxx>
-#include <gp_XYZ.hxx>
-
-#include <stdio.h>
-
-//=======================================================================
-//function : XmlMPrsStd_PositionDriver
-//purpose  : Constructor
-//=======================================================================
-XmlMPrsStd_PositionDriver::XmlMPrsStd_PositionDriver
-                        (const Handle(CDM_MessageDriver)& theMsgDriver)
-      : XmlMDF_ADriver (theMsgDriver, NULL)
-{}
-
-//=======================================================================
-//function : NewEmpty
-//purpose  : 
-//=======================================================================
-Handle(TDF_Attribute) XmlMPrsStd_PositionDriver::NewEmpty() const
-{
-  return (new TDataXtd_Position());
-}
-
-//=======================================================================
-//function : Paste
-//purpose  : persistent -> transient (retrieve)
-//=======================================================================
-Standard_Boolean XmlMPrsStd_PositionDriver::Paste
-                (const XmlObjMgt_Persistent&  theSource,
-                 const Handle(TDF_Attribute)& theTarget,
-                 XmlObjMgt_RRelocationTable&  ) const
-{
-  Handle(TDataXtd_Position) aTPos = Handle(TDataXtd_Position)::DownCast(theTarget);
-
-  // position
-  XmlObjMgt_DOMString aPosStr = XmlObjMgt::GetStringValue(theSource.Element());
-  if (aPosStr == NULL)
-  {
-    WriteMessage ("Cannot retrieve position string from element");
-    return Standard_False;
-  }
-
-  gp_Pnt aPos;
-  Standard_Real aValue;
-  Standard_CString aValueStr = Standard_CString(aPosStr.GetString());
-
-  // X
-  if (!XmlObjMgt::GetReal(aValueStr, aValue))
-  {
-    TCollection_ExtendedString aMessageString =
-      TCollection_ExtendedString
-        ("Cannot retrieve X coordinate for TDataXtd_Position attribute as \"")
-          + aValueStr + "\"";
-    WriteMessage (aMessageString);
-    return Standard_False;
-  }
-  aPos.SetX(aValue);
-
-  // Y
-  if (!XmlObjMgt::GetReal(aValueStr, aValue))
-  {
-    TCollection_ExtendedString aMessageString =
-      TCollection_ExtendedString
-        ("Cannot retrieve Y coordinate for TDataXtd_Position attribute as \"")
-          + aValueStr + "\"";
-    WriteMessage (aMessageString);
-    return Standard_False;
-  }
-  aPos.SetY(aValue);
-
-  // Z
-  if (!XmlObjMgt::GetReal(aValueStr, aValue))
-  {
-    TCollection_ExtendedString aMessageString =
-      TCollection_ExtendedString
-        ("Cannot retrieve Z coordinate for TDataXtd_Position attribute as \"")
-          + aValueStr + "\"";
-    WriteMessage (aMessageString);
-    return Standard_False;
-  }
-  aPos.SetZ(aValue);
-
-  aTPos->SetPosition(aPos);
-
-  return Standard_True;
-}
-
-//=======================================================================
-//function : Paste
-//purpose  : transient -> persistent (store)
-//=======================================================================
-void XmlMPrsStd_PositionDriver::Paste
-                (const Handle(TDF_Attribute)& theSource,
-                 XmlObjMgt_Persistent&        theTarget,
-                 XmlObjMgt_SRelocationTable&  ) const
-{
-  Handle(TDataXtd_Position) aTPos = Handle(TDataXtd_Position)::DownCast(theSource);
-  if (!aTPos.IsNull())
-  {
-    gp_Pnt aPos = aTPos->GetPosition();
-    char buf [64];
-    Sprintf (buf, "%.17g %.17g %.17g", aPos.X(), aPos.Y(), aPos.Z());
-    XmlObjMgt::SetStringValue(theTarget.Element(), buf);
-  }
-}