+++ /dev/null
-// Created on: 2004-05-17
-// Created by: Sergey ZARITCHNY
-// Copyright (c) 2004-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BinMDF_ADriverTable.hxx>
-#include <BinMPrsStd.hxx>
-#include <BinMPrsStd_AISPresentationDriver.hxx>
-#include <BinMPrsStd_PositionDriver.hxx>
-#include <CDM_MessageDriver.hxx>
-
-//=======================================================================
-//function : AddDrivers
-//purpose :
-//=======================================================================
-void BinMPrsStd::AddDrivers (const Handle(BinMDF_ADriverTable)& aDriverTable,
- const Handle(CDM_MessageDriver)& aMessageDriver)
-{
- aDriverTable->AddDriver (new BinMPrsStd_AISPresentationDriver(aMessageDriver));
- aDriverTable->AddDriver (new BinMPrsStd_PositionDriver(aMessageDriver));
-}
+++ /dev/null
-// Created on: 2004-05-17
-// Created by: Sergey ZARITCHNY <szy@opencascade.com>
-// Copyright (c) 2004-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _BinMPrsStd_HeaderFile
-#define _BinMPrsStd_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-class BinMDF_ADriverTable;
-class CDM_MessageDriver;
-class BinMPrsStd_AISPresentationDriver;
-class BinMPrsStd_PositionDriver;
-
-
-
-class BinMPrsStd
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
- //! Adds the attribute storage-retrieval driver to <theDriverTable>.
- Standard_EXPORT static void AddDrivers (const Handle(BinMDF_ADriverTable)& theDriverTable, const Handle(CDM_MessageDriver)& theMessageDriver);
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
-friend class BinMPrsStd_AISPresentationDriver;
-friend class BinMPrsStd_PositionDriver;
-
-};
-
-
-
-
-
-
-
-#endif // _BinMPrsStd_HeaderFile
+++ /dev/null
-// Created on: 2004-05-17
-// Created by: Sergey ZARITCHNY
-// Copyright (c) 2004-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <BinMPrsStd_AISPresentationDriver.hxx>
-#include <BinObjMgt_Persistent.hxx>
-#include <CDM_MessageDriver.hxx>
-#include <Graphic3d_NameOfMaterial.hxx>
-#include <Quantity_NameOfColor.hxx>
-#include <Standard_Type.hxx>
-#include <TDF_Attribute.hxx>
-#include <TPrsStd_AISPresentation.hxx>
-
-//=======================================================================
-//function : BinMDataStd_AISPresentationDriver
-//purpose : Constructor
-//=======================================================================
-BinMPrsStd_AISPresentationDriver::BinMPrsStd_AISPresentationDriver
- (const Handle(CDM_MessageDriver)& theMsgDriver)
- : BinMDF_ADriver (theMsgDriver, STANDARD_TYPE(TPrsStd_AISPresentation)->Name())
-{
-}
-
-//=======================================================================
-//function : NewEmpty
-//purpose :
-//=======================================================================
-
-Handle(TDF_Attribute) BinMPrsStd_AISPresentationDriver::NewEmpty() const
-{
- return new TPrsStd_AISPresentation();
-}
-
-//=======================================================================
-//function : Paste
-//purpose : persistent -> transient (retrieve)
-//=======================================================================
-
-Standard_Boolean BinMPrsStd_AISPresentationDriver::Paste
- (const BinObjMgt_Persistent& theSource,
- const Handle(TDF_Attribute)& theTarget,
- BinObjMgt_RRelocationTable& ) const
-{
- Handle(TPrsStd_AISPresentation) anAtt = Handle(TPrsStd_AISPresentation)::DownCast(theTarget);
- Standard_Integer aValue;
-//Display status
- Standard_Boolean ok = theSource >> aValue;
- if (!ok) return ok;
- anAtt->SetDisplayed((Standard_Boolean)aValue);
-
-//GUID
- Standard_GUID aGUID;
- ok = theSource >> aGUID;
- if (!ok) return ok;
- anAtt->SetDriverGUID(aGUID);
-
-//Color
- ok = theSource >> aValue;
- if (!ok) return ok;
- if(aValue != -1) anAtt->SetColor( (Quantity_NameOfColor)(aValue) );
- else anAtt->UnsetColor();
-
-//Material
- ok = theSource >> aValue;
- if (!ok) return ok;
- if(aValue != -1) anAtt->SetMaterial( (Graphic3d_NameOfMaterial)(aValue) );
- else anAtt->UnsetMaterial();
-
-//Transparency
- Standard_Real aRValue;
- ok = theSource >> aRValue;
- if (!ok) return ok;
- if(aRValue != -1.) anAtt->SetTransparency(aRValue);
- else anAtt->UnsetTransparency();
-
-//Width
- ok = theSource >> aRValue;
- if (!ok) return ok;
- if(aRValue != -1.) anAtt->SetWidth( aRValue );
- else anAtt->UnsetWidth();
-
-//Mode
- ok = theSource >> aValue;
- if (!ok) return ok;
- if(aValue != -1) anAtt->SetMode(aValue);
- else anAtt->UnsetMode();
-
- return ok;
-}
-
-//=======================================================================
-//function : Paste
-//purpose : transient -> persistent (store)
-//=======================================================================
-
-void BinMPrsStd_AISPresentationDriver::Paste (const Handle(TDF_Attribute)& theSource,
- BinObjMgt_Persistent& theTarget,
- BinObjMgt_SRelocationTable& ) const
-{
- Handle(TPrsStd_AISPresentation) anAtt = Handle(TPrsStd_AISPresentation)::DownCast(theSource);
-//1
- theTarget.PutBoolean(anAtt->IsDisplayed());//Bool
-//2
- theTarget.PutGUID(anAtt->GetDriverGUID());//GUID
-//3
- if(anAtt->HasOwnColor())
- theTarget.PutInteger((Standard_Integer)anAtt->Color());//Color
- else theTarget.PutInteger(-1);
-//4
- if(anAtt->HasOwnMaterial())
- theTarget.PutInteger((Standard_Integer)anAtt->Material());
- else theTarget.PutInteger(-1);
-//5
- if(anAtt->HasOwnTransparency())
- theTarget.PutReal(anAtt->Transparency()); //Real
- else theTarget.PutReal(-1.);
-//6
- if(anAtt->HasOwnWidth())
- theTarget.PutReal(anAtt->Width());// Real
- else theTarget.PutReal(-1.);
-//7
- if(anAtt->HasOwnMode())
- theTarget.PutInteger(anAtt->Mode()); //Int
- else theTarget.PutInteger(-1);
-}
+++ /dev/null
-// Created on: 2004-05-17
-// Created by: Sergey ZARITCHNY <szy@opencascade.com>
-// Copyright (c) 2004-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _BinMPrsStd_AISPresentationDriver_HeaderFile
-#define _BinMPrsStd_AISPresentationDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-class CDM_MessageDriver;
-class TDF_Attribute;
-class BinObjMgt_Persistent;
-
-
-class BinMPrsStd_AISPresentationDriver;
-DEFINE_STANDARD_HANDLE(BinMPrsStd_AISPresentationDriver, BinMDF_ADriver)
-
-//! AISPresentation Attribute Driver.
-class BinMPrsStd_AISPresentationDriver : public BinMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT BinMPrsStd_AISPresentationDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
-
- Standard_EXPORT Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const;
-
-
-
-
- DEFINE_STANDARD_RTTI(BinMPrsStd_AISPresentationDriver,BinMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _BinMPrsStd_AISPresentationDriver_HeaderFile
+++ /dev/null
-// Created on: 2004-05-17
-// Created by: Sergey ZARITCHNY <szy@opencascade.com>
-// Copyright (c) 2004-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _BinMPrsStd_PositionDriver_HeaderFile
-#define _BinMPrsStd_PositionDriver_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
-#include <BinMDF_ADriver.hxx>
-#include <Standard_Boolean.hxx>
-#include <BinObjMgt_RRelocationTable.hxx>
-#include <BinObjMgt_SRelocationTable.hxx>
-class CDM_MessageDriver;
-class TDF_Attribute;
-class BinObjMgt_Persistent;
-
-
-class BinMPrsStd_PositionDriver;
-DEFINE_STANDARD_HANDLE(BinMPrsStd_PositionDriver, BinMDF_ADriver)
-
-//! Position Attribute Driver.
-class BinMPrsStd_PositionDriver : public BinMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT BinMPrsStd_PositionDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
-
- Standard_EXPORT Standard_Boolean Paste (const BinObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, BinObjMgt_RRelocationTable& RelocTable) const;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, BinObjMgt_Persistent& Target, BinObjMgt_SRelocationTable& RelocTable) const;
-
-
-
-
- DEFINE_STANDARD_RTTI(BinMPrsStd_PositionDriver,BinMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _BinMPrsStd_PositionDriver_HeaderFile
+++ /dev/null
-BinMPrsStd.cxx
-BinMPrsStd.hxx
-BinMPrsStd_AISPresentationDriver.cxx
-BinMPrsStd_AISPresentationDriver.hxx
-BinMPrsStd_PositionDriver.cxx
-BinMPrsStd_PositionDriver.hxx
set (TOOLKIT_MODULES
BinDrivers
BinMDataXtd
- BinMPrsStd
BinMNaming
)
XmlDrivers
XmlMDataXtd
XmlMNaming
- XmlMPrsStd
)
OCCT_INCLUDE_CMAKE_FILE (adm/cmake/occt_toolkit)
#include <Standard_Type.hxx>
#include <TDataXtd_Position.hxx>
#include <TDF_Attribute.hxx>
-#include <XmlMPrsStd_PositionDriver.hxx>
#include <XmlObjMgt.hxx>
#include <XmlObjMgt_Persistent.hxx>
#include <Standard_Type.hxx>
#include <TDF_Attribute.hxx>
#include <TPrsStd_AISPresentation.hxx>
-#include <XmlMPrsStd_AISPresentationDriver.hxx>
#include <XmlObjMgt.hxx>
#include <XmlObjMgt_Persistent.hxx>
+++ /dev/null
-XmlMPrsStd.cxx
-XmlMPrsStd.hxx
-XmlMPrsStd_AISPresentationDriver.cxx
-XmlMPrsStd_AISPresentationDriver.hxx
-XmlMPrsStd_PositionDriver.cxx
-XmlMPrsStd_PositionDriver.hxx
+++ /dev/null
-// Created on: 2001-07-09
-// Created by: Julia DOROVSKIKH
-// Copyright (c) 2001-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <CDM_MessageDriver.hxx>
-#include <XmlMDF_ADriverTable.hxx>
-#include <XmlMPrsStd.hxx>
-#include <XmlMPrsStd_AISPresentationDriver.hxx>
-#include <XmlMPrsStd_PositionDriver.hxx>
-
-///=======================================================================
-//function : AddDrivers
-//purpose :
-//=======================================================================
-void XmlMPrsStd::AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable,
- const Handle(CDM_MessageDriver)& aMessageDriver)
-{
- aDriverTable->AddDriver(new XmlMPrsStd_PositionDriver(aMessageDriver));
- aDriverTable->AddDriver(new XmlMPrsStd_AISPresentationDriver(aMessageDriver));
-}
+++ /dev/null
-// Created on: 2001-07-09
-// Created by: Julia DOROVSKIKH
-// Copyright (c) 2001-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef _XmlMPrsStd_HeaderFile
-#define _XmlMPrsStd_HeaderFile
-
-#include <Standard.hxx>
-#include <Standard_DefineAlloc.hxx>
-#include <Standard_Handle.hxx>
-
-class XmlMDF_ADriverTable;
-class CDM_MessageDriver;
-class XmlMPrsStd_PositionDriver;
-class XmlMPrsStd_AISPresentationDriver;
-
-
-
-class XmlMPrsStd
-{
-public:
-
- DEFINE_STANDARD_ALLOC
-
-
- //! Adds the attribute storage drivers to <aDriverTable>.
- Standard_EXPORT static void AddDrivers (const Handle(XmlMDF_ADriverTable)& aDriverTable, const Handle(CDM_MessageDriver)& theMessageDriver);
-
-
-
-
-protected:
-
-
-
-
-
-private:
-
-
-
-
-friend class XmlMPrsStd_PositionDriver;
-friend class XmlMPrsStd_AISPresentationDriver;
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMPrsStd_HeaderFile
+++ /dev/null
-// 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.
-
-#ifndef _XmlMPrsStd_AISPresentationDriver_HeaderFile
-#define _XmlMPrsStd_AISPresentationDriver_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 XmlMPrsStd_AISPresentationDriver;
-DEFINE_STANDARD_HANDLE(XmlMPrsStd_AISPresentationDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMPrsStd_AISPresentationDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMPrsStd_AISPresentationDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const;
-
-
-
-
- DEFINE_STANDARD_RTTI(XmlMPrsStd_AISPresentationDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMPrsStd_AISPresentationDriver_HeaderFile
+++ /dev/null
-// 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.
-
-#ifndef _XmlMPrsStd_PositionDriver_HeaderFile
-#define _XmlMPrsStd_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 XmlMPrsStd_PositionDriver;
-DEFINE_STANDARD_HANDLE(XmlMPrsStd_PositionDriver, XmlMDF_ADriver)
-
-//! Attribute Driver.
-class XmlMPrsStd_PositionDriver : public XmlMDF_ADriver
-{
-
-public:
-
-
- Standard_EXPORT XmlMPrsStd_PositionDriver(const Handle(CDM_MessageDriver)& theMessageDriver);
-
- Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
-
- Standard_EXPORT Standard_Boolean Paste (const XmlObjMgt_Persistent& Source, const Handle(TDF_Attribute)& Target, XmlObjMgt_RRelocationTable& RelocTable) const;
-
- Standard_EXPORT void Paste (const Handle(TDF_Attribute)& Source, XmlObjMgt_Persistent& Target, XmlObjMgt_SRelocationTable& RelocTable) const;
-
-
-
-
- DEFINE_STANDARD_RTTI(XmlMPrsStd_PositionDriver,XmlMDF_ADriver)
-
-protected:
-
-
-
-
-private:
-
-
-
-
-};
-
-
-
-
-
-
-
-#endif // _XmlMPrsStd_PositionDriver_HeaderFile