mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0026290: It is neccessary to separate visualization part from TKCAF
- Package TPrsStd is moved into new toolkit TKVCAF. This is the only toolkit in OCAF that depends on visualization libraries. - All persistent data stored in TPrsStd_AISPresentation attribute are moved to new attribute TDataXtd_Presentation, which is maintained automatically on the same label as TPrsStd_AISPresentation. All parameters used by TPrsStd_AISPresentation are stored in corresponding TDataXtd_Presentation attribute. - TPrsStd_AISPresentation is not stored in file any more; when OCAF document is loaded from a file, these attributes are created at all labels where TDataXtd_Presentation attribute is located, by TPrsStd_AISViewer::New(). - File src/StdResources/MigrationSheet.txt necessary for reading files written by previous versions of OCCT (lost in one of previous integrations) is restored and updated as necessary to handle this change (defines replacement of TPrsStd_AISPresentation by TDataXtd_Presentation). Environment variable CSF_MIGRATION_TYPES should be defined, pointing to this file. - Packages BinMPrsStd and XmlMPrsStd are removed; their drivers are moved into BinMDataXtd and XmlMDataXtd respectively. - Version numbers of BinOCAF and XmlOCAF formats are increased, new files cannot be read by previous versions of OCCT - New tests added - Adding new TKVCAF toolkit in sample projects - Restore IsDisplayed(false) in TPrsStd_AISPresentation::Erase()
This commit is contained in:
@@ -16,3 +16,7 @@ XmlMDataXtd_PointDriver.cxx
|
||||
XmlMDataXtd_PointDriver.hxx
|
||||
XmlMDataXtd_ShapeDriver.cxx
|
||||
XmlMDataXtd_ShapeDriver.hxx
|
||||
XmlMDataXtd_PositionDriver.hxx
|
||||
XmlMDataXtd_PositionDriver.cxx
|
||||
XmlMDataXtd_PresentationDriver.hxx
|
||||
XmlMDataXtd_PresentationDriver.cxx
|
||||
|
@@ -27,6 +27,9 @@
|
||||
#include <XmlMDataXtd_ShapeDriver.hxx>
|
||||
#include <XmlMDF_ADriverTable.hxx>
|
||||
|
||||
#include <XmlMDataXtd_PresentationDriver.hxx>
|
||||
#include <XmlMDataXtd_PositionDriver.hxx>
|
||||
|
||||
static Standard_Integer myDocumentVersion = -1;
|
||||
//=======================================================================
|
||||
//function : AddDrivers
|
||||
@@ -35,14 +38,17 @@ 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_PresentationDriver (anMsgDrv));
|
||||
aDriverTable->AddDriver(new XmlMDataXtd_PositionDriver (anMsgDrv));
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
129
src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx
Normal file
129
src/XmlMDataXtd/XmlMDataXtd_PositionDriver.cxx
Normal file
@@ -0,0 +1,129 @@
|
||||
// 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.hxx>
|
||||
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TDataXtd_Position.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <XmlObjMgt.hxx>
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(XmlMDataXtd_PositionDriver,XmlMDF_ADriver)
|
||||
|
||||
//=======================================================================
|
||||
//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);
|
||||
}
|
||||
}
|
67
src/XmlMDataXtd/XmlMDataXtd_PositionDriver.hxx
Normal file
67
src/XmlMDataXtd/XmlMDataXtd_PositionDriver.hxx
Normal file
@@ -0,0 +1,67 @@
|
||||
// Created on: 2001-08-24
|
||||
// Created by: Alexander GRIGORIEV
|
||||
// Copyright (c) 2001-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XmlMDataXtd_PositionDriver_HeaderFile
|
||||
#define _XmlMDataXtd_PositionDriver_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <XmlMDF_ADriver.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <XmlObjMgt_RRelocationTable.hxx>
|
||||
#include <XmlObjMgt_SRelocationTable.hxx>
|
||||
class CDM_MessageDriver;
|
||||
class TDF_Attribute;
|
||||
class XmlObjMgt_Persistent;
|
||||
|
||||
|
||||
class XmlMDataXtd_PositionDriver;
|
||||
DEFINE_STANDARD_HANDLE(XmlMDataXtd_PositionDriver, XmlMDF_ADriver)
|
||||
|
||||
|
||||
//! Attribute Driver.
|
||||
class XmlMDataXtd_PositionDriver : public XmlMDF_ADriver
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT XmlMDataXtd_PositionDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
|
||||
|
||||
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(XmlMDataXtd_PositionDriver, XmlMDF_ADriver)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
245
src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cxx
Normal file
245
src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.cxx
Normal file
@@ -0,0 +1,245 @@
|
||||
// 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.hxx>
|
||||
|
||||
#include <CDM_MessageDriver.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <XmlObjMgt.hxx>
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
|
||||
#include <TDataXtd_Presentation.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(XmlMDataXtd_PresentationDriver,XmlMDF_ADriver)
|
||||
|
||||
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((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->SetMaterialIndex(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->HasOwnColor())
|
||||
{
|
||||
aNb = aTPrs->Color();
|
||||
theTarget.Element().setAttribute(::ColorString(), aNb);
|
||||
}
|
||||
|
||||
// material
|
||||
if (aTPrs->HasOwnMaterial())
|
||||
{
|
||||
aNb = aTPrs->MaterialIndex();
|
||||
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
|
||||
}
|
66
src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.hxx
Normal file
66
src/XmlMDataXtd/XmlMDataXtd_PresentationDriver.hxx
Normal file
@@ -0,0 +1,66 @@
|
||||
// Created on: 2001-08-24
|
||||
// Created by: Alexander GRIGORIEV
|
||||
// Copyright (c) 2001-2014 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _XmlMDataXtd_PresentationDriver_HeaderFile
|
||||
#define _XmlMDataXtd_PresentationDriver_HeaderFile
|
||||
|
||||
#include <Standard.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
|
||||
#include <XmlMDF_ADriver.hxx>
|
||||
#include <Standard_Boolean.hxx>
|
||||
#include <XmlObjMgt_RRelocationTable.hxx>
|
||||
#include <XmlObjMgt_SRelocationTable.hxx>
|
||||
class CDM_MessageDriver;
|
||||
class TDF_Attribute;
|
||||
class XmlObjMgt_Persistent;
|
||||
|
||||
|
||||
class XmlMDataXtd_PresentationDriver;
|
||||
DEFINE_STANDARD_HANDLE(XmlMDataXtd_PresentationDriver, XmlMDF_ADriver)
|
||||
|
||||
//! Attribute Driver.
|
||||
class XmlMDataXtd_PresentationDriver : public XmlMDF_ADriver
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT XmlMDataXtd_PresentationDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
|
||||
|
||||
Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const Standard_OVERRIDE;
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(XmlMDataXtd_PresentationDriver, XmlMDF_ADriver)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user