mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0028044: Data Exchange - implement data structures for Saved Views
Add new root label in Document for Views. Add new attribute to store View in XDE. Add object and tool to process Views. Add new Draw commands for Views.
This commit is contained in:
@@ -29,5 +29,7 @@ XmlMXCAFDoc_MaterialToolDriver.cxx
|
||||
XmlMXCAFDoc_MaterialToolDriver.hxx
|
||||
XmlMXCAFDoc_ShapeToolDriver.cxx
|
||||
XmlMXCAFDoc_ShapeToolDriver.hxx
|
||||
XmlMXCAFDoc_ViewToolDriver.cxx
|
||||
XmlMXCAFDoc_ViewToolDriver.hxx
|
||||
XmlMXCAFDoc_VolumeDriver.cxx
|
||||
XmlMXCAFDoc_VolumeDriver.hxx
|
||||
|
@@ -33,6 +33,7 @@
|
||||
#include <XmlMXCAFDoc_MaterialDriver.hxx>
|
||||
#include <XmlMXCAFDoc_MaterialToolDriver.hxx>
|
||||
#include <XmlMXCAFDoc_ShapeToolDriver.hxx>
|
||||
#include <XmlMXCAFDoc_ViewToolDriver.hxx>
|
||||
#include <XmlMXCAFDoc_VolumeDriver.hxx>
|
||||
|
||||
//=======================================================================
|
||||
@@ -71,4 +72,5 @@ void XmlMXCAFDoc::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable,
|
||||
aDriverTable -> AddDriver (new XmlMXCAFDoc_ShapeToolDriver (anMsgDrv));
|
||||
aDriverTable -> AddDriver (new XmlMXCAFDoc_DimTolToolDriver (anMsgDrv));
|
||||
aDriverTable -> AddDriver (new XmlMXCAFDoc_MaterialToolDriver (anMsgDrv));
|
||||
aDriverTable -> AddDriver (new XmlMXCAFDoc_ViewToolDriver (anMsgDrv));
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@ class XmlMXCAFDoc_LayerToolDriver;
|
||||
class XmlMXCAFDoc_ShapeToolDriver;
|
||||
class XmlMXCAFDoc_DimTolToolDriver;
|
||||
class XmlMXCAFDoc_MaterialToolDriver;
|
||||
class XmlMXCAFDoc_ViewToolDriver;
|
||||
|
||||
|
||||
//! Storage and Retrieval drivers for modelling attributes.
|
||||
@@ -80,6 +81,7 @@ friend class XmlMXCAFDoc_LayerToolDriver;
|
||||
friend class XmlMXCAFDoc_ShapeToolDriver;
|
||||
friend class XmlMXCAFDoc_DimTolToolDriver;
|
||||
friend class XmlMXCAFDoc_MaterialToolDriver;
|
||||
friend class XmlMXCAFDoc_ViewToolDriver;
|
||||
|
||||
};
|
||||
|
||||
|
64
src/XmlMXCAFDoc/XmlMXCAFDoc_ViewToolDriver.cxx
Normal file
64
src/XmlMXCAFDoc/XmlMXCAFDoc_ViewToolDriver.cxx
Normal file
@@ -0,0 +1,64 @@
|
||||
// Created on: 2016-10-24
|
||||
// Created by: Irina KRYLOVA
|
||||
// Copyright (c) 2016 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 <CDM_MessageDriver.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <TDF_Attribute.hxx>
|
||||
#include <XCAFDoc_ViewTool.hxx>
|
||||
#include <XmlMXCAFDoc_ViewToolDriver.hxx>
|
||||
#include <XmlObjMgt_Persistent.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(XmlMXCAFDoc_ViewToolDriver, XmlMDF_ADriver)
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
XmlMXCAFDoc_ViewToolDriver::XmlMXCAFDoc_ViewToolDriver
|
||||
(const Handle(CDM_MessageDriver)& theMsgDriver)
|
||||
: XmlMDF_ADriver (theMsgDriver, "xcaf", "ViewTool")
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Handle(TDF_Attribute) XmlMXCAFDoc_ViewToolDriver::NewEmpty() const
|
||||
{
|
||||
return new XCAFDoc_ViewTool();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
Standard_Boolean XmlMXCAFDoc_ViewToolDriver::Paste(const XmlObjMgt_Persistent& ,
|
||||
const Handle(TDF_Attribute)& ,
|
||||
XmlObjMgt_RRelocationTable& ) const
|
||||
{
|
||||
return Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void XmlMXCAFDoc_ViewToolDriver::Paste(const Handle(TDF_Attribute)& ,
|
||||
XmlObjMgt_Persistent& ,
|
||||
XmlObjMgt_SRelocationTable& ) const
|
||||
{
|
||||
}
|
52
src/XmlMXCAFDoc/XmlMXCAFDoc_ViewToolDriver.hxx
Normal file
52
src/XmlMXCAFDoc/XmlMXCAFDoc_ViewToolDriver.hxx
Normal file
@@ -0,0 +1,52 @@
|
||||
// Created on: 2016-10-24
|
||||
// Created by: Irina KRYLOVA
|
||||
// Copyright (c) 2016 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 _XmlMXCAFDoc_ViewToolDriver_HeaderFile
|
||||
#define _XmlMXCAFDoc_ViewToolDriver_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 XmlMXCAFDoc_ViewToolDriver;
|
||||
DEFINE_STANDARD_HANDLE(XmlMXCAFDoc_ViewToolDriver, XmlMDF_ADriver)
|
||||
|
||||
//! Attribute Driver.
|
||||
class XmlMXCAFDoc_ViewToolDriver : public XmlMDF_ADriver
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT XmlMXCAFDoc_ViewToolDriver(const Handle(CDM_MessageDriver)& theMsgDriver);
|
||||
|
||||
Standard_EXPORT virtual Handle(TDF_Attribute) NewEmpty() const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean Paste (const XmlObjMgt_Persistent& theSource, const Handle(TDF_Attribute)& theTarget, XmlObjMgt_RRelocationTable& theRelocTable) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual void Paste (const Handle(TDF_Attribute)& theSource, XmlObjMgt_Persistent& theTarget, XmlObjMgt_SRelocationTable& theRelocTable) const Standard_OVERRIDE;
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(XmlMXCAFDoc_ViewToolDriver, XmlMDF_ADriver)
|
||||
};
|
||||
|
||||
#endif // _XmlMXCAFDoc_ViewToolDriver_HeaderFile
|
Reference in New Issue
Block a user