mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-08 14:17:06 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
46
src/BinMDataXtd/BinMDataXtd.cdl
Executable file
46
src/BinMDataXtd/BinMDataXtd.cdl
Executable file
@@ -0,0 +1,46 @@
|
||||
-- File: BinMDataXtd.cdl
|
||||
-- Created: Wed Oct 30 14:49:06 2002
|
||||
-- Author: Michael SAZONOV
|
||||
-- <msv@novgorox.nnov.matra-dtv.fr>
|
||||
-- modified Sergey Zaritchny
|
||||
---Copyright: Matra Datavision 2002
|
||||
|
||||
package BinMDataXtd
|
||||
|
||||
---Purpose: Storage and Retrieval drivers for modelling attributes.
|
||||
|
||||
uses BinMDF,
|
||||
BinObjMgt,
|
||||
TDF,
|
||||
CDM
|
||||
|
||||
is
|
||||
---Purpose: Storage/Retrieval drivers for TDataXtd attributes
|
||||
-- =======================================
|
||||
|
||||
class PointDriver;
|
||||
|
||||
class AxisDriver;
|
||||
|
||||
class PlaneDriver;
|
||||
|
||||
class GeometryDriver;
|
||||
|
||||
class ConstraintDriver;
|
||||
|
||||
class PlacementDriver;
|
||||
|
||||
class PatternStdDriver;
|
||||
|
||||
class ShapeDriver;
|
||||
|
||||
|
||||
AddDrivers (theDriverTable : ADriverTable from BinMDF;
|
||||
aMsgDrv : MessageDriver from CDM);
|
||||
---Purpose: Adds the attribute drivers to <theDriverTable>.
|
||||
|
||||
SetDocumentVersion (DocVersion : Integer from Standard);
|
||||
|
||||
DocumentVersion returns Integer from Standard;
|
||||
|
||||
end BinMDataXtd;
|
52
src/BinMDataXtd/BinMDataXtd.cxx
Executable file
52
src/BinMDataXtd/BinMDataXtd.cxx
Executable file
@@ -0,0 +1,52 @@
|
||||
// File: BinMDataXtd.cxx
|
||||
// Created: 30.10.02 15:16:19
|
||||
// Author: Michael SAZONOV
|
||||
// modified 13.04.2009 Sergey Zaritchny
|
||||
// Copyright: Open CASCADE 2002
|
||||
|
||||
#include <BinMDataXtd.ixx>
|
||||
#include <BinMDataXtd_ConstraintDriver.hxx>
|
||||
#include <BinMDataXtd_GeometryDriver.hxx>
|
||||
#include <BinMDataXtd_PatternStdDriver.hxx>
|
||||
#include <BinMDataXtd_ShapeDriver.hxx>
|
||||
#include <BinMDataXtd_PointDriver.hxx>
|
||||
#include <BinMDataXtd_AxisDriver.hxx>
|
||||
#include <BinMDataXtd_PlaneDriver.hxx>
|
||||
#include <BinMDataXtd_PlacementDriver.hxx>
|
||||
|
||||
static Standard_Integer myDocumentVersion = -1;
|
||||
//=======================================================================
|
||||
//function : AddDrivers
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
void BinMDataXtd::AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable,
|
||||
const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
{
|
||||
theDriverTable->AddDriver (new BinMDataXtd_ConstraintDriver (theMsgDriver) );
|
||||
theDriverTable->AddDriver (new BinMDataXtd_GeometryDriver (theMsgDriver) );
|
||||
theDriverTable->AddDriver (new BinMDataXtd_PatternStdDriver (theMsgDriver) );
|
||||
theDriverTable->AddDriver (new BinMDataXtd_ShapeDriver (theMsgDriver) );
|
||||
theDriverTable->AddDriver (new BinMDataXtd_PointDriver (theMsgDriver) );
|
||||
theDriverTable->AddDriver (new BinMDataXtd_AxisDriver (theMsgDriver) );
|
||||
theDriverTable->AddDriver (new BinMDataXtd_PlaneDriver (theMsgDriver) );
|
||||
theDriverTable->AddDriver (new BinMDataXtd_PlacementDriver (theMsgDriver) );
|
||||
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetDocumentVersion
|
||||
//purpose : Sets current document version
|
||||
//=======================================================================
|
||||
void BinMDataXtd::SetDocumentVersion(const Standard_Integer theVersion)
|
||||
{
|
||||
myDocumentVersion = theVersion;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : DocumentVersion
|
||||
//purpose : Retrieved document version
|
||||
//=======================================================================
|
||||
Standard_Integer BinMDataXtd::DocumentVersion()
|
||||
{
|
||||
return myDocumentVersion;
|
||||
}
|
38
src/BinMDataXtd/BinMDataXtd_AxisDriver.cdl
Executable file
38
src/BinMDataXtd/BinMDataXtd_AxisDriver.cdl
Executable file
@@ -0,0 +1,38 @@
|
||||
-- File: BinMDataXtd_AxisDriver.cdl
|
||||
-- Created: Thu May 13 11:41:14 2004
|
||||
-- Author: Sergey ZARITCHNY <szy@opencascade.com>
|
||||
-- modified 13.04.2009 Sergey Zaritchny
|
||||
-- Copyright: Open CasCade S.A. 2004
|
||||
|
||||
class AxisDriver from BinMDataXtd inherits ADriver from BinMDF
|
||||
|
||||
---Purpose: Axis attribute Driver.
|
||||
|
||||
uses
|
||||
MessageDriver from CDM,
|
||||
SRelocationTable from BinObjMgt,
|
||||
RRelocationTable from BinObjMgt,
|
||||
Persistent from BinObjMgt,
|
||||
Attribute from TDF
|
||||
|
||||
is
|
||||
Create (theMessageDriver:MessageDriver from CDM)
|
||||
returns mutable AxisDriver from BinMDataXtd;
|
||||
|
||||
NewEmpty (me) returns mutable Attribute from TDF
|
||||
is redefined;
|
||||
|
||||
Paste(me; Source : Persistent from BinObjMgt;
|
||||
Target : mutable Attribute from TDF;
|
||||
RelocTable : out RRelocationTable from BinObjMgt)
|
||||
returns Boolean from Standard is redefined;
|
||||
|
||||
Paste(me; Source : Attribute from TDF;
|
||||
Target : in out Persistent from BinObjMgt;
|
||||
RelocTable : out SRelocationTable from BinObjMgt)
|
||||
is redefined;
|
||||
|
||||
end AxisDriver;
|
||||
|
||||
|
||||
|
56
src/BinMDataXtd/BinMDataXtd_AxisDriver.cxx
Executable file
56
src/BinMDataXtd/BinMDataXtd_AxisDriver.cxx
Executable file
@@ -0,0 +1,56 @@
|
||||
// File: BinMDataXtd_AxisDriver.cxx
|
||||
// Created: Thu May 13 11:42:53 2004
|
||||
// Author: Sergey ZARITCHNY <szy@opencascade.com>
|
||||
// modified 13.04.2009 Sergey Zaritchny
|
||||
// Copyright: Open CasCade S.A. 2004
|
||||
|
||||
#include <BinMDataXtd_AxisDriver.ixx>
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDataXtd_Axis.hxx>
|
||||
#include <BinMDF_ADriver.hxx>
|
||||
#include <BinObjMgt_Persistent.hxx>
|
||||
#include <BinObjMgt_RRelocationTable.hxx>
|
||||
#include <BinObjMgt_SRelocationTable.hxx>
|
||||
//=======================================================================
|
||||
//function : BinMDataXtd_AxisDriver
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
BinMDataXtd_AxisDriver::BinMDataXtd_AxisDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
: BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Axis)->Name())
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NewEmpty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(TDF_Attribute) BinMDataXtd_AxisDriver::NewEmpty() const
|
||||
{
|
||||
return new TDataXtd_Axis();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : persistent -> transient (retrieve)
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BinMDataXtd_AxisDriver::Paste
|
||||
(const BinObjMgt_Persistent&,
|
||||
const Handle(TDF_Attribute)&,
|
||||
BinObjMgt_RRelocationTable& ) const
|
||||
{return Standard_True;}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : transient -> persistent (store)
|
||||
//=======================================================================
|
||||
|
||||
void BinMDataXtd_AxisDriver::Paste (const Handle(TDF_Attribute)&,
|
||||
BinObjMgt_Persistent&,
|
||||
BinObjMgt_SRelocationTable& ) const
|
||||
{}
|
||||
|
33
src/BinMDataXtd/BinMDataXtd_ConstraintDriver.cdl
Executable file
33
src/BinMDataXtd/BinMDataXtd_ConstraintDriver.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: BinMDataXtd_ConstraintDriver.cdl
|
||||
-- Created: Fri Aug 24 20:16:51 2001
|
||||
-- Author: Alexander GRIGORIEV
|
||||
-- modified 13.04.2009 Sergey Zaritchny
|
||||
-- Copyright: Open Cascade 2001
|
||||
|
||||
class ConstraintDriver from BinMDataXtd inherits ADriver from BinMDF
|
||||
|
||||
---Purpose: 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 mutable ConstraintDriver from BinMDataXtd;
|
||||
|
||||
NewEmpty (me) returns mutable Attribute from TDF;
|
||||
|
||||
Paste(me; Source : Persistent from BinObjMgt;
|
||||
Target : mutable 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 ConstraintDriver;
|
172
src/BinMDataXtd/BinMDataXtd_ConstraintDriver.cxx
Executable file
172
src/BinMDataXtd/BinMDataXtd_ConstraintDriver.cxx
Executable file
@@ -0,0 +1,172 @@
|
||||
// File: BinMDataXtd_ConstraintDriver.cxx
|
||||
// Created: Fri Aug 24 20:46:58 2001
|
||||
// Author: Alexnder GRIGORIEV
|
||||
// Copyright: Open Cascade 2001
|
||||
// History:
|
||||
// modified 13.04.2009 Sergey Zaritchny
|
||||
|
||||
#include <BinMDataXtd_ConstraintDriver.ixx>
|
||||
|
||||
#include <TDataXtd_Constraint.hxx>
|
||||
#include <TDataStd_Real.hxx>
|
||||
#include <TNaming_NamedShape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : BinMDataXtd_ConstraintDriver
|
||||
//purpose : Constructor
|
||||
//=======================================================================
|
||||
BinMDataXtd_ConstraintDriver::BinMDataXtd_ConstraintDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
: BinMDF_ADriver (theMsgDriver, NULL)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : NewEmpty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TDF_Attribute) BinMDataXtd_ConstraintDriver::NewEmpty() const
|
||||
{
|
||||
return (new TDataXtd_Constraint());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : persistent -> transient (retrieve)
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BinMDataXtd_ConstraintDriver::Paste
|
||||
(const BinObjMgt_Persistent& theSource,
|
||||
const Handle(TDF_Attribute)& theTarget,
|
||||
BinObjMgt_RRelocationTable& theRelocTable) const
|
||||
{
|
||||
Handle(TDataXtd_Constraint) aC =
|
||||
Handle(TDataXtd_Constraint)::DownCast(theTarget);
|
||||
|
||||
Standard_Integer aNb;
|
||||
|
||||
// value
|
||||
if (! (theSource >> aNb))
|
||||
return Standard_False;
|
||||
if (aNb > 0)
|
||||
{
|
||||
Handle(TDataStd_Real) aTValue;
|
||||
if (theRelocTable.IsBound(aNb))
|
||||
aTValue = Handle(TDataStd_Real)::DownCast(theRelocTable.Find(aNb));
|
||||
else
|
||||
{
|
||||
aTValue = new TDataStd_Real;
|
||||
theRelocTable.Bind(aNb, aTValue);
|
||||
}
|
||||
aC->SetValue(aTValue);
|
||||
}
|
||||
|
||||
// geometries
|
||||
Standard_Integer NbGeom;
|
||||
if (! (theSource >> NbGeom))
|
||||
return Standard_False;
|
||||
Standard_Integer iG = 1;
|
||||
while (iG <= NbGeom)
|
||||
{
|
||||
if (! (theSource >> aNb))
|
||||
return Standard_False;
|
||||
if (aNb > 0)
|
||||
{
|
||||
Handle(TNaming_NamedShape) aG;
|
||||
if (theRelocTable.IsBound(aNb))
|
||||
aG = Handle(TNaming_NamedShape)::DownCast(theRelocTable.Find(aNb));
|
||||
else
|
||||
{
|
||||
aG = new TNaming_NamedShape;
|
||||
theRelocTable.Bind(aNb, aG);
|
||||
}
|
||||
aC->SetGeometry (iG++, aG);
|
||||
}
|
||||
}
|
||||
|
||||
// plane
|
||||
if (! (theSource >> aNb))
|
||||
return Standard_False;
|
||||
if (aNb > 0)
|
||||
{
|
||||
Handle(TNaming_NamedShape) aTPlane;
|
||||
if (theRelocTable.IsBound(aNb))
|
||||
aTPlane = Handle(TNaming_NamedShape)::DownCast(theRelocTable.Find(aNb));
|
||||
else
|
||||
{
|
||||
aTPlane = new TNaming_NamedShape;
|
||||
theRelocTable.Bind(aNb, aTPlane);
|
||||
}
|
||||
aC->SetPlane(aTPlane);
|
||||
}
|
||||
|
||||
// constraint type
|
||||
Standard_Integer aType;
|
||||
if (! (theSource >> aType))
|
||||
return Standard_False;
|
||||
aC->SetType( (TDataXtd_ConstraintEnum) aType );
|
||||
|
||||
// flags
|
||||
Standard_Integer flags;
|
||||
if (! (theSource >> flags))
|
||||
return Standard_False;
|
||||
aC->Verified( flags & 1);
|
||||
aC->Inverted( flags & 2);
|
||||
aC->Reversed( flags & 4);
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : transient -> persistent (store)
|
||||
//=======================================================================
|
||||
void BinMDataXtd_ConstraintDriver::Paste
|
||||
(const Handle(TDF_Attribute)& theSource,
|
||||
BinObjMgt_Persistent& theTarget,
|
||||
BinObjMgt_SRelocationTable& theRelocTable) const
|
||||
{
|
||||
Handle(TDataXtd_Constraint) aC =
|
||||
Handle(TDataXtd_Constraint)::DownCast(theSource);
|
||||
|
||||
Standard_Integer aNb;
|
||||
|
||||
// value
|
||||
Handle(TDataStd_Real) aValue = aC->GetValue();
|
||||
if (!aValue.IsNull())
|
||||
aNb = theRelocTable.Add(aValue); // create and/or get index
|
||||
else
|
||||
aNb = -1;
|
||||
theTarget << aNb;
|
||||
|
||||
// geometries
|
||||
Standard_Integer NbGeom = aC->NbGeometries();
|
||||
theTarget << NbGeom;
|
||||
Standard_Integer iG;
|
||||
for (iG = 1; iG <= NbGeom; iG++)
|
||||
{
|
||||
Handle(TNaming_NamedShape) aG = aC->GetGeometry(iG);
|
||||
if (!aG.IsNull())
|
||||
aNb = theRelocTable.Add(aG);
|
||||
else
|
||||
aNb = -1;
|
||||
theTarget << aNb;
|
||||
}
|
||||
|
||||
// plane
|
||||
Handle(TNaming_NamedShape) aTPlane = aC->GetPlane();
|
||||
if (!aTPlane.IsNull())
|
||||
aNb = theRelocTable.Add(aTPlane);
|
||||
else
|
||||
aNb = -1;
|
||||
theTarget << aNb;
|
||||
|
||||
// constraint type
|
||||
theTarget << (Standard_Integer) aC->GetType();
|
||||
|
||||
// flags
|
||||
Standard_Integer flags = 0;
|
||||
if (aC->Verified()) flags |= 1;
|
||||
if (aC->Inverted()) flags |= 2;
|
||||
if (aC->Reversed()) flags |= 4;
|
||||
theTarget << flags;
|
||||
}
|
33
src/BinMDataXtd/BinMDataXtd_GeometryDriver.cdl
Executable file
33
src/BinMDataXtd/BinMDataXtd_GeometryDriver.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: BinMDataXtd_GeometryDriver.cdl
|
||||
-- Created: Fri Aug 24 20:16:51 2001
|
||||
-- Author: Alexander GRIGORIEV
|
||||
-- modified 13.04.2009 Sergey Zaritchny
|
||||
-- Copyright: Open Cascade 2001
|
||||
|
||||
class GeometryDriver from BinMDataXtd inherits ADriver from BinMDF
|
||||
|
||||
---Purpose: 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 mutable GeometryDriver from BinMDataXtd;
|
||||
|
||||
NewEmpty (me) returns mutable Attribute from TDF;
|
||||
|
||||
Paste(me; Source : Persistent from BinObjMgt;
|
||||
Target : mutable 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 GeometryDriver;
|
59
src/BinMDataXtd/BinMDataXtd_GeometryDriver.cxx
Executable file
59
src/BinMDataXtd/BinMDataXtd_GeometryDriver.cxx
Executable file
@@ -0,0 +1,59 @@
|
||||
// File: BinMDataXtd_GeometryDriver.cxx
|
||||
// Created: Fri Aug 24 20:46:58 2001
|
||||
// Author: Alexnder GRIGORIEV
|
||||
// Copyright: Open Cascade 2001
|
||||
// History:
|
||||
// modified 13.04.2009 Sergey Zaritchny
|
||||
|
||||
#include <BinMDataXtd_GeometryDriver.ixx>
|
||||
#include <TDataXtd_Geometry.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : BinMDataXtd_GeometryDriver
|
||||
//purpose : Constructor
|
||||
//=======================================================================
|
||||
BinMDataXtd_GeometryDriver::BinMDataXtd_GeometryDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
: BinMDF_ADriver (theMsgDriver, NULL)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : NewEmpty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TDF_Attribute) BinMDataXtd_GeometryDriver::NewEmpty() const
|
||||
{
|
||||
return (new TDataXtd_Geometry());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : P -> T
|
||||
//=======================================================================
|
||||
Standard_Boolean BinMDataXtd_GeometryDriver::Paste
|
||||
(const BinObjMgt_Persistent& theSource,
|
||||
const Handle(TDF_Attribute)& theTarget,
|
||||
BinObjMgt_RRelocationTable& ) const
|
||||
{
|
||||
Handle(TDataXtd_Geometry) aT =
|
||||
Handle(TDataXtd_Geometry)::DownCast (theTarget);
|
||||
|
||||
Standard_Integer aType;
|
||||
Standard_Boolean ok = theSource >> aType;
|
||||
if (ok)
|
||||
aT->SetType ((TDataXtd_GeometryEnum) aType);
|
||||
|
||||
return ok;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : T -> P
|
||||
//=======================================================================
|
||||
void BinMDataXtd_GeometryDriver::Paste (const Handle(TDF_Attribute)& theSource,
|
||||
BinObjMgt_Persistent& theTarget,
|
||||
BinObjMgt_SRelocationTable& ) const
|
||||
{
|
||||
Handle(TDataXtd_Geometry) aG = Handle(TDataXtd_Geometry)::DownCast(theSource);
|
||||
theTarget << (Standard_Integer) aG->GetType();
|
||||
}
|
33
src/BinMDataXtd/BinMDataXtd_PatternStdDriver.cdl
Executable file
33
src/BinMDataXtd/BinMDataXtd_PatternStdDriver.cdl
Executable file
@@ -0,0 +1,33 @@
|
||||
-- File: BinMDataXtd_PatternXtdDriver.cdl
|
||||
-- Created: Fri Aug 24 20:16:51 2001
|
||||
-- Author: Alexander GRIGORIEV
|
||||
-- modified 13.04.2009 Sergey Zaritchny
|
||||
-- Copyright: Open Cascade 2001
|
||||
|
||||
class PatternStdDriver from BinMDataXtd inherits ADriver from BinMDF
|
||||
|
||||
---Purpose: 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 mutable PatternStdDriver from BinMDataXtd;
|
||||
|
||||
NewEmpty (me) returns mutable Attribute from TDF;
|
||||
|
||||
Paste(me; Source : Persistent from BinObjMgt;
|
||||
Target : mutable 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 PatternStdDriver;
|
228
src/BinMDataXtd/BinMDataXtd_PatternStdDriver.cxx
Executable file
228
src/BinMDataXtd/BinMDataXtd_PatternStdDriver.cxx
Executable file
@@ -0,0 +1,228 @@
|
||||
// File: BinMDataXtd_PatternStdDriver.cxx
|
||||
// Created: Fri Aug 24 20:46:58 2001
|
||||
// Author: Alexnder GRIGORIEV
|
||||
// Copyright: Open Cascade 2001
|
||||
// History:
|
||||
// modified 13.04.2009 Sergey Zaritchny
|
||||
|
||||
#include <BinMDataXtd_PatternStdDriver.ixx>
|
||||
|
||||
#include <TDataStd_Real.hxx>
|
||||
#include <TDataStd_Integer.hxx>
|
||||
#include <TDataXtd_PatternStd.hxx>
|
||||
#include <TNaming_NamedShape.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : BinMDataXtd_PatternStdDriver
|
||||
//purpose : Constructor
|
||||
//=======================================================================
|
||||
BinMDataXtd_PatternStdDriver::BinMDataXtd_PatternStdDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
: BinMDF_ADriver (theMsgDriver, NULL)
|
||||
{}
|
||||
|
||||
//=======================================================================
|
||||
//function : NewEmpty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TDF_Attribute) BinMDataXtd_PatternStdDriver::NewEmpty() const
|
||||
{
|
||||
return (new TDataXtd_PatternStd());
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean BinMDataXtd_PatternStdDriver::Paste
|
||||
(const BinObjMgt_Persistent& theSource,
|
||||
const Handle(TDF_Attribute)& theTarget,
|
||||
BinObjMgt_RRelocationTable& theRelocTable) const
|
||||
{
|
||||
Handle(TDataXtd_PatternStd) aP =
|
||||
Handle(TDataXtd_PatternStd)::DownCast(theTarget);
|
||||
|
||||
// signature
|
||||
Standard_Integer signature;
|
||||
if (! (theSource >> signature))
|
||||
return Standard_False;
|
||||
if (signature == 0)
|
||||
return Standard_True;
|
||||
aP->Signature(signature);
|
||||
|
||||
// reversed flags
|
||||
Standard_Integer revFlags;
|
||||
if (! (theSource >> revFlags))
|
||||
return Standard_False;
|
||||
aP->Axis1Reversed( revFlags & 1 );
|
||||
aP->Axis2Reversed( revFlags & 2 );
|
||||
|
||||
Handle(TNaming_NamedShape) TNS;
|
||||
Standard_Integer aNb;
|
||||
|
||||
if (signature == 5) // mirror
|
||||
{
|
||||
if (! (theSource >> aNb))
|
||||
return Standard_False;
|
||||
if (theRelocTable.IsBound(aNb))
|
||||
TNS = Handle(TNaming_NamedShape)::DownCast(theRelocTable.Find(aNb));
|
||||
else
|
||||
{
|
||||
TNS = new TNaming_NamedShape;
|
||||
theRelocTable.Bind(aNb, TNS);
|
||||
}
|
||||
aP->Mirror(TNS);
|
||||
}
|
||||
else
|
||||
{
|
||||
Handle(TDataStd_Real) TReal;
|
||||
Handle(TDataStd_Integer) TInt;
|
||||
|
||||
// axis 1
|
||||
if (! (theSource >> aNb))
|
||||
return Standard_False;
|
||||
if (theRelocTable.IsBound(aNb))
|
||||
TNS = Handle(TNaming_NamedShape)::DownCast(theRelocTable.Find(aNb));
|
||||
else
|
||||
{
|
||||
TNS = new TNaming_NamedShape;
|
||||
theRelocTable.Bind(aNb, TNS);
|
||||
}
|
||||
aP->Axis1(TNS);
|
||||
|
||||
// value 1
|
||||
if (! (theSource >> aNb))
|
||||
return Standard_False;
|
||||
if (theRelocTable.IsBound(aNb))
|
||||
TReal = Handle(TDataStd_Real)::DownCast(theRelocTable.Find(aNb));
|
||||
else
|
||||
{
|
||||
TReal = new TDataStd_Real;
|
||||
theRelocTable.Bind(aNb, TReal);
|
||||
}
|
||||
aP->Value1(TReal);
|
||||
|
||||
// number of instances 1
|
||||
if (! (theSource >> aNb))
|
||||
return Standard_False;
|
||||
if (theRelocTable.IsBound(aNb))
|
||||
TInt = Handle(TDataStd_Integer)::DownCast(theRelocTable.Find(aNb));
|
||||
else
|
||||
{
|
||||
TInt = new TDataStd_Integer;
|
||||
theRelocTable.Bind(aNb, TInt);
|
||||
}
|
||||
aP->NbInstances1(TInt);
|
||||
|
||||
if (signature > 2)
|
||||
{
|
||||
// axis 2
|
||||
if (! (theSource >> aNb))
|
||||
return Standard_False;
|
||||
if (theRelocTable.IsBound(aNb))
|
||||
TNS = Handle(TNaming_NamedShape)::DownCast(theRelocTable.Find(aNb));
|
||||
else
|
||||
{
|
||||
TNS = new TNaming_NamedShape;
|
||||
theRelocTable.Bind(aNb, TNS);
|
||||
}
|
||||
aP->Axis2(TNS);
|
||||
|
||||
// real value 2
|
||||
if (! (theSource >> aNb))
|
||||
return Standard_False;
|
||||
if (theRelocTable.IsBound(aNb))
|
||||
TReal = Handle(TDataStd_Real)::DownCast(theRelocTable.Find(aNb));
|
||||
else
|
||||
{
|
||||
TReal = new TDataStd_Real;
|
||||
theRelocTable.Bind(aNb, TReal);
|
||||
}
|
||||
aP->Value2(TReal);
|
||||
|
||||
// number of instances 2
|
||||
if (! (theSource >> aNb))
|
||||
return Standard_False;
|
||||
if (theRelocTable.IsBound(aNb))
|
||||
TInt = Handle(TDataStd_Integer)::DownCast(theRelocTable.Find(aNb));
|
||||
else
|
||||
{
|
||||
TInt = new TDataStd_Integer;
|
||||
theRelocTable.Bind(aNb, TInt);
|
||||
}
|
||||
aP->NbInstances2(TInt);
|
||||
}
|
||||
}
|
||||
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BinMDataXtd_PatternStdDriver::Paste
|
||||
(const Handle(TDF_Attribute)& theSource,
|
||||
BinObjMgt_Persistent& theTarget,
|
||||
BinObjMgt_SRelocationTable& theRelocTable) const
|
||||
{
|
||||
Handle(TDataXtd_PatternStd) aP =
|
||||
Handle(TDataXtd_PatternStd)::DownCast(theSource);
|
||||
|
||||
// signature
|
||||
Standard_Integer signature = aP->Signature();
|
||||
if (signature < 1 || signature > 5)
|
||||
signature = 0;
|
||||
theTarget << signature;
|
||||
if (signature == 0)
|
||||
return;
|
||||
|
||||
// reversed flags
|
||||
Standard_Integer revFlags = 0;
|
||||
if (aP->Axis1Reversed()) revFlags |= 1;
|
||||
if (aP->Axis2Reversed()) revFlags |= 2;
|
||||
theTarget << revFlags;
|
||||
|
||||
Standard_Integer aNb;
|
||||
if (signature == 5) // mirror
|
||||
{
|
||||
Handle(TNaming_NamedShape) Plane = aP->Mirror();
|
||||
aNb = theRelocTable.Add(Plane);
|
||||
theTarget << aNb;
|
||||
}
|
||||
else
|
||||
{
|
||||
// axis 1
|
||||
Handle(TNaming_NamedShape) Axis = aP->Axis1();
|
||||
aNb = theRelocTable.Add(Axis);
|
||||
theTarget << aNb;
|
||||
|
||||
// real value 1
|
||||
Handle(TDataStd_Real) Value = aP->Value1();
|
||||
aNb = theRelocTable.Add(Value);
|
||||
theTarget << aNb;
|
||||
|
||||
// number of instances 1
|
||||
Handle(TDataStd_Integer) NbInstances = aP->NbInstances1();
|
||||
aNb = theRelocTable.Add(NbInstances);
|
||||
theTarget << aNb;
|
||||
|
||||
if (signature > 2)
|
||||
{
|
||||
// axis 2
|
||||
Axis = aP->Axis2();
|
||||
aNb = theRelocTable.Add(Axis);
|
||||
theTarget << aNb;
|
||||
|
||||
// real value 2
|
||||
Value = aP->Value2();
|
||||
aNb = theRelocTable.Add(Value);
|
||||
theTarget << aNb;
|
||||
|
||||
// number of instances 2
|
||||
NbInstances = aP->NbInstances2();
|
||||
aNb = theRelocTable.Add(NbInstances);
|
||||
theTarget << aNb;
|
||||
}
|
||||
}
|
||||
}
|
37
src/BinMDataXtd/BinMDataXtd_PlacementDriver.cdl
Executable file
37
src/BinMDataXtd/BinMDataXtd_PlacementDriver.cdl
Executable file
@@ -0,0 +1,37 @@
|
||||
-- File: BinMDataXtd_PlacementDriver.cdl
|
||||
-- Created: Thu May 13 12:26:32 2004
|
||||
-- Author: Sergey ZARITCHNY <szy@opencascade.com>
|
||||
-- modified 13.04.2009 Sergey Zaritchny
|
||||
-- Copyright: Open CasCade S.A. 2004
|
||||
|
||||
class PlacementDriver from BinMDataXtd inherits ADriver from BinMDF
|
||||
|
||||
---Purpose: Placement attribute Driver.
|
||||
|
||||
uses
|
||||
MessageDriver from CDM,
|
||||
SRelocationTable from BinObjMgt,
|
||||
RRelocationTable from BinObjMgt,
|
||||
Persistent from BinObjMgt,
|
||||
Attribute from TDF
|
||||
|
||||
is
|
||||
Create (theMessageDriver:MessageDriver from CDM)
|
||||
returns mutable PlacementDriver from BinMDataXtd;
|
||||
|
||||
NewEmpty (me) returns mutable Attribute from TDF
|
||||
is redefined;
|
||||
|
||||
Paste(me; Source : Persistent from BinObjMgt;
|
||||
Target : mutable Attribute from TDF;
|
||||
RelocTable : out RRelocationTable from BinObjMgt)
|
||||
returns Boolean from Standard is redefined;
|
||||
|
||||
Paste(me; Source : Attribute from TDF;
|
||||
Target : in out Persistent from BinObjMgt;
|
||||
RelocTable : out SRelocationTable from BinObjMgt)
|
||||
is redefined;
|
||||
|
||||
end PlacementDriver;
|
||||
|
||||
|
57
src/BinMDataXtd/BinMDataXtd_PlacementDriver.cxx
Executable file
57
src/BinMDataXtd/BinMDataXtd_PlacementDriver.cxx
Executable file
@@ -0,0 +1,57 @@
|
||||
// File: BinMDataXtd_PlacementDriver.cxx
|
||||
// Created: Thu May 13 12:27:38 2004
|
||||
// Author: Sergey ZARITCHNY <szy@opencascade.com>
|
||||
// Copyright: Open CasCade S.A. 2004
|
||||
// modified 13.04.2009 Sergey Zaritchny
|
||||
|
||||
#include <BinMDataXtd_PlacementDriver.ixx>
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDataXtd_Placement.hxx>
|
||||
#include <BinMDF_ADriver.hxx>
|
||||
#include <BinObjMgt_Persistent.hxx>
|
||||
#include <BinObjMgt_RRelocationTable.hxx>
|
||||
#include <BinObjMgt_SRelocationTable.hxx>
|
||||
//=======================================================================
|
||||
//function : BinMDataXtd_PlacementDriver
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
BinMDataXtd_PlacementDriver::BinMDataXtd_PlacementDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
: BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Placement)->Name())
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NewEmpty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(TDF_Attribute) BinMDataXtd_PlacementDriver::NewEmpty() const
|
||||
{
|
||||
return new TDataXtd_Placement();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : persistent -> transient (retrieve)
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BinMDataXtd_PlacementDriver::Paste
|
||||
(const BinObjMgt_Persistent&,
|
||||
const Handle(TDF_Attribute)&,
|
||||
BinObjMgt_RRelocationTable& ) const
|
||||
{return Standard_True;}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : transient -> persistent (store)
|
||||
//=======================================================================
|
||||
|
||||
void BinMDataXtd_PlacementDriver::Paste (const Handle(TDF_Attribute)&,
|
||||
BinObjMgt_Persistent&,
|
||||
BinObjMgt_SRelocationTable& ) const
|
||||
{}
|
||||
|
||||
|
36
src/BinMDataXtd/BinMDataXtd_PlaneDriver.cdl
Executable file
36
src/BinMDataXtd/BinMDataXtd_PlaneDriver.cdl
Executable file
@@ -0,0 +1,36 @@
|
||||
-- File: BinMDataXtd_PlaneDriver.cdl
|
||||
-- Created: Thu May 13 11:54:43 2004
|
||||
-- Author: Sergey ZARITCHNY <szy@opencascade.com>
|
||||
-- modified 13.04.2009 Sergey Zaritchny
|
||||
-- Copyright: Open CasCade S.A. 2004
|
||||
|
||||
class PlaneDriver from BinMDataXtd inherits ADriver from BinMDF
|
||||
|
||||
---Purpose: Plane attribute Driver.
|
||||
|
||||
uses
|
||||
MessageDriver from CDM,
|
||||
SRelocationTable from BinObjMgt,
|
||||
RRelocationTable from BinObjMgt,
|
||||
Persistent from BinObjMgt,
|
||||
Attribute from TDF
|
||||
|
||||
is
|
||||
Create (theMessageDriver:MessageDriver from CDM)
|
||||
returns mutable PlaneDriver from BinMDataXtd;
|
||||
|
||||
NewEmpty (me) returns mutable Attribute from TDF
|
||||
is redefined;
|
||||
|
||||
Paste(me; Source : Persistent from BinObjMgt;
|
||||
Target : mutable Attribute from TDF;
|
||||
RelocTable : out RRelocationTable from BinObjMgt)
|
||||
returns Boolean from Standard is redefined;
|
||||
|
||||
Paste(me; Source : Attribute from TDF;
|
||||
Target : in out Persistent from BinObjMgt;
|
||||
RelocTable : out SRelocationTable from BinObjMgt)
|
||||
is redefined;
|
||||
|
||||
end PlaneDriver;
|
||||
|
56
src/BinMDataXtd/BinMDataXtd_PlaneDriver.cxx
Executable file
56
src/BinMDataXtd/BinMDataXtd_PlaneDriver.cxx
Executable file
@@ -0,0 +1,56 @@
|
||||
// File: BinMDataXtd_PlaneDriver.cxx
|
||||
// Created: Thu May 13 11:59:39 2004
|
||||
// Author: Sergey ZARITCHNY <szy@opencascade.com>
|
||||
// Copyright: Open CasCade S.A. 2004
|
||||
// modified 13.04.2009 Sergey Zaritchny
|
||||
|
||||
#include <BinMDataXtd_PlaneDriver.ixx>
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDataXtd_Plane.hxx>
|
||||
#include <BinMDF_ADriver.hxx>
|
||||
#include <BinObjMgt_Persistent.hxx>
|
||||
#include <BinObjMgt_RRelocationTable.hxx>
|
||||
#include <BinObjMgt_SRelocationTable.hxx>
|
||||
//=======================================================================
|
||||
//function : BinMDataXtd_PlaneDriver
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
BinMDataXtd_PlaneDriver::BinMDataXtd_PlaneDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
: BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Plane)->Name())
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NewEmpty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(TDF_Attribute) BinMDataXtd_PlaneDriver::NewEmpty() const
|
||||
{
|
||||
return new TDataXtd_Plane();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : persistent -> transient (retrieve)
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BinMDataXtd_PlaneDriver::Paste
|
||||
(const BinObjMgt_Persistent&,
|
||||
const Handle(TDF_Attribute)&,
|
||||
BinObjMgt_RRelocationTable& ) const
|
||||
{return Standard_True;}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : transient -> persistent (store)
|
||||
//=======================================================================
|
||||
|
||||
void BinMDataXtd_PlaneDriver::Paste (const Handle(TDF_Attribute)&,
|
||||
BinObjMgt_Persistent&,
|
||||
BinObjMgt_SRelocationTable& ) const
|
||||
{}
|
||||
|
36
src/BinMDataXtd/BinMDataXtd_PointDriver.cdl
Executable file
36
src/BinMDataXtd/BinMDataXtd_PointDriver.cdl
Executable file
@@ -0,0 +1,36 @@
|
||||
-- File: BinMDataXtd_PointDriver.cdl
|
||||
-- Created: Thu May 13 11:49:24 2004
|
||||
-- Author: Sergey ZARITCHNY <szy@opencascade.com>
|
||||
-- modified 13.04.2009 Sergey Zaritchny
|
||||
-- Copyright: Open CasCade S.A. 2004
|
||||
|
||||
class PointDriver from BinMDataXtd inherits ADriver from BinMDF
|
||||
|
||||
---Purpose: Point attribute Driver.
|
||||
|
||||
uses
|
||||
MessageDriver from CDM,
|
||||
SRelocationTable from BinObjMgt,
|
||||
RRelocationTable from BinObjMgt,
|
||||
Persistent from BinObjMgt,
|
||||
Attribute from TDF
|
||||
|
||||
is
|
||||
Create (theMessageDriver:MessageDriver from CDM)
|
||||
returns mutable PointDriver from BinMDataXtd;
|
||||
|
||||
NewEmpty (me) returns mutable Attribute from TDF
|
||||
is redefined;
|
||||
|
||||
Paste(me; Source : Persistent from BinObjMgt;
|
||||
Target : mutable Attribute from TDF;
|
||||
RelocTable : out RRelocationTable from BinObjMgt)
|
||||
returns Boolean from Standard is redefined;
|
||||
|
||||
Paste(me; Source : Attribute from TDF;
|
||||
Target : in out Persistent from BinObjMgt;
|
||||
RelocTable : out SRelocationTable from BinObjMgt)
|
||||
is redefined;
|
||||
|
||||
end PointDriver;
|
||||
|
57
src/BinMDataXtd/BinMDataXtd_PointDriver.cxx
Executable file
57
src/BinMDataXtd/BinMDataXtd_PointDriver.cxx
Executable file
@@ -0,0 +1,57 @@
|
||||
// File: BinMDataXtd_PointDriver.cxx
|
||||
// Created: Thu May 13 11:51:10 2004
|
||||
// Author: Sergey ZARITCHNY <szy@opencascade.com>
|
||||
// Copyright: Open CasCade S.A. 2004
|
||||
// modified 13.04.2009 Sergey Zaritchny
|
||||
|
||||
#include <BinMDataXtd_PointDriver.ixx>
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDataXtd_Point.hxx>
|
||||
#include <BinMDF_ADriver.hxx>
|
||||
#include <BinObjMgt_Persistent.hxx>
|
||||
#include <BinObjMgt_RRelocationTable.hxx>
|
||||
#include <BinObjMgt_SRelocationTable.hxx>
|
||||
//=======================================================================
|
||||
//function : BinMDataXtd_PointDriver
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
BinMDataXtd_PointDriver::BinMDataXtd_PointDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
: BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Point)->Name())
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NewEmpty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(TDF_Attribute) BinMDataXtd_PointDriver::NewEmpty() const
|
||||
{
|
||||
return new TDataXtd_Point();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : persistent -> transient (retrieve)
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BinMDataXtd_PointDriver::Paste
|
||||
(const BinObjMgt_Persistent&,
|
||||
const Handle(TDF_Attribute)&,
|
||||
BinObjMgt_RRelocationTable& ) const
|
||||
{return Standard_True;}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : transient -> persistent (store)
|
||||
//=======================================================================
|
||||
|
||||
void BinMDataXtd_PointDriver::Paste (const Handle(TDF_Attribute)&,
|
||||
BinObjMgt_Persistent&,
|
||||
BinObjMgt_SRelocationTable& ) const
|
||||
{}
|
||||
|
||||
|
36
src/BinMDataXtd/BinMDataXtd_ShapeDriver.cdl
Executable file
36
src/BinMDataXtd/BinMDataXtd_ShapeDriver.cdl
Executable file
@@ -0,0 +1,36 @@
|
||||
-- File: BinMDataXtd_ShapeDriver.cdl
|
||||
-- Created: Thu May 13 11:26:08 2004
|
||||
-- Author: Sergey ZARITCHNY <szy@opencascade.com>
|
||||
-- modified 13.04.2009 Sergey Zaritchny
|
||||
-- Copyright: Open CasCade S.A. 2004
|
||||
|
||||
class ShapeDriver from BinMDataXtd inherits ADriver from BinMDF
|
||||
|
||||
---Purpose: Shape attribute Driver.
|
||||
|
||||
uses
|
||||
MessageDriver from CDM,
|
||||
SRelocationTable from BinObjMgt,
|
||||
RRelocationTable from BinObjMgt,
|
||||
Persistent from BinObjMgt,
|
||||
Attribute from TDF
|
||||
|
||||
is
|
||||
Create (theMessageDriver:MessageDriver from CDM)
|
||||
returns mutable ShapeDriver from BinMDataXtd;
|
||||
|
||||
NewEmpty (me) returns mutable Attribute from TDF
|
||||
is redefined;
|
||||
|
||||
Paste(me; Source : Persistent from BinObjMgt;
|
||||
Target : mutable Attribute from TDF;
|
||||
RelocTable : out RRelocationTable from BinObjMgt)
|
||||
returns Boolean from Standard is redefined;
|
||||
|
||||
Paste(me; Source : Attribute from TDF;
|
||||
Target : in out Persistent from BinObjMgt;
|
||||
RelocTable : out SRelocationTable from BinObjMgt)
|
||||
is redefined;
|
||||
|
||||
end ShapeDriver;
|
||||
|
55
src/BinMDataXtd/BinMDataXtd_ShapeDriver.cxx
Executable file
55
src/BinMDataXtd/BinMDataXtd_ShapeDriver.cxx
Executable file
@@ -0,0 +1,55 @@
|
||||
// File: BinMDataXtd_ShapeDriver.cxx
|
||||
// Created: Thu May 13 11:31:23 2004
|
||||
// Author: Sergey ZARITCHNY <szy@opencascade.com>
|
||||
// Copyright: Open CasCade S.A. 2004
|
||||
// modified 13.04.2009 Sergey Zaritchny
|
||||
|
||||
#include <BinMDataXtd_ShapeDriver.ixx>
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <TDataXtd_Shape.hxx>
|
||||
#include <BinMDF_ADriver.hxx>
|
||||
#include <BinObjMgt_Persistent.hxx>
|
||||
#include <BinObjMgt_RRelocationTable.hxx>
|
||||
#include <BinObjMgt_SRelocationTable.hxx>
|
||||
//=======================================================================
|
||||
//function : BinMDataXtd_ShapeDriver
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
BinMDataXtd_ShapeDriver::BinMDataXtd_ShapeDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
: BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TDataXtd_Shape)->Name())
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : NewEmpty
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Handle(TDF_Attribute) BinMDataXtd_ShapeDriver::NewEmpty() const
|
||||
{
|
||||
return new TDataXtd_Shape();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : persistent -> transient (retrieve)
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean BinMDataXtd_ShapeDriver::Paste
|
||||
(const BinObjMgt_Persistent&,
|
||||
const Handle(TDF_Attribute)&,
|
||||
BinObjMgt_RRelocationTable& ) const
|
||||
{return Standard_True;}
|
||||
|
||||
//=======================================================================
|
||||
//function : Paste
|
||||
//purpose : transient -> persistent (store)
|
||||
//=======================================================================
|
||||
|
||||
void BinMDataXtd_ShapeDriver::Paste (const Handle(TDF_Attribute)&,
|
||||
BinObjMgt_Persistent&,
|
||||
BinObjMgt_SRelocationTable& ) const
|
||||
{}
|
Reference in New Issue
Block a user