From 91ee29466b213fe4365b1f709bc0db7a24e0536f Mon Sep 17 00:00:00 2001 From: vsr Date: Tue, 21 Oct 2014 16:57:17 +0400 Subject: [PATCH] Remove obsolete staff; redesign Handle-based and CDL-generated classes --- src/GuiHelpers/SALOME_AppStudyEditor.cxx | 1 - src/LightApp/LightApp_Module.cxx | 3 +- src/LightApp/LightApp_SelectionMgr.cxx | 1 - src/LightApp/LightApp_ShowHideOp.cxx | 1 - src/LightApp/LightApp_VTKSelector.cxx | 2 +- src/OBJECT/CMakeLists.txt | 17 -- src/OBJECT/Handle_SALOME_AISObject.hxx | 108 ------------- src/OBJECT/Handle_SALOME_AISShape.hxx | 112 ------------- ...E_DataMapNodeOfDataMapOfIOMapOfInteger.hxx | 100 ------------ src/OBJECT/Handle_SALOME_Filter.hxx | 108 ------------- .../Handle_SALOME_InteractiveObject.hxx | 104 ------------ src/OBJECT/Handle_SALOME_ListNodeOfListIO.hxx | 104 ------------ src/OBJECT/Handle_SALOME_TypeFilter.hxx | 108 ------------- src/OBJECT/SALOME_AISObject.cxx | 15 +- src/OBJECT/SALOME_AISObject.hxx | 103 ++---------- src/OBJECT/SALOME_AISObject.ixx | 87 ---------- src/OBJECT/SALOME_AISObject.jxx | 32 ---- src/OBJECT/SALOME_AISShape.cxx | 14 +- src/OBJECT/SALOME_AISShape.hxx | 118 +++----------- src/OBJECT/SALOME_AISShape.ixx | 91 ----------- src/OBJECT/SALOME_AISShape.jxx | 35 ---- ...taMapIteratorOfDataMapOfIOMapOfInteger.hxx | 116 ------------- ...MapIteratorOfDataMapOfIOMapOfInteger_0.cxx | 63 -------- ...E_DataMapNodeOfDataMapOfIOMapOfInteger.hxx | 153 ------------------ ...DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx | 132 --------------- src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx | 104 +----------- .../SALOME_DataMapOfIOMapOfInteger_0.cxx | 66 -------- src/OBJECT/SALOME_Filter.cxx | 14 +- src/OBJECT/SALOME_Filter.hxx | 93 ++--------- src/OBJECT/SALOME_Filter.ixx | 81 ---------- src/OBJECT/SALOME_Filter.jxx | 29 ---- src/OBJECT/SALOME_InteractiveObject.cxx | 79 +++++---- src/OBJECT/SALOME_InteractiveObject.hxx | 148 +++++------------ src/OBJECT/SALOME_InteractiveObject.ixx | 81 ---------- src/OBJECT/SALOME_InteractiveObject.jxx | 29 ---- src/OBJECT/SALOME_ListIO.hxx | 151 +---------------- src/OBJECT/SALOME_ListIO_0.cxx | 52 ------ src/OBJECT/SALOME_ListIteratorOfListIO.hxx | 139 ---------------- src/OBJECT/SALOME_ListIteratorOfListIO_0.cxx | 56 ------- src/OBJECT/SALOME_ListNodeOfListIO.hxx | 137 ---------------- src/OBJECT/SALOME_ListNodeOfListIO_0.cxx | 120 -------------- src/OBJECT/SALOME_Selection.h | 25 ++- src/OBJECT/SALOME_TypeFilter.cxx | 29 ++-- src/OBJECT/SALOME_TypeFilter.hxx | 96 ++--------- src/OBJECT/SALOME_TypeFilter.ixx | 83 ---------- src/OBJECT/SALOME_TypeFilter.jxx | 29 ---- src/OCCViewer/OCCViewer_VService.h | 6 +- src/SALOME_SWIG/SALOMEGUI_Swig.cxx | 1 - src/SPlot2d/SPlot2d_Curve.h | 7 +- src/SPlot2d/SPlot2d_Histogram.h | 5 - src/SPlot2d/SPlot2d_ViewModel.cxx | 1 - src/SVTK/SVTK_View.cxx | 2 +- src/SVTK/SVTK_ViewWindow.cxx | 2 +- src/SalomeApp/SalomeApp_Application.cxx | 1 - src/SalomeApp/SalomeApp_Module.cxx | 1 - src/ViewerData/ViewerData_AISShape.cxx | 17 ++ src/ViewerData/ViewerData_AISShape.hxx | 23 ++- 57 files changed, 275 insertions(+), 3160 deletions(-) delete mode 100755 src/OBJECT/Handle_SALOME_AISObject.hxx delete mode 100755 src/OBJECT/Handle_SALOME_AISShape.hxx delete mode 100644 src/OBJECT/Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx delete mode 100644 src/OBJECT/Handle_SALOME_Filter.hxx delete mode 100755 src/OBJECT/Handle_SALOME_InteractiveObject.hxx delete mode 100644 src/OBJECT/Handle_SALOME_ListNodeOfListIO.hxx delete mode 100644 src/OBJECT/Handle_SALOME_TypeFilter.hxx delete mode 100755 src/OBJECT/SALOME_AISObject.ixx delete mode 100755 src/OBJECT/SALOME_AISObject.jxx delete mode 100755 src/OBJECT/SALOME_AISShape.ixx delete mode 100755 src/OBJECT/SALOME_AISShape.jxx delete mode 100644 src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx delete mode 100644 src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx delete mode 100644 src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx delete mode 100644 src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx delete mode 100644 src/OBJECT/SALOME_DataMapOfIOMapOfInteger_0.cxx delete mode 100644 src/OBJECT/SALOME_Filter.ixx delete mode 100644 src/OBJECT/SALOME_Filter.jxx delete mode 100755 src/OBJECT/SALOME_InteractiveObject.ixx delete mode 100755 src/OBJECT/SALOME_InteractiveObject.jxx delete mode 100644 src/OBJECT/SALOME_ListIO_0.cxx delete mode 100644 src/OBJECT/SALOME_ListIteratorOfListIO.hxx delete mode 100644 src/OBJECT/SALOME_ListIteratorOfListIO_0.cxx delete mode 100644 src/OBJECT/SALOME_ListNodeOfListIO.hxx delete mode 100644 src/OBJECT/SALOME_ListNodeOfListIO_0.cxx delete mode 100644 src/OBJECT/SALOME_TypeFilter.ixx delete mode 100644 src/OBJECT/SALOME_TypeFilter.jxx diff --git a/src/GuiHelpers/SALOME_AppStudyEditor.cxx b/src/GuiHelpers/SALOME_AppStudyEditor.cxx index 68ffc421d..a0ac7534c 100644 --- a/src/GuiHelpers/SALOME_AppStudyEditor.cxx +++ b/src/GuiHelpers/SALOME_AppStudyEditor.cxx @@ -24,7 +24,6 @@ #include #include #include -#include SALOME_AppStudyEditor::SALOME_AppStudyEditor(SalomeApp_Application * salomeApp) : SALOME_StudyEditor() diff --git a/src/LightApp/LightApp_Module.cxx b/src/LightApp/LightApp_Module.cxx index 45954c382..350dffc83 100644 --- a/src/LightApp/LightApp_Module.cxx +++ b/src/LightApp/LightApp_Module.cxx @@ -53,7 +53,6 @@ #ifndef DISABLE_SALOMEOBJECT #include -#include #endif #ifndef DISABLE_VTKVIEWER @@ -203,7 +202,7 @@ bool LightApp_Module::isSelectionCompatible() // check data type of selection SALOME_ListIteratorOfListIO It( selected ); for ( ; isCompatible && It.More(); It.Next()) { - Handle(SALOME_InteractiveObject)& io = It.Value(); + Handle(SALOME_InteractiveObject) io = It.Value(); isCompatible = ( aStudy->componentDataType( io->getEntry() ) == moduleDataType ); } } diff --git a/src/LightApp/LightApp_SelectionMgr.cxx b/src/LightApp/LightApp_SelectionMgr.cxx index dd304ac14..50c9de241 100644 --- a/src/LightApp/LightApp_SelectionMgr.cxx +++ b/src/LightApp/LightApp_SelectionMgr.cxx @@ -32,7 +32,6 @@ #ifndef DISABLE_SALOMEOBJECT #include - #include // Open CASCADE Include #include diff --git a/src/LightApp/LightApp_ShowHideOp.cxx b/src/LightApp/LightApp_ShowHideOp.cxx index 60828a584..2679b3bf2 100644 --- a/src/LightApp/LightApp_ShowHideOp.cxx +++ b/src/LightApp/LightApp_ShowHideOp.cxx @@ -31,7 +31,6 @@ #ifndef DISABLE_SALOMEOBJECT #include - #include #endif /*! diff --git a/src/LightApp/LightApp_VTKSelector.cxx b/src/LightApp/LightApp_VTKSelector.cxx index 79f9e735a..5ffc7b6e6 100644 --- a/src/LightApp/LightApp_VTKSelector.cxx +++ b/src/LightApp/LightApp_VTKSelector.cxx @@ -38,7 +38,7 @@ #ifndef DISABLE_SALOMEOBJECT #include "SALOME_Actor.h" - #include "SALOME_ListIteratorOfListIO.hxx" + #include "SALOME_ListIO.hxx" #endif diff --git a/src/OBJECT/CMakeLists.txt b/src/OBJECT/CMakeLists.txt index 9c0eae24c..a395603d3 100755 --- a/src/OBJECT/CMakeLists.txt +++ b/src/OBJECT/CMakeLists.txt @@ -35,23 +35,12 @@ SET(_link_LIBRARIES ${QT_LIBRARIES} ${CAS_LDPATH} ${CAS_KERNEL} ${CAS_TKV3d} Vie # header files / to install SET(SalomeObject_HEADERS - Handle_SALOME_AISObject.hxx - Handle_SALOME_AISShape.hxx - Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx - Handle_SALOME_Filter.hxx - Handle_SALOME_InteractiveObject.hxx - Handle_SALOME_ListNodeOfListIO.hxx - Handle_SALOME_TypeFilter.hxx SALOME_AISObject.hxx SALOME_AISShape.hxx - SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx - SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx SALOME_DataMapOfIOMapOfInteger.hxx SALOME_Filter.hxx SALOME_InteractiveObject.hxx SALOME_ListIO.hxx - SALOME_ListIteratorOfListIO.hxx - SALOME_ListNodeOfListIO.hxx SALOME_Selection.h SALOME_TypeFilter.hxx ) @@ -64,14 +53,8 @@ SET(SalomeObject_SOURCES SALOME_InteractiveObject.cxx SALOME_AISShape.cxx SALOME_AISObject.cxx - SALOME_ListIO_0.cxx - SALOME_ListIteratorOfListIO_0.cxx - SALOME_ListNodeOfListIO_0.cxx SALOME_Filter.cxx SALOME_TypeFilter.cxx - SALOME_DataMapOfIOMapOfInteger_0.cxx - SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx - SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx ) # --- rules --- diff --git a/src/OBJECT/Handle_SALOME_AISObject.hxx b/src/OBJECT/Handle_SALOME_AISObject.hxx deleted file mode 100755 index 8b4ea04f6..000000000 --- a/src/OBJECT/Handle_SALOME_AISObject.hxx +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : Handle_SALOME_AISObject.hxx -// Module : SALOME -// -#ifndef _Handle_SALOME_AISObject_HeaderFile -#define _Handle_SALOME_AISObject_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_AIS_InteractiveObject_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -/*! - \class Handle(AIS_InteractiveObject) - Smart pointer (handle) to AIS_InteractiveObject -*/ -class Handle(AIS_InteractiveObject); -class SALOME_AISObject; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOME_AISObject); - -/*! - \class Handle(SALOME_AISObject) - Smart pointer (handle) to SALOME_AISObject -*/ -class Handle(SALOME_AISObject) : public Handle(AIS_InteractiveObject) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(SALOME_AISObject)():Handle(AIS_InteractiveObject)() {} - Handle(SALOME_AISObject)(const Handle(SALOME_AISObject)& aHandle) : Handle(AIS_InteractiveObject)(aHandle) - { - } - - Handle(SALOME_AISObject)(const SALOME_AISObject* anItem) : Handle(AIS_InteractiveObject)((AIS_InteractiveObject *)anItem) - { - } - - Handle(SALOME_AISObject)& operator=(const Handle(SALOME_AISObject)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(SALOME_AISObject)& operator=(const SALOME_AISObject* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - SALOME_AISObject* operator->() - { - return (SALOME_AISObject *)ControlAccess(); - } - - SALOME_AISObject* operator->() const - { - return (SALOME_AISObject *)ControlAccess(); - } - - Standard_EXPORT ~Handle(SALOME_AISObject)(); - - Standard_EXPORT static const Handle(SALOME_AISObject) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/OBJECT/Handle_SALOME_AISShape.hxx b/src/OBJECT/Handle_SALOME_AISShape.hxx deleted file mode 100755 index 3067ad6d1..000000000 --- a/src/OBJECT/Handle_SALOME_AISShape.hxx +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : Handle_SALOME_AISShape.hxx -// Module : SALOME -// -#ifndef _Handle_SALOME_AISShape_HeaderFile -#define _Handle_SALOME_AISShape_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -// #ifndef _Handle_AIS_Shape_HeaderFile -// #include -// #endif -#ifndef _ViewerData_AISShape_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -/*! - \class Handle(AIS_Shape) - Smart pointer (handle) to AIS_Shape -*/ -// class Handle(AIS_Shape); -class Handle(ViewerData_AISShape); -class SALOME_AISShape; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOME_AISShape); - -/*! - \class Handle(SALOME_AISShape) - Smart pointer (handle) to SALOME_AISShape -*/ -class Handle(SALOME_AISShape) : public Handle(ViewerData_AISShape) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(SALOME_AISShape)():Handle(ViewerData_AISShape)() {} - Handle(SALOME_AISShape)(const Handle(SALOME_AISShape)& aHandle) : Handle(ViewerData_AISShape)(aHandle) - { - } - - Handle(SALOME_AISShape)(const SALOME_AISShape* anItem) : Handle(ViewerData_AISShape)((ViewerData_AISShape *)anItem) - { - } - - Handle(SALOME_AISShape)& operator=(const Handle(SALOME_AISShape)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(SALOME_AISShape)& operator=(const SALOME_AISShape* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - SALOME_AISShape* operator->() - { - return (SALOME_AISShape *)ControlAccess(); - } - - SALOME_AISShape* operator->() const - { - return (SALOME_AISShape *)ControlAccess(); - } - - Standard_EXPORT ~Handle(SALOME_AISShape)(); - - Standard_EXPORT static const Handle(SALOME_AISShape) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/OBJECT/Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx b/src/OBJECT/Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx deleted file mode 100644 index ee54d3eac..000000000 --- a/src/OBJECT/Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx -// Module : SALOME -// -#ifndef _Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile -#define _Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -class Handle(TCollection_MapNode); -class SALOME_DataMapNodeOfDataMapOfIOMapOfInteger; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger); - -class Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger) : public Handle(TCollection_MapNode) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)():Handle(TCollection_MapNode)() {} - Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)(const Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)(const SALOME_DataMapNodeOfDataMapOfIOMapOfInteger* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)& operator=(const Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)& operator=(const SALOME_DataMapNodeOfDataMapOfIOMapOfInteger* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - SALOME_DataMapNodeOfDataMapOfIOMapOfInteger* operator->() - { - return (SALOME_DataMapNodeOfDataMapOfIOMapOfInteger *)ControlAccess(); - } - - SALOME_DataMapNodeOfDataMapOfIOMapOfInteger* operator->() const - { - return (SALOME_DataMapNodeOfDataMapOfIOMapOfInteger *)ControlAccess(); - } - - Standard_EXPORT ~Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)(); - - Standard_EXPORT static const Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/OBJECT/Handle_SALOME_Filter.hxx b/src/OBJECT/Handle_SALOME_Filter.hxx deleted file mode 100644 index e219ef7c0..000000000 --- a/src/OBJECT/Handle_SALOME_Filter.hxx +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : Handle_SALOME_Filter.hxx -// Module : SALOME -// -#ifndef _Handle_SALOME_Filter_HeaderFile -#define _Handle_SALOME_Filter_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_MMgt_TShared_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -/*! - \class Handle(MMgt_TShared) - Smart pointer (handle) to MMgt_TShared -*/ -class Handle(MMgt_TShared); -class SALOME_Filter; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOME_Filter); - -/*! - \class Handle(SALOME_Filter) - Smart pointer (handle) to SALOME_Filter -*/ -class Handle(SALOME_Filter) : public Handle(MMgt_TShared) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(SALOME_Filter)():Handle(MMgt_TShared)() {} - Handle(SALOME_Filter)(const Handle(SALOME_Filter)& aHandle) : Handle(MMgt_TShared)(aHandle) - { - } - - Handle(SALOME_Filter)(const SALOME_Filter* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) - { - } - - Handle(SALOME_Filter)& operator=(const Handle(SALOME_Filter)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(SALOME_Filter)& operator=(const SALOME_Filter* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - SALOME_Filter* operator->() - { - return (SALOME_Filter *)ControlAccess(); - } - - SALOME_Filter* operator->() const - { - return (SALOME_Filter *)ControlAccess(); - } - - Standard_EXPORT ~Handle(SALOME_Filter)(); - - Standard_EXPORT static const Handle(SALOME_Filter) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/OBJECT/Handle_SALOME_InteractiveObject.hxx b/src/OBJECT/Handle_SALOME_InteractiveObject.hxx deleted file mode 100755 index 68489b07e..000000000 --- a/src/OBJECT/Handle_SALOME_InteractiveObject.hxx +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : Handle_SALOME_InteractiveObject.hxx -// Module : SALOME -// -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#define _Handle_SALOME_InteractiveObject_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_MMgt_TShared_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -/*! - \class Handle(MMgt_TShared) - Smart pointer (handle) to MMgt_TShared -*/ -class Handle(MMgt_TShared); -class SALOME_InteractiveObject; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOME_InteractiveObject); - -/*! - \class Handle(SALOME_InteractiveObject) - Smart pointer (handle) to SALOME_InteractiveObject -*/ -class Handle(SALOME_InteractiveObject) : public Handle(MMgt_TShared) { - public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - Handle(SALOME_InteractiveObject)():Handle(MMgt_TShared)() {} - Handle(SALOME_InteractiveObject)(const Handle(SALOME_InteractiveObject)& aHandle) : Handle(MMgt_TShared)(aHandle) - { - } - - Handle(SALOME_InteractiveObject)(const SALOME_InteractiveObject* anItem) : Handle(MMgt_TShared)((MMgt_TShared *)anItem) - { - } - - Handle(SALOME_InteractiveObject)& operator=(const Handle(SALOME_InteractiveObject)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(SALOME_InteractiveObject)& operator=(const SALOME_InteractiveObject* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - SALOME_InteractiveObject* operator->() - { - return (SALOME_InteractiveObject *)ControlAccess(); - } - - SALOME_InteractiveObject* operator->() const - { - return (SALOME_InteractiveObject *)ControlAccess(); - } - - Standard_EXPORT ~Handle(SALOME_InteractiveObject)(); - - Standard_EXPORT static const Handle(SALOME_InteractiveObject) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/OBJECT/Handle_SALOME_ListNodeOfListIO.hxx b/src/OBJECT/Handle_SALOME_ListNodeOfListIO.hxx deleted file mode 100644 index 900b8075c..000000000 --- a/src/OBJECT/Handle_SALOME_ListNodeOfListIO.hxx +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : Handle_SALOME_ListNodeOfListIO.hxx -// Module : SALOME -// -#ifndef _Handle_SALOME_ListNodeOfListIO_HeaderFile -#define _Handle_SALOME_ListNodeOfListIO_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_TCollection_MapNode_HeaderFile -#include -#endif - -class Standard_Transient; -class Handle_Standard_Type; -/*! - \class Handle(TCollection_MapNode) - Smart pointer (handle) to TCollection_MapNode -*/ -class Handle(TCollection_MapNode); -class SALOME_ListNodeOfListIO; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOME_ListNodeOfListIO); - -/*! - \class Handle(SALOME_ListNodeOfListIO) - Smart pointer (handle) to SALOME_ListNodeOfListIO -*/ -class Handle(SALOME_ListNodeOfListIO) : public Handle(TCollection_MapNode) { - public: - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - Handle(SALOME_ListNodeOfListIO)():Handle(TCollection_MapNode)() {} - Handle(SALOME_ListNodeOfListIO)(const Handle(SALOME_ListNodeOfListIO)& aHandle) : Handle(TCollection_MapNode)(aHandle) - { - } - - Handle(SALOME_ListNodeOfListIO)(const SALOME_ListNodeOfListIO* anItem) : Handle(TCollection_MapNode)((TCollection_MapNode *)anItem) - { - } - - Handle(SALOME_ListNodeOfListIO)& operator=(const Handle(SALOME_ListNodeOfListIO)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(SALOME_ListNodeOfListIO)& operator=(const SALOME_ListNodeOfListIO* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - SALOME_ListNodeOfListIO* operator->() - { - return (SALOME_ListNodeOfListIO *)ControlAccess(); - } - - SALOME_ListNodeOfListIO* operator->() const - { - return (SALOME_ListNodeOfListIO *)ControlAccess(); - } - - Standard_EXPORT ~Handle(SALOME_ListNodeOfListIO)(); - - Standard_EXPORT static const Handle(SALOME_ListNodeOfListIO) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/OBJECT/Handle_SALOME_TypeFilter.hxx b/src/OBJECT/Handle_SALOME_TypeFilter.hxx deleted file mode 100644 index cc8fb9d9c..000000000 --- a/src/OBJECT/Handle_SALOME_TypeFilter.hxx +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : Handle_SALOME_TypeFilter.hxx -// Module : SALOME -// -#ifndef _Handle_SALOME_TypeFilter_HeaderFile -#define _Handle_SALOME_TypeFilter_HeaderFile - -#ifndef _Standard_Macro_HeaderFile -#include -#endif -#ifndef _Standard_HeaderFile -#include -#endif - -#ifndef _Handle_SALOME_Filter_HeaderFile -#include "Handle_SALOME_Filter.hxx" -#endif - -class Standard_Transient; -class Handle_Standard_Type; -/*! - \class Handle(SALOME_Filter) - Smart pointer (handle) to SALOME_Filter -*/ -class Handle(SALOME_Filter); -class SALOME_TypeFilter; -Standard_EXPORT Handle_Standard_Type& STANDARD_TYPE(SALOME_TypeFilter); - -/*! - \class Handle(SALOME_TypeFilter) - Smart pointer (handle) to SALOME_TypeFilter -*/ -class Handle(SALOME_TypeFilter) : public Handle(SALOME_Filter) { - public: - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - Handle(SALOME_TypeFilter)():Handle(SALOME_Filter)() {} - Handle(SALOME_TypeFilter)(const Handle(SALOME_TypeFilter)& aHandle) : Handle(SALOME_Filter)(aHandle) - { - } - - Handle(SALOME_TypeFilter)(const SALOME_TypeFilter* anItem) : Handle(SALOME_Filter)((SALOME_Filter *)anItem) - { - } - - Handle(SALOME_TypeFilter)& operator=(const Handle(SALOME_TypeFilter)& aHandle) - { - Assign(aHandle.Access()); - return *this; - } - - Handle(SALOME_TypeFilter)& operator=(const SALOME_TypeFilter* anItem) - { - Assign((Standard_Transient *)anItem); - return *this; - } - - SALOME_TypeFilter* operator->() - { - return (SALOME_TypeFilter *)ControlAccess(); - } - - SALOME_TypeFilter* operator->() const - { - return (SALOME_TypeFilter *)ControlAccess(); - } - - Standard_EXPORT ~Handle(SALOME_TypeFilter)(); - - Standard_EXPORT static const Handle(SALOME_TypeFilter) DownCast(const Handle(Standard_Transient)& AnObject); -}; -#endif diff --git a/src/OBJECT/SALOME_AISObject.cxx b/src/OBJECT/SALOME_AISObject.cxx index b83048334..e5fb8701a 100755 --- a/src/OBJECT/SALOME_AISObject.cxx +++ b/src/OBJECT/SALOME_AISObject.cxx @@ -20,8 +20,15 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_AISObject.hxx -// Author : Nicolas REJNERI +#include "SALOME_AISObject.hxx" -#include "SALOME_AISObject.ixx" +IMPLEMENT_STANDARD_HANDLE (SALOME_AISObject, AIS_InteractiveObject) +IMPLEMENT_STANDARD_RTTIEXT(SALOME_AISObject, AIS_InteractiveObject) + +SALOME_AISObject::SALOME_AISObject() +{ +} + +SALOME_AISObject::~SALOME_AISObject() +{ +} diff --git a/src/OBJECT/SALOME_AISObject.hxx b/src/OBJECT/SALOME_AISObject.hxx index a82f48ac6..4dcb66e61 100755 --- a/src/OBJECT/SALOME_AISObject.hxx +++ b/src/OBJECT/SALOME_AISObject.hxx @@ -20,100 +20,31 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_AISObject.hxx -// Module : SALOME -// -#ifndef _SALOME_AISObject_HeaderFile -#define _SALOME_AISObject_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_AISObject_HeaderFile -#include "Handle_SALOME_AISObject.hxx" -#endif +#ifndef SALOME_AISOBJECT_HXX +#define SALOME_AISOBJECT_HXX -#ifndef _AIS_InteractiveObject_HeaderFile #include -#endif -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Standard_CString_HeaderFile -#include -#endif -class SALOME_InteractiveObject; - +#include +#include -class SALOME_AISObject : public AIS_InteractiveObject { +#include "SALOME_InteractiveObject.hxx" +class SALOME_AISObject : public AIS_InteractiveObject +{ public: + Standard_EXPORT SALOME_AISObject(); + Standard_EXPORT ~SALOME_AISObject(); - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT virtual Handle_SALOME_InteractiveObject getIO() = 0; -Standard_EXPORT virtual Standard_Boolean hasIO() = 0; -Standard_EXPORT virtual Standard_CString getName() = 0; -Standard_EXPORT virtual void setName(const Standard_CString aName) = 0; -Standard_EXPORT ~SALOME_AISObject(); - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& SALOME_AISObject_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // + Standard_EXPORT virtual Handle_SALOME_InteractiveObject getIO() = 0; + Standard_EXPORT virtual Standard_Boolean hasIO() = 0; + Standard_EXPORT virtual Standard_CString getName() = 0; + Standard_EXPORT virtual void setName(const Standard_CString aName) = 0; +public: + DEFINE_STANDARD_RTTI(SALOME_AISObject); }; +DEFINE_STANDARD_HANDLE(SALOME_AISObject, AIS_InteractiveObject) - - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif +#endif // SALOME_AISOBJECT_HXX diff --git a/src/OBJECT/SALOME_AISObject.ixx b/src/OBJECT/SALOME_AISObject.ixx deleted file mode 100755 index f68c12b8f..000000000 --- a/src/OBJECT/SALOME_AISObject.ixx +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_AISObject.ixx -// Module : SALOME -// -#include "SALOME_AISObject.jxx" - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -SALOME_AISObject::~SALOME_AISObject() {} - - - -Standard_EXPORT Handle_Standard_Type& SALOME_AISObject_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(AIS_InteractiveObject); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(AIS_InteractiveObject); - static Handle_Standard_Type aType2 = STANDARD_TYPE(SelectMgr_SelectableObject); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(SelectMgr_SelectableObject); - static Handle_Standard_Type aType3 = STANDARD_TYPE(PrsMgr_PresentableObject); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(PrsMgr_PresentableObject); - static Handle_Standard_Type aType4 = STANDARD_TYPE(MMgt_TShared); - if ( aType4.IsNull()) aType4 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType5 = STANDARD_TYPE(Standard_Transient); - if ( aType5.IsNull()) aType5 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,aType5,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("SALOME_AISObject", - sizeof(SALOME_AISObject), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(SALOME_AISObject) Handle(SALOME_AISObject)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(SALOME_AISObject) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(SALOME_AISObject))) { - _anOtherObject = Handle(SALOME_AISObject)((Handle(SALOME_AISObject)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& SALOME_AISObject::DynamicType() const -{ - return STANDARD_TYPE(SALOME_AISObject) ; -} -Standard_Boolean SALOME_AISObject::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(SALOME_AISObject) == AType || AIS_InteractiveObject::IsKind(AType)); -} -Handle_SALOME_AISObject::~Handle_SALOME_AISObject() {} - diff --git a/src/OBJECT/SALOME_AISObject.jxx b/src/OBJECT/SALOME_AISObject.jxx deleted file mode 100755 index 38350d1ca..000000000 --- a/src/OBJECT/SALOME_AISObject.jxx +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_AISObject.jxx -// Module : SALOME -// -#ifndef _SALOME_InteractiveObject_HeaderFile -#include "SALOME_InteractiveObject.hxx" -#endif -#ifndef _SALOME_AISObject_HeaderFile -#include "SALOME_AISObject.hxx" -#endif diff --git a/src/OBJECT/SALOME_AISShape.cxx b/src/OBJECT/SALOME_AISShape.cxx index 2b25d1e63..20deb9096 100755 --- a/src/OBJECT/SALOME_AISShape.cxx +++ b/src/OBJECT/SALOME_AISShape.cxx @@ -20,11 +20,10 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_AISShape.cxx -// Author : Nicolas REJNERI +#include "SALOME_AISShape.hxx" -#include "SALOME_AISShape.ixx" +IMPLEMENT_STANDARD_HANDLE (SALOME_AISShape, ViewerData_AISShape) +IMPLEMENT_STANDARD_RTTIEXT(SALOME_AISShape, ViewerData_AISShape) /*! Constructor @@ -34,3 +33,10 @@ SALOME_AISShape::SALOME_AISShape(const TopoDS_Shape& shape) : ViewerData_AISShape(shape) { } + +/*! + Destructor +*/ +SALOME_AISShape::~SALOME_AISShape() +{ +} diff --git a/src/OBJECT/SALOME_AISShape.hxx b/src/OBJECT/SALOME_AISShape.hxx index 0ac9a30d8..279a73ecf 100755 --- a/src/OBJECT/SALOME_AISShape.hxx +++ b/src/OBJECT/SALOME_AISShape.hxx @@ -20,114 +20,42 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_AISShape.hxx -// Module : SALOME -// -#ifndef _SALOME_AISShape_HeaderFile -#define _SALOME_AISShape_HeaderFile +#ifndef SALOME_AISSHAPE_HXX +#define SALOME_AISSHAPE_HXX -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_AISShape_HeaderFile -#include "Handle_SALOME_AISShape.hxx" -#endif +#include "ViewerData_AISShape.hxx" +#include "SALOME_InteractiveObject.hxx" -#ifndef _Standard_CString_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include -#endif -// #ifndef _AIS_Shape_HeaderFile -// #include -// #endif -//#ifndef _AIS_TexturedShape_HeaderFile -//#include -//#endif -#ifndef _ViewerData_AISShape_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif +#include +#include -class SALOME_InteractiveObject; class TopoDS_Shape; class TColStd_IndexedMapOfInteger; - -class SALOME_AISShape : public ViewerData_AISShape { - +class SALOME_AISShape : public ViewerData_AISShape +{ public: + Standard_EXPORT SALOME_AISShape(const TopoDS_Shape& shape); + Standard_EXPORT ~SALOME_AISShape(); - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT SALOME_AISShape(const TopoDS_Shape& shape); -Standard_EXPORT virtual Handle_SALOME_InteractiveObject getIO() = 0; -Standard_EXPORT virtual Standard_Boolean hasIO() = 0; -Standard_EXPORT virtual Standard_Boolean isTopLevel() = 0; -Standard_EXPORT virtual Standard_Boolean switchTopLevel() = 0; -Standard_EXPORT virtual Standard_Boolean toActivate() = 0; -Standard_EXPORT virtual void setTopLevel(Standard_Boolean) = 0; -Standard_EXPORT virtual Standard_CString getName() = 0; -Standard_EXPORT virtual void setName(const Standard_CString aName) = 0; -Standard_EXPORT virtual void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight ) = 0; -Standard_EXPORT ~SALOME_AISShape(); - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& SALOME_AISShape_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: + Standard_EXPORT virtual Standard_CString getName() = 0; + Standard_EXPORT virtual void setName(const Standard_CString aName) = 0; - // Methods PROTECTED - // + Standard_EXPORT virtual Handle_SALOME_InteractiveObject getIO() = 0; + Standard_EXPORT virtual Standard_Boolean hasIO() = 0; + Standard_EXPORT virtual void setTopLevel(Standard_Boolean) = 0; + Standard_EXPORT virtual Standard_Boolean isTopLevel() = 0; + Standard_EXPORT virtual Standard_Boolean switchTopLevel() = 0; - // Fields PROTECTED - // + Standard_EXPORT virtual Standard_Boolean toActivate() = 0; -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - + Standard_EXPORT virtual void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight ) = 0; +public: + DEFINE_STANDARD_RTTI(SALOME_AISShape); }; +DEFINE_STANDARD_HANDLE(SALOME_AISShape, ViewerData_AISShape) - - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif +#endif // SALOME_AISSHAPE_HXX diff --git a/src/OBJECT/SALOME_AISShape.ixx b/src/OBJECT/SALOME_AISShape.ixx deleted file mode 100755 index 7e37d077a..000000000 --- a/src/OBJECT/SALOME_AISShape.ixx +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_AISShape.ixx -// Module : SALOME -// -#include "SALOME_AISShape.jxx" - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -SALOME_AISShape::~SALOME_AISShape() {} - - - -Standard_EXPORT Handle_Standard_Type& SALOME_AISShape_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(ViewerData_AISShape); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(ViewerData_AISShape); - static Handle_Standard_Type aType2 = STANDARD_TYPE(AIS_TexturedShape); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(AIS_TexturedShape); - static Handle_Standard_Type aType3 = STANDARD_TYPE(AIS_InteractiveObject); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(AIS_InteractiveObject); - static Handle_Standard_Type aType4 = STANDARD_TYPE(SelectMgr_SelectableObject); - if ( aType4.IsNull()) aType4 = STANDARD_TYPE(SelectMgr_SelectableObject); - static Handle_Standard_Type aType5 = STANDARD_TYPE(PrsMgr_PresentableObject); - if ( aType5.IsNull()) aType5 = STANDARD_TYPE(PrsMgr_PresentableObject); - static Handle_Standard_Type aType6 = STANDARD_TYPE(MMgt_TShared); - if ( aType6.IsNull()) aType6 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType7 = STANDARD_TYPE(Standard_Transient); - if ( aType7.IsNull()) aType7 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,aType4,aType5,aType6,aType7,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("SALOME_AISShape", - sizeof(SALOME_AISShape), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(SALOME_AISShape) Handle(SALOME_AISShape)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(SALOME_AISShape) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(SALOME_AISShape))) { - _anOtherObject = Handle(SALOME_AISShape)((Handle(SALOME_AISShape)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& SALOME_AISShape::DynamicType() const -{ - return STANDARD_TYPE(SALOME_AISShape) ; -} -Standard_Boolean SALOME_AISShape::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(SALOME_AISShape) == AType || AIS_Shape::IsKind(AType)); -} -Handle_SALOME_AISShape::~Handle_SALOME_AISShape() {} - diff --git a/src/OBJECT/SALOME_AISShape.jxx b/src/OBJECT/SALOME_AISShape.jxx deleted file mode 100755 index a839dc5d5..000000000 --- a/src/OBJECT/SALOME_AISShape.jxx +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_AISShape.jxx -// Module : SALOME -// -#ifndef _SALOME_InteractiveObject_HeaderFile -#include "SALOME_InteractiveObject.hxx" -#endif -#ifndef _TopoDS_Shape_HeaderFile -#include -#endif -#ifndef _SALOME_AISShape_HeaderFile -#include "SALOME_AISShape.hxx" -#endif diff --git a/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx b/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx deleted file mode 100644 index 74b3372fc..000000000 --- a/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx -// Module : SALOME -// -#ifndef _SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_HeaderFile -#define _SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_HeaderFile - -#ifndef _TCollection_BasicMapIterator_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include "Handle_SALOME_InteractiveObject.hxx" -#endif -#ifndef _Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile -#include "Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" -#endif -class Standard_NoSuchObject; -class SALOME_InteractiveObject; -class TColStd_IndexedMapOfInteger; -class TColStd_MapTransientHasher; -class SALOME_DataMapOfIOMapOfInteger; -class SALOME_DataMapNodeOfDataMapOfIOMapOfInteger; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger : public TCollection_BasicMapIterator { - -public: - - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger(); -Standard_EXPORT SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger(const SALOME_DataMapOfIOMapOfInteger& aMap); -Standard_EXPORT void Initialize(const SALOME_DataMapOfIOMapOfInteger& aMap) ; -Standard_EXPORT const Handle_SALOME_InteractiveObject& Key() const; -Standard_EXPORT const TColStd_IndexedMapOfInteger& Value() const; - - - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - -}; - - - - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx b/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx deleted file mode 100644 index c99846b1e..000000000 --- a/src/OBJECT/SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_0.cxx -// Module : SALOME -// -#include "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx" - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _SALOME_InteractiveObject_HeaderFile -#include "SALOME_InteractiveObject.hxx" -#endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include -#endif -#ifndef _TColStd_MapTransientHasher_HeaderFile -#include -#endif -#ifndef _SALOME_DataMapOfIOMapOfInteger_HeaderFile -#include "SALOME_DataMapOfIOMapOfInteger.hxx" -#endif -#ifndef _SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile -#include "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" -#endif - -#define TheKey Handle_SALOME_InteractiveObject -#define TheKey_hxx "SALOME_InteractiveObject.hxx" -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapTransientHasher -#define Hasher_hxx -#define TCollection_DataMapNode SALOME_DataMapNodeOfDataMapOfIOMapOfInteger -#define TCollection_DataMapNode_hxx "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" -#define TCollection_DataMapIterator SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger -#define TCollection_DataMapIterator_hxx "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx" -#define Handle_TCollection_DataMapNode Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger -#define TCollection_DataMapNode_Type_() SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_Type_() -#define TCollection_DataMap SALOME_DataMapOfIOMapOfInteger -#define TCollection_DataMap_hxx "SALOME_DataMapOfIOMapOfInteger.hxx" -#include - diff --git a/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx b/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx deleted file mode 100644 index 324ca5531..000000000 --- a/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx +++ /dev/null @@ -1,153 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx -// Module : SALOME -// -#ifndef _SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile -#define _SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile -#include "Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" -#endif - -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include "Handle_SALOME_InteractiveObject.hxx" -#endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class SALOME_InteractiveObject; -class TColStd_IndexedMapOfInteger; -class TColStd_MapTransientHasher; -class SALOME_DataMapOfIOMapOfInteger; -class SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger; - - -class SALOME_DataMapNodeOfDataMapOfIOMapOfInteger : public TCollection_MapNode { - -public: - - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT inline SALOME_DataMapNodeOfDataMapOfIOMapOfInteger(const Handle(SALOME_InteractiveObject)& K,const TColStd_IndexedMapOfInteger& I,const TCollection_MapNodePtr& n); -Standard_EXPORT inline Handle_SALOME_InteractiveObject& Key() const; -Standard_EXPORT inline TColStd_IndexedMapOfInteger& Value() const; -Standard_EXPORT ~SALOME_DataMapNodeOfDataMapOfIOMapOfInteger(); - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Handle_SALOME_InteractiveObject myKey; -TColStd_IndexedMapOfInteger myValue; - - -}; - -#define TheKey Handle_SALOME_InteractiveObject -#define TheKey_hxx "SALOME_InteractiveObject.hxx" -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapTransientHasher -#define Hasher_hxx -#define TCollection_DataMapNode SALOME_DataMapNodeOfDataMapOfIOMapOfInteger -#define TCollection_DataMapNode_hxx "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" -#define TCollection_DataMapIterator SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger -#define TCollection_DataMapIterator_hxx "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx" -#define Handle_TCollection_DataMapNode Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger -#define TCollection_DataMapNode_Type_() SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_Type_() -#define TCollection_DataMap SALOME_DataMapOfIOMapOfInteger -#define TCollection_DataMap_hxx "SALOME_DataMapOfIOMapOfInteger.hxx" - -#include - -#undef TheKey -#undef TheKey_hxx -#undef TheItem -#undef TheItem_hxx -#undef Hasher -#undef Hasher_hxx -#undef TCollection_DataMapNode -#undef TCollection_DataMapNode_hxx -#undef TCollection_DataMapIterator -#undef TCollection_DataMapIterator_hxx -#undef Handle_TCollection_DataMapNode -#undef TCollection_DataMapNode_Type_ -#undef TCollection_DataMap -#undef TCollection_DataMap_hxx - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx b/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx deleted file mode 100644 index 329abcf25..000000000 --- a/src/OBJECT/SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx +++ /dev/null @@ -1,132 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_0.cxx -// Module : SALOME -// -#include "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _SALOME_InteractiveObject_HeaderFile -#include "SALOME_InteractiveObject.hxx" -#endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include -#endif -#ifndef _TColStd_MapTransientHasher_HeaderFile -#include -#endif -#ifndef _SALOME_DataMapOfIOMapOfInteger_HeaderFile -#include "SALOME_DataMapOfIOMapOfInteger.hxx" -#endif -#ifndef _SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_HeaderFile -#include "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx" -#endif - -/*! - Destructor -*/ -SALOME_DataMapNodeOfDataMapOfIOMapOfInteger::~SALOME_DataMapNodeOfDataMapOfIOMapOfInteger() {} - - - -/*! - \return OCC Handle Type -*/ -Standard_EXPORT Handle_Standard_Type& SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("SALOME_DataMapNodeOfDataMapOfIOMapOfInteger", - sizeof(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -/*! - DownCast method: allows safe downcasting -*/ -const Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger) Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger))) { - _anOtherObject = Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)((Handle(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger)&)AnObject); - } - } - - return _anOtherObject ; -} - -/*! - \return OCC Handle dynamic Type -*/ -const Handle(Standard_Type)& SALOME_DataMapNodeOfDataMapOfIOMapOfInteger::DynamicType() const -{ - return STANDARD_TYPE(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger) ; -} - -/*! - \return true if other type is the same - \param AType - type to be checked -*/ -Standard_Boolean SALOME_DataMapNodeOfDataMapOfIOMapOfInteger::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(SALOME_DataMapNodeOfDataMapOfIOMapOfInteger) == AType || TCollection_MapNode::IsKind(AType)); -} -/*! - Destructor -*/ -Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger::~Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger() {} -#define TheKey Handle_SALOME_InteractiveObject -#define TheKey_hxx "SALOME_InteractiveObject.hxx" -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapTransientHasher -#define Hasher_hxx -#define TCollection_DataMapNode SALOME_DataMapNodeOfDataMapOfIOMapOfInteger -#define TCollection_DataMapNode_hxx "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" -#define TCollection_DataMapIterator SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger -#define TCollection_DataMapIterator_hxx "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx" -#define Handle_TCollection_DataMapNode Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger -#define TCollection_DataMapNode_Type_() SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_Type_() -#define TCollection_DataMap SALOME_DataMapOfIOMapOfInteger -#define TCollection_DataMap_hxx "SALOME_DataMapOfIOMapOfInteger.hxx" -#include - diff --git a/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx b/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx index 9b60f4546..4c9e5e43c 100644 --- a/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx +++ b/src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx @@ -20,102 +20,14 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_DataMapOfIOMapOfInteger.hxx -// Module : SALOME +#ifndef SALOME_DATAMAPOFIOMAPOFINTEGER_HXX +#define SALOME_DATAMAPOFIOMAPOFINTEGER_HXX -#ifndef _SALOME_DataMapOfIOMapOfInteger_HeaderFile -#define _SALOME_DataMapOfIOMapOfInteger_HeaderFile +#include +#include +#include "SALOME_InteractiveObject.hxx" -#ifndef _TCollection_BasicMap_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include "Handle_SALOME_InteractiveObject.hxx" -#endif -#ifndef _Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile -#include "Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif +typedef NCollection_DataMap SALOME_DataMapOfIOMapOfInteger; +typedef SALOME_DataMapOfIOMapOfInteger::Iterator SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger; -class Standard_DomainError; -class Standard_NoSuchObject; -class SALOME_InteractiveObject; -class TColStd_IndexedMapOfInteger; -class TColStd_MapTransientHasher; -class SALOME_DataMapNodeOfDataMapOfIOMapOfInteger; -class SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger; - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -#include - -class SALOME_DataMapOfIOMapOfInteger : public TCollection_BasicMap { - -public: - - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - - // Methods PUBLIC - // -Standard_EXPORT SALOME_DataMapOfIOMapOfInteger(const Standard_Integer NbBuckets = 1); -Standard_EXPORT SALOME_DataMapOfIOMapOfInteger& Assign(const SALOME_DataMapOfIOMapOfInteger& Other) ; - SALOME_DataMapOfIOMapOfInteger& operator =(const SALOME_DataMapOfIOMapOfInteger& Other) -{ - return Assign(Other); -} - -Standard_EXPORT void ReSize(const Standard_Integer NbBuckets) ; -Standard_EXPORT void Clear() ; -~SALOME_DataMapOfIOMapOfInteger() -{ - Clear(); -} - -Standard_EXPORT Standard_Boolean Bind(const Handle(SALOME_InteractiveObject)& K,const TColStd_IndexedMapOfInteger& I) ; -Standard_EXPORT Standard_Boolean IsBound(const Handle(SALOME_InteractiveObject)& K) const; -Standard_EXPORT Standard_Boolean UnBind(const Handle(SALOME_InteractiveObject)& K) ; -Standard_EXPORT const TColStd_IndexedMapOfInteger& Find(const Handle(SALOME_InteractiveObject)& K) const; - const TColStd_IndexedMapOfInteger& operator()(const Handle(SALOME_InteractiveObject)& K) const -{ - return Find(K); -} - -Standard_EXPORT TColStd_IndexedMapOfInteger& ChangeFind(const Handle(SALOME_InteractiveObject)& K) ; - TColStd_IndexedMapOfInteger& operator()(const Handle(SALOME_InteractiveObject)& K) -{ - return ChangeFind(K); -} - -Standard_EXPORT Standard_Address Find1 (const Handle(SALOME_InteractiveObject)& K) const; -Standard_EXPORT Standard_Address ChangeFind1 (const Handle(SALOME_InteractiveObject)& K); - -private: -Standard_EXPORT SALOME_DataMapOfIOMapOfInteger(const SALOME_DataMapOfIOMapOfInteger& Other); -}; - -// other inline functions and methods (like "C++: function call" methods) -// - -#endif +#endif // SALOME_DATAMAPOFIOMAPOFINTEGER_HXX diff --git a/src/OBJECT/SALOME_DataMapOfIOMapOfInteger_0.cxx b/src/OBJECT/SALOME_DataMapOfIOMapOfInteger_0.cxx deleted file mode 100644 index f9152d14a..000000000 --- a/src/OBJECT/SALOME_DataMapOfIOMapOfInteger_0.cxx +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_DataMapOfIOMapOfInteger_0.cxx -// Module : SALOME -// -#include "SALOME_DataMapOfIOMapOfInteger.hxx" - -#ifndef _Standard_DomainError_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _SALOME_InteractiveObject_HeaderFile -#include "SALOME_InteractiveObject.hxx" -#endif -#ifndef _TColStd_IndexedMapOfInteger_HeaderFile -#include -#endif -#ifndef _TColStd_MapTransientHasher_HeaderFile -#include -#endif -#ifndef _SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_HeaderFile -#include "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" -#endif -#ifndef _SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger_HeaderFile -#include "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx" -#endif - -#define TheKey Handle_SALOME_InteractiveObject -#define TheKey_hxx "SALOME_InteractiveObject.hxx" -#define TheItem TColStd_IndexedMapOfInteger -#define TheItem_hxx -#define Hasher TColStd_MapTransientHasher -#define Hasher_hxx -#define TCollection_DataMapNode SALOME_DataMapNodeOfDataMapOfIOMapOfInteger -#define TCollection_DataMapNode_hxx "SALOME_DataMapNodeOfDataMapOfIOMapOfInteger.hxx" -#define TCollection_DataMapIterator SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger -#define TCollection_DataMapIterator_hxx "SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger.hxx" -#define Handle_TCollection_DataMapNode Handle_SALOME_DataMapNodeOfDataMapOfIOMapOfInteger -#define TCollection_DataMapNode_Type_() SALOME_DataMapNodeOfDataMapOfIOMapOfInteger_Type_() -#define TCollection_DataMap SALOME_DataMapOfIOMapOfInteger -#define TCollection_DataMap_hxx "SALOME_DataMapOfIOMapOfInteger.hxx" -#include - diff --git a/src/OBJECT/SALOME_Filter.cxx b/src/OBJECT/SALOME_Filter.cxx index 436085938..1e198c5a1 100644 --- a/src/OBJECT/SALOME_Filter.cxx +++ b/src/OBJECT/SALOME_Filter.cxx @@ -20,9 +20,15 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_Filter.cxx -// Author : Nicolas REJNERI +#include "SALOME_Filter.hxx" -#include "SALOME_Filter.ixx" +IMPLEMENT_STANDARD_HANDLE (SALOME_Filter, MMgt_TShared) +IMPLEMENT_STANDARD_RTTIEXT(SALOME_Filter, MMgt_TShared) +SALOME_Filter::SALOME_Filter() +{ +} + +SALOME_Filter::~SALOME_Filter() +{ +} diff --git a/src/OBJECT/SALOME_Filter.hxx b/src/OBJECT/SALOME_Filter.hxx index dc76834cd..d4c944ebc 100644 --- a/src/OBJECT/SALOME_Filter.hxx +++ b/src/OBJECT/SALOME_Filter.hxx @@ -20,92 +20,27 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_Filter.hxx -// Module : SALOME -// -#ifndef _SALOME_Filter_HeaderFile -#define _SALOME_Filter_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_Filter_HeaderFile -#include "Handle_SALOME_Filter.hxx" -#endif +#ifndef SALOME_FILTER_HXX +#define SALOME_FILTER_HXX -#ifndef _MMgt_TShared_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include "Handle_SALOME_InteractiveObject.hxx" -#endif +#include +#include -class SALOME_Filter : public MMgt_TShared { +#include "SALOME_InteractiveObject.hxx" +class SALOME_Filter : public MMgt_TShared +{ public: + Standard_EXPORT SALOME_Filter(); + Standard_EXPORT ~SALOME_Filter(); - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& anObj) const = 0; -Standard_EXPORT ~SALOME_Filter(); - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& SALOME_Filter_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - + Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& anObj) const = 0; +public: + DEFINE_STANDARD_RTTI(SALOME_Filter); }; +DEFINE_STANDARD_HANDLE(SALOME_Filter, MMgt_TShared) - - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif +#endif // SALOME_FILTER_HXX diff --git a/src/OBJECT/SALOME_Filter.ixx b/src/OBJECT/SALOME_Filter.ixx deleted file mode 100644 index 8062ff860..000000000 --- a/src/OBJECT/SALOME_Filter.ixx +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_Filter.ixx -// Module : SALOME -// -#include "SALOME_Filter.jxx" - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -SALOME_Filter::~SALOME_Filter() {} - - - -Standard_EXPORT Handle_Standard_Type& SALOME_Filter_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("SALOME_Filter", - sizeof(SALOME_Filter), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(SALOME_Filter) Handle(SALOME_Filter)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(SALOME_Filter) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(SALOME_Filter))) { - _anOtherObject = Handle(SALOME_Filter)((Handle(SALOME_Filter)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& SALOME_Filter::DynamicType() const -{ - return STANDARD_TYPE(SALOME_Filter) ; -} -Standard_Boolean SALOME_Filter::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(SALOME_Filter) == AType || MMgt_TShared::IsKind(AType)); -} -Handle_SALOME_Filter::~Handle_SALOME_Filter() {} - diff --git a/src/OBJECT/SALOME_Filter.jxx b/src/OBJECT/SALOME_Filter.jxx deleted file mode 100644 index 168aa73dc..000000000 --- a/src/OBJECT/SALOME_Filter.jxx +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_Filter.jxx -// Module : SALOME -// -#ifndef _SALOME_Filter_HeaderFile -#include "SALOME_Filter.hxx" -#endif diff --git a/src/OBJECT/SALOME_InteractiveObject.cxx b/src/OBJECT/SALOME_InteractiveObject.cxx index dca428663..1dd4eb54f 100755 --- a/src/OBJECT/SALOME_InteractiveObject.cxx +++ b/src/OBJECT/SALOME_InteractiveObject.cxx @@ -20,26 +20,25 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_InteractiveObject.cxx -// Author : Nicolas REJNERI - /*! \class SALOME_InteractiveObject SALOME_InteractiveObject.hxx \brief ... */ -#include "SALOME_InteractiveObject.ixx" +#include "SALOME_InteractiveObject.hxx" + +IMPLEMENT_STANDARD_HANDLE (SALOME_InteractiveObject, MMgt_TShared) +IMPLEMENT_STANDARD_RTTIEXT(SALOME_InteractiveObject, MMgt_TShared) /*! Default constructor */ -SALOME_InteractiveObject::SALOME_InteractiveObject() +SALOME_InteractiveObject::SALOME_InteractiveObject(): + myEntry(""), + myName(""), + myComponentDataType(""), + myReference("") { - myEntry = ""; - myName = ""; - myComponentDataType = ""; - myReference = ""; } /*! @@ -57,18 +56,27 @@ SALOME_InteractiveObject::SALOME_InteractiveObject(const char* anEntry, myReference("") {} +/*! + Destructor +*/ +SALOME_InteractiveObject::~SALOME_InteractiveObject() +{ +} + /*! Sets entry \param anEntry - new entry of object */ -void SALOME_InteractiveObject::setEntry(const char* anEntry){ +void SALOME_InteractiveObject::setEntry(const char* anEntry) +{ myEntry = anEntry; } /*! \return entry */ -const char* SALOME_InteractiveObject::getEntry(){ +const char* SALOME_InteractiveObject::getEntry() +{ return myEntry.c_str(); } @@ -76,14 +84,16 @@ const char* SALOME_InteractiveObject::getEntry(){ Sets component data type \param aComponentDataType - component data type name */ -void SALOME_InteractiveObject::setComponentDataType(const char* aComponentDataType){ +void SALOME_InteractiveObject::setComponentDataType(const char* aComponentDataType) +{ myComponentDataType = aComponentDataType; } /*! \return component data type */ -const char* SALOME_InteractiveObject::getComponentDataType(){ +const char* SALOME_InteractiveObject::getComponentDataType() +{ return myComponentDataType.c_str(); } @@ -91,21 +101,24 @@ const char* SALOME_InteractiveObject::getComponentDataType(){ Sets name \param aName - new name of object */ -void SALOME_InteractiveObject::setName(const char* aName){ +void SALOME_InteractiveObject::setName(const char* aName) +{ myName = aName; } /*! \return name */ -const char* SALOME_InteractiveObject::getName(){ +const char* SALOME_InteractiveObject::getName() +{ return myName.c_str(); } /*! \return true if entry isn't empty */ -Standard_Boolean SALOME_InteractiveObject::hasEntry(){ +Standard_Boolean SALOME_InteractiveObject::hasEntry() +{ return myEntry != ""; } @@ -113,24 +126,21 @@ Standard_Boolean SALOME_InteractiveObject::hasEntry(){ \return true if objects have same entries \param anIO - other object */ -Standard_Boolean SALOME_InteractiveObject::isSame(const Handle(SALOME_InteractiveObject)& anIO ){ - if ( anIO->hasEntry() && this->hasEntry() ) { - if ( myEntry == anIO->getEntry() ) - return Standard_True; - } - - return Standard_False; +Standard_Boolean SALOME_InteractiveObject::isSame(const Handle(SALOME_InteractiveObject)& anIO ) +{ + Standard_Boolean r = Standard_False; + if ( anIO->hasEntry() && this->hasEntry() ) + r = myEntry == anIO->getEntry(); + return r; } /*! \return true if component data types are same \param ComponentDataType - component data type to be checked */ -Standard_Boolean SALOME_InteractiveObject::isComponentType(const char* ComponentDataType){ - if ( myComponentDataType == ComponentDataType ) - return Standard_True; - else - return Standard_False; +Standard_Boolean SALOME_InteractiveObject::isComponentType(const char* ComponentDataType) +{ + return myComponentDataType == ComponentDataType; } /*! @@ -157,3 +167,14 @@ void SALOME_InteractiveObject::setReference(const char* aReference) { myReference = aReference; } + +/*! + Compare two objects + \param anIO1 - first object to compare + \param anIO1 - second object to compare +*/ +Standard_Boolean IsEqual(const Handle(SALOME_InteractiveObject)& anIO1, + const Handle(SALOME_InteractiveObject)& anIO2) +{ + return anIO1->isSame( anIO2 ); +} diff --git a/src/OBJECT/SALOME_InteractiveObject.hxx b/src/OBJECT/SALOME_InteractiveObject.hxx index 371c4a3df..17c29310a 100755 --- a/src/OBJECT/SALOME_InteractiveObject.hxx +++ b/src/OBJECT/SALOME_InteractiveObject.hxx @@ -20,128 +20,56 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_InteractiveObject.hxx -// Module : SALOME -// -#ifndef _SALOME_InteractiveObject_HeaderFile -#define _SALOME_InteractiveObject_HeaderFile - -#ifndef _Standard_HeaderFile -// E.A. : Standard.hxx defines PACKAGE and VERSION --> Pb in Werror mode -// E.A. : --> Add the undef of PACKAGE and VERSION (really ugly !) -#ifdef PACKAGE -#undef PACKAGE -#endif -#ifdef VERSION -#undef VERSION -#endif -#ifdef HAVE_FINITE -#undef HAVE_FINITE -#endif -#include -#endif -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include "Handle_SALOME_InteractiveObject.hxx" -#endif +#ifndef SALOME_INTERACTIVEOBJECT_HXX +#define SALOME_INTERACTIVEOBJECT_HXX -#ifndef _Standard_CString_HeaderFile -#include -#endif -#ifndef _MMgt_TShared_HeaderFile #include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif +#include +#include #include -class SALOME_InteractiveObject : public MMgt_TShared { +class SALOME_InteractiveObject; +DEFINE_STANDARD_HANDLE(SALOME_InteractiveObject, MMgt_TShared) +class SALOME_InteractiveObject : public MMgt_TShared +{ public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - // Methods PUBLIC - // -Standard_EXPORT SALOME_InteractiveObject(); -Standard_EXPORT SALOME_InteractiveObject(const char* anEntry, - const char* aComponentDataType, - const char* aName = ""); -Standard_EXPORT void setEntry(const char* anEntry) ; -Standard_EXPORT const char* getEntry() ; -Standard_EXPORT void setName(const char* aName) ; -Standard_EXPORT const char* getName() ; -Standard_EXPORT Standard_Boolean hasEntry() ; -Standard_EXPORT virtual Standard_Boolean isSame(const Handle(SALOME_InteractiveObject)& anIO) ; - -Standard_EXPORT Standard_Boolean hasReference() ; -Standard_EXPORT const char* getReference() ; -Standard_EXPORT void setReference(const char* aReference) ; - -Standard_EXPORT void setComponentDataType(const char* ComponentDataType) ; -Standard_EXPORT const char* getComponentDataType() ; -Standard_EXPORT Standard_Boolean isComponentType(const char* ComponentDataType) ; - //Standard_EXPORT Standard_Boolean isComponentType(std::string ComponentDataType) ; -Standard_EXPORT virtual ~SALOME_InteractiveObject(); - -// Must be defined for using by NCollection for ceratin of data map -friend Standard_Boolean IsEqual(const Handle(SALOME_InteractiveObject)& anIO1, - const Handle(SALOME_InteractiveObject)& anIO2) -{ return anIO1->isSame( anIO2 ); } - - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& SALOME_InteractiveObject_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + Standard_EXPORT SALOME_InteractiveObject(); + Standard_EXPORT SALOME_InteractiveObject(const char* anEntry, + const char* aComponentDataType, + const char* aName = ""); + Standard_EXPORT virtual ~SALOME_InteractiveObject(); + + Standard_EXPORT void setEntry(const char* anEntry); + Standard_EXPORT const char* getEntry(); + Standard_EXPORT Standard_Boolean hasEntry(); + + Standard_EXPORT void setName(const char* aName); + Standard_EXPORT const char* getName(); + + Standard_EXPORT virtual Standard_Boolean isSame(const Handle(SALOME_InteractiveObject)& anIO); + + Standard_EXPORT void setReference(const char* aReference); + Standard_EXPORT const char* getReference(); + Standard_EXPORT Standard_Boolean hasReference(); + + Standard_EXPORT void setComponentDataType(const char* ComponentDataType); + Standard_EXPORT const char* getComponentDataType(); + Standard_EXPORT Standard_Boolean isComponentType(const char* ComponentDataType); + + // Must be defined for using by NCollection for ceratin of data map + friend Standard_Boolean IsEqual(const Handle(SALOME_InteractiveObject)& anIO1, + const Handle(SALOME_InteractiveObject)& anIO2); protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - std::string myReference; std::string myEntry; std::string myName; std::string myComponentDataType; + std::string myReference; -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - +public: + DEFINE_STANDARD_RTTI(SALOME_InteractiveObject); }; - - - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif +#endif // SALOME_INTERACTIVEOBJECT_HXX diff --git a/src/OBJECT/SALOME_InteractiveObject.ixx b/src/OBJECT/SALOME_InteractiveObject.ixx deleted file mode 100755 index 561ee4757..000000000 --- a/src/OBJECT/SALOME_InteractiveObject.ixx +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_InteractiveObject.ixx -// Module : SALOME -// -#include "SALOME_InteractiveObject.jxx" - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -SALOME_InteractiveObject::~SALOME_InteractiveObject() {} - - - -Standard_EXPORT Handle_Standard_Type& SALOME_InteractiveObject_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(MMgt_TShared); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType2 = STANDARD_TYPE(Standard_Transient); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("SALOME_InteractiveObject", - sizeof(SALOME_InteractiveObject), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(SALOME_InteractiveObject) Handle(SALOME_InteractiveObject)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(SALOME_InteractiveObject) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(SALOME_InteractiveObject))) { - _anOtherObject = Handle(SALOME_InteractiveObject)((Handle(SALOME_InteractiveObject)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& SALOME_InteractiveObject::DynamicType() const -{ - return STANDARD_TYPE(SALOME_InteractiveObject) ; -} -Standard_Boolean SALOME_InteractiveObject::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(SALOME_InteractiveObject) == AType || MMgt_TShared::IsKind(AType)); -} -Handle_SALOME_InteractiveObject::~Handle_SALOME_InteractiveObject() {} - diff --git a/src/OBJECT/SALOME_InteractiveObject.jxx b/src/OBJECT/SALOME_InteractiveObject.jxx deleted file mode 100755 index e4a82afe9..000000000 --- a/src/OBJECT/SALOME_InteractiveObject.jxx +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME OBJECT : implementation of interactive object visualization for OCC and VTK viewers -// File : SALOME_InteractiveObject.jxx -// Module : SALOME -// -#ifndef _SALOME_InteractiveObject_HeaderFile -#include "SALOME_InteractiveObject.hxx" -#endif diff --git a/src/OBJECT/SALOME_ListIO.hxx b/src/OBJECT/SALOME_ListIO.hxx index 89faa37f5..7a5fb8452 100644 --- a/src/OBJECT/SALOME_ListIO.hxx +++ b/src/OBJECT/SALOME_ListIO.hxx @@ -20,150 +20,13 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_ListIO.hxx -// Module : SALOME -// -#ifndef _SALOME_ListIO_HeaderFile -#define _SALOME_ListIO_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include "Handle_SALOME_InteractiveObject.hxx" -#endif -#ifndef _Handle_SALOME_ListNodeOfListIO_HeaderFile -#include "Handle_SALOME_ListNodeOfListIO.hxx" -#endif -#ifndef _Standard_Integer_HeaderFile -#include -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoSuchObject; -class SALOME_ListIteratorOfListIO; -class SALOME_InteractiveObject; -class SALOME_ListNodeOfListIO; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -/*! - \class SALOME_ListIO - List of SALOME interactive objects -*/ -class SALOME_ListIO { - -public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - // Methods PUBLIC - // -Standard_EXPORT SALOME_ListIO(); -Standard_EXPORT void Assign(const SALOME_ListIO& Other) ; - void operator=(const SALOME_ListIO& Other) -{ - Assign(Other); -} - -Standard_EXPORT Standard_Integer Extent() const; -Standard_EXPORT void Clear() ; -~SALOME_ListIO() -{ - Clear(); -} - -Standard_EXPORT Standard_Boolean IsEmpty() const; -Standard_EXPORT void Prepend(const Handle(SALOME_InteractiveObject)& I) ; -Standard_EXPORT void Prepend(SALOME_ListIO& Other) ; -Standard_EXPORT void Prepend(const Handle(SALOME_InteractiveObject)& I, SALOME_ListIteratorOfListIO& It) ; -Standard_EXPORT void Append(const Handle(SALOME_InteractiveObject)& I) ; -Standard_EXPORT void Append(SALOME_ListIO& Other) ; -Standard_EXPORT void Append(const Handle(SALOME_InteractiveObject)& I, SALOME_ListIteratorOfListIO& It) ; -Standard_EXPORT Handle_SALOME_InteractiveObject& First() const; -Standard_EXPORT Handle_SALOME_InteractiveObject& Last() const; -Standard_EXPORT void RemoveFirst() ; -Standard_EXPORT void Remove(SALOME_ListIteratorOfListIO& It) ; -Standard_EXPORT void InsertBefore(const Handle(SALOME_InteractiveObject)& I,SALOME_ListIteratorOfListIO& It) ; -Standard_EXPORT void InsertBefore(SALOME_ListIO& Other,SALOME_ListIteratorOfListIO& It) ; -Standard_EXPORT void InsertAfter(const Handle(SALOME_InteractiveObject)& I,SALOME_ListIteratorOfListIO& It) ; -Standard_EXPORT void InsertAfter(SALOME_ListIO& Other,SALOME_ListIteratorOfListIO& It) ; - - -friend class SALOME_ListIteratorOfListIO; - - - -protected: - - // Methods PROTECTED - // +#ifndef SALOME_LISTIO_HXX +#define SALOME_LISTIO_HXX +#include +#include "SALOME_InteractiveObject.hxx" - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // -Standard_EXPORT SALOME_ListIO(const SALOME_ListIO& Other); - - - // Fields PRIVATE - // -Standard_Address myFirst; -Standard_Address myLast; - - -}; - -#define Item Handle_SALOME_InteractiveObject -#define Item_hxx "SALOME_InteractiveObject.hxx" -#define TCollection_ListNode SALOME_ListNodeOfListIO -#define TCollection_ListNode_hxx "SALOME_ListNodeOfListIO.hxx" -#define TCollection_ListIterator SALOME_ListIteratorOfListIO -#define TCollection_ListIterator_hxx "SALOME_ListIteratorOfListIO.hxx" -#define Handle_TCollection_ListNode Handle_SALOME_ListNodeOfListIO -#define TCollection_ListNode_Type_() SALOME_ListNodeOfListIO_Type_() -#define TCollection_List SALOME_ListIO -#define TCollection_List_hxx "SALOME_ListIO.hxx" - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - +class SALOME_ListIO : public NCollection_List {}; +typedef SALOME_ListIO::Iterator SALOME_ListIteratorOfListIO; -#endif +#endif // SALOME_LISTIO_HXX diff --git a/src/OBJECT/SALOME_ListIO_0.cxx b/src/OBJECT/SALOME_ListIO_0.cxx deleted file mode 100644 index a9300f65c..000000000 --- a/src/OBJECT/SALOME_ListIO_0.cxx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_ListIO_0.cxx - -#include "SALOME_ListIO.hxx" - -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _SALOME_ListIteratorOfListIO_HeaderFile -#include "SALOME_ListIteratorOfListIO.hxx" -#endif -#ifndef _SALOME_InteractiveObject_HeaderFile -#include "SALOME_InteractiveObject.hxx" -#endif -#ifndef _SALOME_ListNodeOfListIO_HeaderFile -#include "SALOME_ListNodeOfListIO.hxx" -#endif - -#define Item Handle_SALOME_InteractiveObject -#define Item_hxx "SALOME_InteractiveObject.hxx" -#define TCollection_ListNode SALOME_ListNodeOfListIO -#define TCollection_ListNode_hxx "SALOME_ListNodeOfListIO.hxx" -#define TCollection_ListIterator SALOME_ListIteratorOfListIO -#define TCollection_ListIterator_hxx "SALOME_ListIteratorOfListIO.hxx" -#define Handle_TCollection_ListNode Handle_SALOME_ListNodeOfListIO -#define TCollection_ListNode_Type_() SALOME_ListNodeOfListIO_Type_() -#define TCollection_List SALOME_ListIO -#define TCollection_List_hxx "SALOME_ListIO.hxx" -#include - diff --git a/src/OBJECT/SALOME_ListIteratorOfListIO.hxx b/src/OBJECT/SALOME_ListIteratorOfListIO.hxx deleted file mode 100644 index e5ce75c9e..000000000 --- a/src/OBJECT/SALOME_ListIteratorOfListIO.hxx +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_ListIteratorOfListIO.hxx -// Module : SALOME -// -#ifndef _SALOME_ListIteratorOfListIO_HeaderFile -#define _SALOME_ListIteratorOfListIO_HeaderFile - -#ifndef _Standard_Address_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include "Handle_SALOME_InteractiveObject.hxx" -#endif -#ifndef _Handle_SALOME_ListNodeOfListIO_HeaderFile -#include "Handle_SALOME_ListNodeOfListIO.hxx" -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -class Standard_NoMoreObject; -class Standard_NoSuchObject; -class SALOME_ListIO; -class SALOME_InteractiveObject; -class SALOME_ListNodeOfListIO; - - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Standard_Macro_HeaderFile -#include -#endif - -class SALOME_ListIteratorOfListIO { - -public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - // Methods PUBLIC - // -Standard_EXPORT SALOME_ListIteratorOfListIO(); -Standard_EXPORT SALOME_ListIteratorOfListIO(const SALOME_ListIO& L); -Standard_EXPORT void Initialize(const SALOME_ListIO& L) ; -Standard_EXPORT Standard_Boolean More() const; -Standard_EXPORT void Next() ; -Standard_EXPORT Handle_SALOME_InteractiveObject& Value() const; - - -friend class SALOME_ListIO; - - - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Standard_Address current; -Standard_Address previous; - - -}; - -#define Item Handle_SALOME_InteractiveObject -#define Item_hxx "SALOME_InteractiveObject.hxx" -#define TCollection_ListNode SALOME_ListNodeOfListIO -#define TCollection_ListNode_hxx "SALOME_ListNodeOfListIO.hxx" -#define TCollection_ListIterator SALOME_ListIteratorOfListIO -#define TCollection_ListIterator_hxx "SALOME_ListIteratorOfListIO.hxx" -#define Handle_TCollection_ListNode Handle_SALOME_ListNodeOfListIO -#define TCollection_ListNode_Type_() SALOME_ListNodeOfListIO_Type_() -#define TCollection_List SALOME_ListIO -#define TCollection_List_hxx "SALOME_ListIO.hxx" - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/OBJECT/SALOME_ListIteratorOfListIO_0.cxx b/src/OBJECT/SALOME_ListIteratorOfListIO_0.cxx deleted file mode 100644 index c63bec047..000000000 --- a/src/OBJECT/SALOME_ListIteratorOfListIO_0.cxx +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_ListIteratorOfListIO_0.cxx - -#include "SALOME_ListIteratorOfListIO.hxx" - -#ifndef _Standard_NoMoreObject_HeaderFile -#include -#endif -#ifndef _Standard_NoSuchObject_HeaderFile -#include -#endif -#ifndef _SALOME_ListIO_HeaderFile -#include "SALOME_ListIO.hxx" -#endif -#ifndef _SALOME_InteractiveObject_HeaderFile -#include "SALOME_InteractiveObject.hxx" -#endif -#ifndef _SALOME_ListNodeOfListIO_HeaderFile -#include "SALOME_ListNodeOfListIO.hxx" -#endif - - -#define Item Handle_SALOME_InteractiveObject -#define Item_hxx "SALOME_InteractiveObject.hxx" -#define TCollection_ListNode SALOME_ListNodeOfListIO -#define TCollection_ListNode_hxx "SALOME_ListNodeOfListIO.hxx" -#define TCollection_ListIterator SALOME_ListIteratorOfListIO -#define TCollection_ListIterator_hxx "SALOME_ListIteratorOfListIO.hxx" -#define Handle_TCollection_ListNode Handle_SALOME_ListNodeOfListIO -#define TCollection_ListNode_Type_() SALOME_ListNodeOfListIO_Type_() -#define TCollection_List SALOME_ListIO -#define TCollection_List_hxx "SALOME_ListIO.hxx" -#include - diff --git a/src/OBJECT/SALOME_ListNodeOfListIO.hxx b/src/OBJECT/SALOME_ListNodeOfListIO.hxx deleted file mode 100644 index 48a4ee71f..000000000 --- a/src/OBJECT/SALOME_ListNodeOfListIO.hxx +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_ListNodeOfListIO.hxx -// Module : SALOME -// -#ifndef _SALOME_ListNodeOfListIO_HeaderFile -#define _SALOME_ListNodeOfListIO_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_ListNodeOfListIO_HeaderFile -#include "Handle_SALOME_ListNodeOfListIO.hxx" -#endif - -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include "Handle_SALOME_InteractiveObject.hxx" -#endif -#ifndef _TCollection_MapNode_HeaderFile -#include -#endif -#ifndef _TCollection_MapNodePtr_HeaderFile -#include -#endif -class SALOME_InteractiveObject; -class SALOME_ListIO; -class SALOME_ListIteratorOfListIO; - -/*! - \class SALOME_ListNodeOfListIO - Auxiliary class, represents list node for SALOME_ListIO -*/ -class SALOME_ListNodeOfListIO : public TCollection_MapNode { - -public: - - void* operator new(size_t,void* anAddress) - { - return anAddress; - } - void* operator new(size_t size) - { - return Standard::Allocate(size); - } - void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } - // Methods PUBLIC - // -SALOME_ListNodeOfListIO(const Handle(SALOME_InteractiveObject)& I,const TCollection_MapNodePtr& n); - Handle_SALOME_InteractiveObject& Value() const; -Standard_EXPORT ~SALOME_ListNodeOfListIO(); - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& SALOME_ListNodeOfListIO_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; - -protected: - - // Methods PROTECTED - // - - - // Fields PROTECTED - // - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // -Handle_SALOME_InteractiveObject myValue; - - -}; - -#define Item Handle_SALOME_InteractiveObject -#define Item_hxx "SALOME_InteractiveObject.hxx" -#define TCollection_ListNode SALOME_ListNodeOfListIO -#define TCollection_ListNode_hxx "SALOME_ListNodeOfListIO.hxx" -#define TCollection_ListIterator SALOME_ListIteratorOfListIO -#define TCollection_ListIterator_hxx "SALOME_ListIteratorOfListIO.hxx" -#define Handle_TCollection_ListNode Handle_SALOME_ListNodeOfListIO -#define TCollection_ListNode_Type_() SALOME_ListNodeOfListIO_Type_() -#define TCollection_List SALOME_ListIO -#define TCollection_List_hxx "SALOME_ListIO.hxx" - -#include - -#undef Item -#undef Item_hxx -#undef TCollection_ListNode -#undef TCollection_ListNode_hxx -#undef TCollection_ListIterator -#undef TCollection_ListIterator_hxx -#undef Handle_TCollection_ListNode -#undef TCollection_ListNode_Type_ -#undef TCollection_List -#undef TCollection_List_hxx - - -// other Inline functions and methods (like "C++: function call" methods) -// - - -#endif diff --git a/src/OBJECT/SALOME_ListNodeOfListIO_0.cxx b/src/OBJECT/SALOME_ListNodeOfListIO_0.cxx deleted file mode 100644 index fbfb93f40..000000000 --- a/src/OBJECT/SALOME_ListNodeOfListIO_0.cxx +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_ListNodeOfListIO_0.cxx - -#include "SALOME_ListNodeOfListIO.hxx" - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -#ifndef _SALOME_InteractiveObject_HeaderFile -#include "SALOME_InteractiveObject.hxx" -#endif -#ifndef _SALOME_ListIO_HeaderFile -#include "SALOME_ListIO.hxx" -#endif -#ifndef _SALOME_ListIteratorOfListIO_HeaderFile -#include "SALOME_ListIteratorOfListIO.hxx" -#endif - -/*! - Destructor -*/ -SALOME_ListNodeOfListIO::~SALOME_ListNodeOfListIO() {} - - -/*! - \return OCC Handle Type -*/ -Standard_EXPORT Handle_Standard_Type& SALOME_ListNodeOfListIO_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(TCollection_MapNode); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(TCollection_MapNode); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("SALOME_ListNodeOfListIO", - sizeof(SALOME_ListNodeOfListIO), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -/*! - DownCast method, allows safe downcasting -*/ -const Handle(SALOME_ListNodeOfListIO) Handle(SALOME_ListNodeOfListIO)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(SALOME_ListNodeOfListIO) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(SALOME_ListNodeOfListIO))) { - _anOtherObject = Handle(SALOME_ListNodeOfListIO)((Handle(SALOME_ListNodeOfListIO)&)AnObject); - } - } - - return _anOtherObject ; -} - -/*! - \return OCC Handle dynamic Type -*/ -const Handle(Standard_Type)& SALOME_ListNodeOfListIO::DynamicType() const -{ - return STANDARD_TYPE(SALOME_ListNodeOfListIO) ; -} - -/*! - \return true if other type is the same - \param AType - type to be checked -*/ -Standard_Boolean SALOME_ListNodeOfListIO::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(SALOME_ListNodeOfListIO) == AType || TCollection_MapNode::IsKind(AType)); -} -/*! - Destructor -*/ -Handle_SALOME_ListNodeOfListIO::~Handle_SALOME_ListNodeOfListIO() {} -#define Item Handle_SALOME_InteractiveObject -#define Item_hxx "SALOME_InteractiveObject.hxx" -#define TCollection_ListNode SALOME_ListNodeOfListIO -#define TCollection_ListNode_hxx "SALOME_ListNodeOfListIO.hxx" -#define TCollection_ListIterator SALOME_ListIteratorOfListIO -#define TCollection_ListIterator_hxx "SALOME_ListIteratorOfListIO.hxx" -#define Handle_TCollection_ListNode Handle_SALOME_ListNodeOfListIO -#define TCollection_ListNode_Type_() SALOME_ListNodeOfListIO_Type_() -#define TCollection_List SALOME_ListIO -#define TCollection_List_hxx "SALOME_ListIO.hxx" -#include - diff --git a/src/OBJECT/SALOME_Selection.h b/src/OBJECT/SALOME_Selection.h index bbfee2701..ba11fdf92 100644 --- a/src/OBJECT/SALOME_Selection.h +++ b/src/OBJECT/SALOME_Selection.h @@ -20,21 +20,18 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME Selection : description of enumeration Selection_Mode -// File : SALOME_Selection.h -// Author : - #ifndef SALOME_SELECTION_H #define SALOME_SELECTION_H -enum Selection_Mode { - NodeSelection, - CellSelection, - EdgeOfCellSelection, - EdgeSelection, - FaceSelection, - VolumeSelection, - ActorSelection }; +enum Selection_Mode +{ + NodeSelection, + CellSelection, + EdgeOfCellSelection, + EdgeSelection, + FaceSelection, + VolumeSelection, + ActorSelection +}; -#endif - +#endif // SALOME_SELECTION_H diff --git a/src/OBJECT/SALOME_TypeFilter.cxx b/src/OBJECT/SALOME_TypeFilter.cxx index 81a9b2e4b..8ff9a1bb6 100644 --- a/src/OBJECT/SALOME_TypeFilter.cxx +++ b/src/OBJECT/SALOME_TypeFilter.cxx @@ -20,25 +20,32 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_TypeFilter.cxx -// Author : Nicolas REJNERI +#include "SALOME_TypeFilter.hxx" -#include "SALOME_TypeFilter.ixx" -#include "SALOME_InteractiveObject.hxx" +IMPLEMENT_STANDARD_HANDLE (SALOME_TypeFilter, SALOME_Filter) +IMPLEMENT_STANDARD_RTTIEXT(SALOME_TypeFilter, SALOME_Filter) /*! Constructor \param TheKind - type of filter */ -SALOME_TypeFilter::SALOME_TypeFilter(const Standard_CString TheKind): -myKind(TheKind){} +SALOME_TypeFilter::SALOME_TypeFilter(const Standard_CString theKind) +: myKind( theKind ) +{ +} + +/*! + Destructor +*/ +SALOME_TypeFilter::~SALOME_TypeFilter() +{ +} /*! - \return true if object passes filter - \param anObj - object to be checked + \param theObj - object to be checked + \return \c true if object passes filter */ -Standard_Boolean SALOME_TypeFilter::IsOk(const Handle(SALOME_InteractiveObject)& anObj) const +Standard_Boolean SALOME_TypeFilter::IsOk(const Handle(SALOME_InteractiveObject)& theObj) const { - return anObj->isComponentType( myKind ); + return theObj->isComponentType( myKind ); } diff --git a/src/OBJECT/SALOME_TypeFilter.hxx b/src/OBJECT/SALOME_TypeFilter.hxx index a8209dce0..79e07efe2 100644 --- a/src/OBJECT/SALOME_TypeFilter.hxx +++ b/src/OBJECT/SALOME_TypeFilter.hxx @@ -20,97 +20,29 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_TypeFilter.hxx -// Module : SALOME -// -#ifndef _SALOME_TypeFilter_HeaderFile -#define _SALOME_TypeFilter_HeaderFile - -#ifndef _Standard_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_TypeFilter_HeaderFile -#include "Handle_SALOME_TypeFilter.hxx" -#endif +#ifndef SALOME_TYPEFILTER_HXX +#define SALOME_TYPEFILTER_HXX -#ifndef _Standard_CString_HeaderFile -#include -#endif -#ifndef _SALOME_Filter_HeaderFile #include "SALOME_Filter.hxx" -#endif -#ifndef _Standard_Boolean_HeaderFile -#include -#endif -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include -#endif -class SALOME_TypeFilter : public SALOME_Filter { +#include +#include +class SALOME_TypeFilter : public SALOME_Filter +{ public: + Standard_EXPORT SALOME_TypeFilter(const Standard_CString theKind); + Standard_EXPORT ~SALOME_TypeFilter(); - inline void* operator new(size_t,void* anAddress) - { - return anAddress; - } - inline void* operator new(size_t size) - { - return Standard::Allocate(size); - } - inline void operator delete(void *anAddress) - { - if (anAddress) Standard::Free((Standard_Address&)anAddress); - } -// inline void operator delete(void *anAddress, size_t size) -// { -// if (anAddress) Standard::Free((Standard_Address&)anAddress,size); -// } - // Methods PUBLIC - // -Standard_EXPORT SALOME_TypeFilter(const Standard_CString aGivenKind); -Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& anobj) const; -Standard_EXPORT ~SALOME_TypeFilter(); - - - - - // Type management - // - Standard_EXPORT friend Handle_Standard_Type& SALOME_TypeFilter_Type_(); - Standard_EXPORT const Handle(Standard_Type)& DynamicType() const; - Standard_EXPORT Standard_Boolean IsKind(const Handle(Standard_Type)&) const; + Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& theObj) const; protected: + Standard_CString myKind; - // Methods PROTECTED - // - - - // Fields PROTECTED - // -Standard_CString myKind; - - -private: - - // Methods PRIVATE - // - - - // Fields PRIVATE - // - - +public: + DEFINE_STANDARD_RTTI(SALOME_TypeFilter); }; +DEFINE_STANDARD_HANDLE(SALOME_TypeFilter, SALOME_Filter) - - - -// other inline functions and methods (like "C++: function call" methods) -// - - -#endif +#endif // SALOME_TYPEFILTER_HXX diff --git a/src/OBJECT/SALOME_TypeFilter.ixx b/src/OBJECT/SALOME_TypeFilter.ixx deleted file mode 100644 index 567967d55..000000000 --- a/src/OBJECT/SALOME_TypeFilter.ixx +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_TypeFilter.ixx -// Module : SALOME -// -#include "SALOME_TypeFilter.jxx" - -#ifndef _Standard_TypeMismatch_HeaderFile -#include -#endif - -SALOME_TypeFilter::~SALOME_TypeFilter() {} - - - -Standard_EXPORT Handle_Standard_Type& SALOME_TypeFilter_Type_() -{ - - static Handle_Standard_Type aType1 = STANDARD_TYPE(SALOME_Filter); - if ( aType1.IsNull()) aType1 = STANDARD_TYPE(SALOME_Filter); - static Handle_Standard_Type aType2 = STANDARD_TYPE(MMgt_TShared); - if ( aType2.IsNull()) aType2 = STANDARD_TYPE(MMgt_TShared); - static Handle_Standard_Type aType3 = STANDARD_TYPE(Standard_Transient); - if ( aType3.IsNull()) aType3 = STANDARD_TYPE(Standard_Transient); - - - static Handle_Standard_Transient _Ancestors[]= {aType1,aType2,aType3,NULL}; - static Handle_Standard_Type _aType = new Standard_Type("SALOME_TypeFilter", - sizeof(SALOME_TypeFilter), - 1, - (Standard_Address)_Ancestors, - (Standard_Address)NULL); - - return _aType; -} - - -// DownCast method -// allow safe downcasting -// -const Handle(SALOME_TypeFilter) Handle(SALOME_TypeFilter)::DownCast(const Handle(Standard_Transient)& AnObject) -{ - Handle(SALOME_TypeFilter) _anOtherObject; - - if (!AnObject.IsNull()) { - if (AnObject->IsKind(STANDARD_TYPE(SALOME_TypeFilter))) { - _anOtherObject = Handle(SALOME_TypeFilter)((Handle(SALOME_TypeFilter)&)AnObject); - } - } - - return _anOtherObject ; -} -const Handle(Standard_Type)& SALOME_TypeFilter::DynamicType() const -{ - return STANDARD_TYPE(SALOME_TypeFilter) ; -} -Standard_Boolean SALOME_TypeFilter::IsKind(const Handle(Standard_Type)& AType) const -{ - return (STANDARD_TYPE(SALOME_TypeFilter) == AType || SALOME_Filter::IsKind(AType)); -} -Handle_SALOME_TypeFilter::~Handle_SALOME_TypeFilter() {} - diff --git a/src/OBJECT/SALOME_TypeFilter.jxx b/src/OBJECT/SALOME_TypeFilter.jxx deleted file mode 100644 index 27ca0c768..000000000 --- a/src/OBJECT/SALOME_TypeFilter.jxx +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -// SALOME SALOMEGUI : implementation of desktop and GUI kernel -// File : SALOME_TypeFilter.jxx -// Module : SALOME -// -#ifndef _SALOME_TypeFilter_HeaderFile -#include "SALOME_TypeFilter.hxx" -#endif diff --git a/src/OCCViewer/OCCViewer_VService.h b/src/OCCViewer/OCCViewer_VService.h index 1624930a1..bb6dd4792 100755 --- a/src/OCCViewer/OCCViewer_VService.h +++ b/src/OCCViewer/OCCViewer_VService.h @@ -23,9 +23,9 @@ #ifndef OCCVIEWER_VSERVICE_H #define OCCVIEWER_VSERVICE_H -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/src/SALOME_SWIG/SALOMEGUI_Swig.cxx b/src/SALOME_SWIG/SALOMEGUI_Swig.cxx index eb14a5384..c1b77c74c 100644 --- a/src/SALOME_SWIG/SALOMEGUI_Swig.cxx +++ b/src/SALOME_SWIG/SALOMEGUI_Swig.cxx @@ -45,7 +45,6 @@ #ifndef DISABLE_SALOMEOBJECT #include #include - #include #ifndef DISABLE_OCCVIEWER #include #include diff --git a/src/SPlot2d/SPlot2d_Curve.h b/src/SPlot2d/SPlot2d_Curve.h index 5a96ce04a..ab4640cd8 100644 --- a/src/SPlot2d/SPlot2d_Curve.h +++ b/src/SPlot2d/SPlot2d_Curve.h @@ -27,15 +27,10 @@ #include "SPlot2d.h" #include "Plot2d_Curve.h" - +#include "SALOME_InteractiveObject.hxx" #include -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include -#endif -#include "SALOME_InteractiveObject.hxx" - typedef QSet OwnerSet; class SPLOT2D_EXPORT SPlot2d_Curve : public Plot2d_Curve diff --git a/src/SPlot2d/SPlot2d_Histogram.h b/src/SPlot2d/SPlot2d_Histogram.h index 704854c94..ae549bd0d 100644 --- a/src/SPlot2d/SPlot2d_Histogram.h +++ b/src/SPlot2d/SPlot2d_Histogram.h @@ -26,12 +26,7 @@ #define SPlot2d_Histogram_h #include "SPlot2d.h" - #include "Plot2d_Histogram.h" - -#ifndef _Handle_SALOME_InteractiveObject_HeaderFile -#include -#endif #include "SALOME_InteractiveObject.hxx" class SPLOT2D_EXPORT SPlot2d_Histogram : public Plot2d_Histogram diff --git a/src/SPlot2d/SPlot2d_ViewModel.cxx b/src/SPlot2d/SPlot2d_ViewModel.cxx index 4bb3a4c03..401a613c3 100644 --- a/src/SPlot2d/SPlot2d_ViewModel.cxx +++ b/src/SPlot2d/SPlot2d_ViewModel.cxx @@ -35,7 +35,6 @@ #include "SUIT_ViewManager.h" #include "SALOME_ListIO.hxx" -#include "SALOME_ListIteratorOfListIO.hxx" #include #include diff --git a/src/SVTK/SVTK_View.cxx b/src/SVTK/SVTK_View.cxx index 8f991cded..3f2cd2f65 100644 --- a/src/SVTK/SVTK_View.cxx +++ b/src/SVTK/SVTK_View.cxx @@ -30,7 +30,7 @@ #include "SVTK_Renderer.h" #include "SVTK_ViewWindow.h" #include "SVTK_RenderWindowInteractor.h" -#include "SALOME_ListIteratorOfListIO.hxx" +#include "SALOME_ListIO.hxx" #include "VTKViewer_Algorithm.h" #include "SVTK_Functor.h" diff --git a/src/SVTK/SVTK_ViewWindow.cxx b/src/SVTK/SVTK_ViewWindow.cxx index bd64d9aa8..49b496192 100755 --- a/src/SVTK/SVTK_ViewWindow.cxx +++ b/src/SVTK/SVTK_ViewWindow.cxx @@ -96,7 +96,7 @@ #include "vtkPVAxesWidget.h" #include "vtkPVAxesActor.h" -#include "SALOME_ListIteratorOfListIO.hxx" +#include "SALOME_ListIO.hxx" #include "VTKViewer_Algorithm.h" #include "SVTK_Functor.h" diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx index a5dcd6bbc..12ff6b9a3 100644 --- a/src/SalomeApp/SalomeApp_Application.cxx +++ b/src/SalomeApp/SalomeApp_Application.cxx @@ -98,7 +98,6 @@ #include #include -#include #include diff --git a/src/SalomeApp/SalomeApp_Module.cxx b/src/SalomeApp/SalomeApp_Module.cxx index 2b8fb0ae9..99defa4cf 100644 --- a/src/SalomeApp/SalomeApp_Module.cxx +++ b/src/SalomeApp/SalomeApp_Module.cxx @@ -38,7 +38,6 @@ //#include "OB_Browser.h" #include -#include #include #include diff --git a/src/ViewerData/ViewerData_AISShape.cxx b/src/ViewerData/ViewerData_AISShape.cxx index 38f7e68a7..08eac8a56 100644 --- a/src/ViewerData/ViewerData_AISShape.cxx +++ b/src/ViewerData/ViewerData_AISShape.cxx @@ -22,15 +22,32 @@ #include "ViewerData_AISShape.hxx" +#ifdef USE_TEXTURED_SHAPE IMPLEMENT_STANDARD_HANDLE (ViewerData_AISShape, AIS_TexturedShape) IMPLEMENT_STANDARD_RTTIEXT(ViewerData_AISShape, AIS_TexturedShape) +#else +IMPLEMENT_STANDARD_HANDLE (ViewerData_AISShape, AIS_Shape) +IMPLEMENT_STANDARD_RTTIEXT(ViewerData_AISShape, AIS_Shape) +#endif /*! Constructor \param shape - TopoDS shape */ ViewerData_AISShape::ViewerData_AISShape (const TopoDS_Shape& theShape) +#ifdef USE_TEXTURED_SHAPE : AIS_TexturedShape (theShape), +#else +: AIS_Shape (theShape), +#endif myIsClippable (true) { } + +/*! + Destructor +*/ +ViewerData_AISShape::~ViewerData_AISShape() +{ +} + diff --git a/src/ViewerData/ViewerData_AISShape.hxx b/src/ViewerData/ViewerData_AISShape.hxx index 8fb0cd2dd..0d7fb6d63 100644 --- a/src/ViewerData/ViewerData_AISShape.hxx +++ b/src/ViewerData/ViewerData_AISShape.hxx @@ -23,17 +23,28 @@ #ifndef _ViewerData_AISShape_HeaderFile #define _ViewerData_AISShape_HeaderFile -#ifndef _AIS_TexturedShape_HeaderFile -#include +// When below macro is defined, AIS_TexturedShape is used as base class +#define USE_TEXTURED_SHAPE + +#ifdef USE_TEXTURED_SHAPE + #include +#else + #include #endif #include #include -class ViewerData_AISShape : public AIS_TexturedShape +class ViewerData_AISShape +#ifdef USE_TEXTURED_SHAPE + : public AIS_TexturedShape +#else + : public AIS_Shape +#endif { public: Standard_EXPORT ViewerData_AISShape (const TopoDS_Shape& theShape); + Standard_EXPORT ~ViewerData_AISShape(); // checks if shape is clippable Standard_EXPORT inline bool IsClippable() const @@ -54,6 +65,10 @@ public: DEFINE_STANDARD_RTTI(ViewerData_AISShape) }; +#ifdef USE_TEXTURED_SHAPE DEFINE_STANDARD_HANDLE(ViewerData_AISShape, AIS_TexturedShape) - +#else +DEFINE_STANDARD_HANDLE(ViewerData_AISShape, AIS_Shape) #endif + +#endif // _ViewerData_AISShape_HeaderFile -- 2.39.2