Salome HOME
Copyrights update 2015.
[modules/geom.git] / src / GEOMImpl / GEOMImpl_CopyDriver.hxx
1 // Copyright (C) 2007-2015  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  File   : GEOMImpl_CopyDriver.ixx
24 //  Module : GEOMImpl
25 //
26 #ifndef _GEOMImpl_CopyDriver_HeaderFile
27 #define _GEOMImpl_CopyDriver_HeaderFile
28
29 class TopoDS_Shape;
30 class TopTools_IndexedDataMapOfShapeListOfShape;
31 class TopTools_IndexedMapOfShape;
32 class Standard_GUID;
33
34
35 #include "GEOM_BaseDriver.hxx"
36
37
38 DEFINE_STANDARD_HANDLE( GEOMImpl_CopyDriver, GEOM_BaseDriver );
39
40 class GEOMImpl_CopyDriver : public GEOM_BaseDriver {
41
42 public:
43
44  // Methods PUBLIC
45  // 
46 Standard_EXPORT GEOMImpl_CopyDriver();
47 Standard_EXPORT virtual  Standard_Integer Execute(TFunction_Logbook& log) const; 
48 Standard_EXPORT virtual void Validate(TFunction_Logbook&) const {}
49 Standard_EXPORT Standard_Boolean MustExecute(const TFunction_Logbook&) const { return Standard_True; }
50 Standard_EXPORT static const Standard_GUID& GetID();
51 Standard_EXPORT ~GEOMImpl_CopyDriver() {};
52
53   Standard_EXPORT virtual
54   bool GetCreationInformation(std::string&             theOperationName,
55                               std::vector<GEOM_Param>& params);
56
57 DEFINE_STANDARD_RTTI( GEOMImpl_CopyDriver )
58
59 private:
60
61   Standard_Integer transferData(TFunction_Logbook& log) const;
62
63   Standard_Boolean getInPlace
64     (const TopoDS_Shape                              &theSourceShape,
65      const TopTools_IndexedMapOfShape                &theSourceIndices,
66      const TopoDS_Shape                              &theDestinationShape,
67            TopTools_IndexedDataMapOfShapeListOfShape &theMapSourceDest) const;
68
69   Standard_Boolean getInPlaceOld
70     (const Handle(GEOM_Function)                     &theSourceShapeRef,
71      const TopTools_IndexedMapOfShape                &theSourceIndices,
72      const TopoDS_Shape                              &theDestinationShape,
73            TopTools_IndexedDataMapOfShapeListOfShape &theMapSourceDest) const;
74
75   Standard_Boolean getInPlaceByHistory
76     (const Handle(GEOM_Function)                     &theSourceShapeRef,
77      const TopTools_IndexedMapOfShape                &theSourceIndices,
78      const TopoDS_Shape                              &theDestinationShape,
79      const Handle(GEOM_Function)                     &theDestinationRef,
80            TopTools_IndexedDataMapOfShapeListOfShape &theMapSourceDest) const;
81
82 };
83
84 #endif