mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Integration of OCCT 6.5.0 from SVN
This commit is contained in:
52
src/MPrsStd/MPrsStd.cdl
Executable file
52
src/MPrsStd/MPrsStd.cdl
Executable file
@@ -0,0 +1,52 @@
|
||||
-- File: MPrsStd.cdl
|
||||
-- Created: Tue Aug 26 17:17:00 1997
|
||||
-- Author: SMO
|
||||
-- <SMO@hankox.paris1.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1997
|
||||
|
||||
|
||||
|
||||
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
|
||||
|
||||
---Purpose: Storage drivers for graphic attributes from
|
||||
-- TPrsStd
|
||||
---Category: StorageDriver
|
||||
|
||||
class AISPresentationStorageDriver;
|
||||
class PositionStorageDriver;
|
||||
|
||||
---Purpose: Retrieval drivers for graphic attributes from
|
||||
-- PPrsStd
|
||||
---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;
|
||||
|
||||
|
||||
|
46
src/MPrsStd/MPrsStd.cxx
Executable file
46
src/MPrsStd/MPrsStd.cxx
Executable file
@@ -0,0 +1,46 @@
|
||||
// File: MPrsStd.cxx
|
||||
// Created: Tue Aug 26 17:34:14 1997
|
||||
// Author: Guest Design
|
||||
// <g_design@hankox.paris1.matra-dtv.fr>
|
||||
|
||||
|
||||
#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));
|
||||
}
|
||||
|
||||
|
38
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver.cdl
Executable file
38
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver.cdl
Executable file
@@ -0,0 +1,38 @@
|
||||
-- File: MPrsStd_AISPresentationRetrievalDriver.cdl
|
||||
-- Created: Thu Jul 8 17:21:46 1999
|
||||
-- Author: Sergey RUIN
|
||||
-- <s-ruin@nnov.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1999
|
||||
|
||||
class AISPresentationRetrievalDriver from MPrsStd inherits ARDriver from MDF
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses RRelocationTable from MDF,
|
||||
Attribute from PDF,
|
||||
Attribute from TDF,
|
||||
MessageDriver from CDM
|
||||
|
||||
is
|
||||
|
||||
|
||||
Create(theMessageDriver : MessageDriver from CDM) -- Version 0
|
||||
returns mutable 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 mutable Attribute from TDF;
|
||||
|
||||
|
||||
Paste(me;
|
||||
Source : Attribute from PDF;
|
||||
Target : mutable Attribute from TDF;
|
||||
RelocTable : RRelocationTable from MDF);
|
||||
|
||||
end AISPresentationRetrievalDriver;
|
64
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver.cxx
Executable file
64
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver.cxx
Executable file
@@ -0,0 +1,64 @@
|
||||
// File: MPrsStd_AISPresentationRetrievalDriver.cxx
|
||||
// Created: Thu Jul 8 17:25:26 1999
|
||||
// Author: Sergey RUIN
|
||||
|
||||
|
||||
#include <MPrsStd_AISPresentationRetrievalDriver.ixx>
|
||||
|
||||
#include <PPrsStd_AISPresentation.hxx>
|
||||
#include <TPrsStd_AISPresentation.hxx>
|
||||
#include <AIS_Drawer.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 DEB
|
||||
cout << "AISPresentationRetrievalDriver " << "retrieved DriverGUID ==> ";
|
||||
guid.ShallowDump(cout);
|
||||
cout << endl;
|
||||
#endif
|
||||
}
|
||||
|
39
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver_1.cdl
Executable file
39
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver_1.cdl
Executable file
@@ -0,0 +1,39 @@
|
||||
-- File: MPrsStd_AISPresentationRetrievalDriver.cdl
|
||||
-- Created: Thu Jul 8 17:21:46 1999
|
||||
-- Author: Sergey RUIN
|
||||
-- <s-ruin@nnov.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1999
|
||||
|
||||
class AISPresentationRetrievalDriver_1 from MPrsStd inherits ARDriver from MDF
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses RRelocationTable from MDF,
|
||||
Attribute from PDF,
|
||||
Attribute from TDF,
|
||||
MessageDriver from CDM
|
||||
|
||||
is
|
||||
|
||||
|
||||
Create (theMessageDriver : MessageDriver from CDM) -- Version 1
|
||||
returns mutable 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 mutable Attribute from TDF;
|
||||
|
||||
|
||||
Paste(me;
|
||||
Source : Attribute from PDF;
|
||||
Target : mutable Attribute from TDF;
|
||||
RelocTable : RRelocationTable from MDF);
|
||||
|
||||
|
||||
end AISPresentationRetrievalDriver_1;
|
67
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver_1.cxx
Executable file
67
src/MPrsStd/MPrsStd_AISPresentationRetrievalDriver_1.cxx
Executable file
@@ -0,0 +1,67 @@
|
||||
// File: MPrsStd_AISPresentationRetrievalDriver.cxx
|
||||
// Created: Thu Jul 8 17:25:26 1999
|
||||
// Author: Sergey RUIN
|
||||
|
||||
|
||||
#include <MPrsStd_AISPresentationRetrievalDriver_1.ixx>
|
||||
|
||||
#include <PPrsStd_AISPresentation_1.hxx>
|
||||
#include <TPrsStd_AISPresentation.hxx>
|
||||
#include <AIS_Drawer.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 DEB
|
||||
cout << "AISPresentationRetrievalDriver " << "retrieved DriverGUID ==> ";
|
||||
guid.ShallowDump(cout);
|
||||
cout << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
43
src/MPrsStd/MPrsStd_AISPresentationStorageDriver.cdl
Executable file
43
src/MPrsStd/MPrsStd_AISPresentationStorageDriver.cdl
Executable file
@@ -0,0 +1,43 @@
|
||||
-- File: MPrsStd_AISPresentationStorageDriver.cdl
|
||||
-- Created: Thu Jul 8 17:20:30 1999
|
||||
-- Author: Sergey RUIN
|
||||
-- <s-ruin@nnov.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1999
|
||||
|
||||
|
||||
|
||||
|
||||
class AISPresentationStorageDriver from MPrsStd inherits ASDriver from MDF
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses SRelocationTable from MDF,
|
||||
Attribute from TDF,
|
||||
Attribute from PDF,
|
||||
MessageDriver from CDM
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create (theMessageDriver : MessageDriver from CDM)
|
||||
returns mutable 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 mutable Attribute from PDF;
|
||||
|
||||
|
||||
Paste(me;
|
||||
Source : Attribute from TDF;
|
||||
Target : mutable Attribute from PDF;
|
||||
RelocTable : SRelocationTable from MDF);
|
||||
|
||||
|
||||
end AISPresentationStorageDriver;
|
||||
|
80
src/MPrsStd/MPrsStd_AISPresentationStorageDriver.cxx
Executable file
80
src/MPrsStd/MPrsStd_AISPresentationStorageDriver.cxx
Executable file
@@ -0,0 +1,80 @@
|
||||
// File: MPrsStd_AISPresentationStorageDriver.cxx
|
||||
// Created: Thu Jul 8 17:23:47 1997
|
||||
// Author: Sergey RUIN
|
||||
|
||||
|
||||
#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 <AIS_Drawer.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 DEB
|
||||
cout << "AISPresentationStorageDriver " << "storaged DriverGUID ==> " << guid->Convert() << endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
39
src/MPrsStd/MPrsStd_PositionRetrievalDriver.cdl
Executable file
39
src/MPrsStd/MPrsStd_PositionRetrievalDriver.cdl
Executable file
@@ -0,0 +1,39 @@
|
||||
-- File: MPrsStd_PositionRetrievalDriver.cdl
|
||||
-- Created: Tue Apr 7 14:58:29 1998
|
||||
-- Author: Jean-Pierre COMBE
|
||||
-- <jpr@chariox.paris1.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1998
|
||||
|
||||
class PositionRetrievalDriver from MPrsStd inherits ARDriver from MDF
|
||||
---Purpose:
|
||||
|
||||
|
||||
|
||||
uses RRelocationTable from MDF,
|
||||
Attribute from PDF,
|
||||
Attribute from TDF,
|
||||
MessageDriver from CDM
|
||||
|
||||
is
|
||||
|
||||
|
||||
Create(theMessageDriver : MessageDriver from CDM) -- Version 0
|
||||
returns mutable 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 mutable Attribute from TDF;
|
||||
|
||||
|
||||
Paste(me;
|
||||
Source : Attribute from PDF;
|
||||
Target : mutable Attribute from TDF;
|
||||
RelocTable : RRelocationTable from MDF);
|
||||
|
||||
end PositionRetrievalDriver;
|
53
src/MPrsStd/MPrsStd_PositionRetrievalDriver.cxx
Executable file
53
src/MPrsStd/MPrsStd_PositionRetrievalDriver.cxx
Executable file
@@ -0,0 +1,53 @@
|
||||
// File: MPrsStd_PositionRetrievalDriver.cxx
|
||||
// Created: Tue Apr 7 15:01:52 1998
|
||||
// Author: Jean-Pierre COMBE
|
||||
// <jpr>
|
||||
|
||||
|
||||
#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());
|
||||
}
|
||||
|
40
src/MPrsStd/MPrsStd_PositionStorageDriver.cdl
Executable file
40
src/MPrsStd/MPrsStd_PositionStorageDriver.cdl
Executable file
@@ -0,0 +1,40 @@
|
||||
-- File: MPrsStd_PositionStorageDriver.cdl
|
||||
-- Created: Tue Apr 7 14:57:33 1998
|
||||
-- Author: Jean-Pierre COMBE
|
||||
-- <jpr@chariox.paris1.matra-dtv.fr>
|
||||
---Copyright: Matra Datavision 1998
|
||||
|
||||
class PositionStorageDriver from MPrsStd inherits ASDriver from MDF
|
||||
|
||||
---Purpose:
|
||||
|
||||
uses SRelocationTable from MDF,
|
||||
Attribute from TDF,
|
||||
Attribute from PDF,
|
||||
MessageDriver from CDM
|
||||
|
||||
|
||||
is
|
||||
|
||||
Create(theMessageDriver : MessageDriver from CDM)
|
||||
returns mutable 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 mutable Attribute from PDF;
|
||||
|
||||
|
||||
Paste(me;
|
||||
Source : Attribute from TDF;
|
||||
Target : mutable Attribute from PDF;
|
||||
RelocTable : SRelocationTable from MDF);
|
||||
|
||||
|
||||
end PositionStorageDriver;
|
||||
|
55
src/MPrsStd/MPrsStd_PositionStorageDriver.cxx
Executable file
55
src/MPrsStd/MPrsStd_PositionStorageDriver.cxx
Executable file
@@ -0,0 +1,55 @@
|
||||
// File: MPrsStd_PositionStorageDriver.cxx
|
||||
// Created: Tue Apr 7 14:59:53 1998
|
||||
// Author: Jean-Pierre COMBE
|
||||
// <jpr>
|
||||
|
||||
|
||||
#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());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user