Salome HOME
0021031: EDF 1646 GEOM: Modify Location leads to Position driver failed
[modules/geom.git] / src / GEOMImpl / GEOMImpl_Gen.cxx
index 124c0499c147fb7586c382bfe303e7a4675ebffb..95b33cd2db28bae3366f3e685ee4d85fbe1adee6 100644 (file)
@@ -1,53 +1,88 @@
-using namespace std;
-
-#include "GEOMImpl_Gen.hxx"
+//  Copyright (C) 2007-2010  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.
+//
+//  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
+//
+
+#ifdef WNT
+#pragma warning( disable:4786 )
+#endif
+
+#include <Standard_Stream.hxx>
+
+#include <GEOMImpl_Gen.hxx>
 
 #include "utilities.h"
-#include "OpUtil.hxx"
-#include "Utils_ExceptHandlers.hxx"
+#include <OpUtil.hxx>
+#include <Utils_ExceptHandlers.hxx>
 
 #include <TFunction_Driver.hxx>
 #include <TFunction_DriverTable.hxx>
 
-#include "GEOMImpl_PointDriver.hxx"
-#include "GEOMImpl_VectorDriver.hxx"
-#include "GEOMImpl_LineDriver.hxx"
-#include "GEOMImpl_PlaneDriver.hxx"
-#include "GEOMImpl_MarkerDriver.hxx"
-#include "GEOMImpl_ArcDriver.hxx"
-#include "GEOMImpl_CircleDriver.hxx"
-#include "GEOMImpl_EllipseDriver.hxx"
-#include "GEOMImpl_PolylineDriver.hxx"
-#include "GEOMImpl_SplineDriver.hxx"
-#include "GEOMImpl_SketcherDriver.hxx"
-#include "GEOMImpl_BoxDriver.hxx"
-#include "GEOMImpl_ConeDriver.hxx"
-#include "GEOMImpl_CylinderDriver.hxx"
-#include "GEOMImpl_PrismDriver.hxx"
-#include "GEOMImpl_PipeDriver.hxx"
-#include "GEOMImpl_RevolutionDriver.hxx"
-#include "GEOMImpl_ShapeDriver.hxx"
-#include "GEOMImpl_BlockDriver.hxx"
-#include "GEOMImpl_SphereDriver.hxx"
-#include "GEOMImpl_TorusDriver.hxx"
-#include "GEOMImpl_BooleanDriver.hxx"
-#include "GEOMImpl_ChamferDriver.hxx"
-#include "GEOMImpl_FilletDriver.hxx"
-#include "GEOMImpl_TranslateDriver.hxx"
-#include "GEOMImpl_RotateDriver.hxx"
-#include "GEOMImpl_MirrorDriver.hxx"
-#include "GEOMImpl_OffsetDriver.hxx"
-#include "GEOMImpl_ScaleDriver.hxx"
-#include "GEOMImpl_PositionDriver.hxx"
-#include "GEOMImpl_PartitionDriver.hxx"
-#include "GEOMImpl_CopyDriver.hxx"
-#include "GEOMImpl_ExportDriver.hxx"
-#include "GEOMImpl_ImportDriver.hxx"
-#include "GEOMImpl_ArchimedeDriver.hxx"
-#include "GEOMImpl_HealingDriver.hxx"
-#include "GEOMImpl_FillingDriver.hxx"
-#include "GEOMImpl_GlueDriver.hxx"
-#include "GEOMImpl_MeasureDriver.hxx"
+#include <GEOMImpl_PointDriver.hxx>
+#include <GEOMImpl_VectorDriver.hxx>
+#include <GEOMImpl_LineDriver.hxx>
+#include <GEOMImpl_PlaneDriver.hxx>
+#include <GEOMImpl_MarkerDriver.hxx>
+#include <GEOMImpl_ArcDriver.hxx>
+#include <GEOMImpl_CircleDriver.hxx>
+#include <GEOMImpl_EllipseDriver.hxx>
+#include <GEOMImpl_PolylineDriver.hxx>
+#include <GEOMImpl_SplineDriver.hxx>
+#include <GEOMImpl_SketcherDriver.hxx>
+#include <GEOMImpl_3DSketcherDriver.hxx>
+#include <GEOMImpl_BoxDriver.hxx>
+#include <GEOMImpl_FaceDriver.hxx>
+#include <GEOMImpl_DiskDriver.hxx>
+#include <GEOMImpl_ConeDriver.hxx>
+#include <GEOMImpl_CylinderDriver.hxx>
+#include <GEOMImpl_PrismDriver.hxx>
+#include <GEOMImpl_PipeDriver.hxx>
+#include <GEOMImpl_ThruSectionsDriver.hxx>
+#include <GEOMImpl_RevolutionDriver.hxx>
+#include <GEOMImpl_ShapeDriver.hxx>
+#include <GEOMImpl_BlockDriver.hxx>
+#include <GEOMImpl_SphereDriver.hxx>
+#include <GEOMImpl_TorusDriver.hxx>
+#include <GEOMImpl_BooleanDriver.hxx>
+#include <GEOMImpl_ChamferDriver.hxx>
+#include <GEOMImpl_FilletDriver.hxx>
+#include <GEOMImpl_Fillet1dDriver.hxx>
+#include <GEOMImpl_Fillet2dDriver.hxx>
+#include <GEOMImpl_TranslateDriver.hxx>
+#include <GEOMImpl_RotateDriver.hxx>
+#include <GEOMImpl_MirrorDriver.hxx>
+#include <GEOMImpl_OffsetDriver.hxx>
+#include <GEOMImpl_ScaleDriver.hxx>
+#include <GEOMImpl_PositionDriver.hxx>
+#include <GEOMImpl_PartitionDriver.hxx>
+#include <GEOMImpl_CopyDriver.hxx>
+#include <GEOMImpl_ExportDriver.hxx>
+#include <GEOMImpl_ImportDriver.hxx>
+#include <GEOMImpl_ArchimedeDriver.hxx>
+#include <GEOMImpl_HealingDriver.hxx>
+#include <GEOMImpl_FillingDriver.hxx>
+#include <GEOMImpl_GlueDriver.hxx>
+#include <GEOMImpl_MeasureDriver.hxx>
+// Advanced operations
+#include <GEOMImpl_PipeTShapeDriver.hxx>
+/*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
 
 //=============================================================================
 /*!
@@ -74,13 +109,17 @@ GEOMImpl_Gen::GEOMImpl_Gen()
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PolylineDriver::GetID(), new GEOMImpl_PolylineDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SplineDriver::GetID(), new GEOMImpl_SplineDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SketcherDriver::GetID(), new GEOMImpl_SketcherDriver());
+   TFunction_DriverTable::Get()->AddDriver(GEOMImpl_3DSketcherDriver::GetID(), new GEOMImpl_3DSketcherDriver());
 
    // 3D Primitives
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_BoxDriver::GetID(), new GEOMImpl_BoxDriver());
+   TFunction_DriverTable::Get()->AddDriver(GEOMImpl_FaceDriver::GetID(), new GEOMImpl_FaceDriver());
+   TFunction_DriverTable::Get()->AddDriver(GEOMImpl_DiskDriver::GetID(), new GEOMImpl_DiskDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ConeDriver::GetID(), new GEOMImpl_ConeDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_CylinderDriver::GetID(), new GEOMImpl_CylinderDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PrismDriver::GetID(), new GEOMImpl_PrismDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PipeDriver::GetID(), new GEOMImpl_PipeDriver());
+   TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ThruSectionsDriver::GetID(), new GEOMImpl_ThruSectionsDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_RevolutionDriver::GetID(), new GEOMImpl_RevolutionDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_SphereDriver::GetID(), new GEOMImpl_SphereDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_TorusDriver::GetID(), new GEOMImpl_TorusDriver());
@@ -100,6 +139,8 @@ GEOMImpl_Gen::GEOMImpl_Gen()
    // Local Operations
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ChamferDriver::GetID(), new GEOMImpl_ChamferDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_FilletDriver::GetID(), new GEOMImpl_FilletDriver());
+   TFunction_DriverTable::Get()->AddDriver(GEOMImpl_Fillet1dDriver::GetID(), new GEOMImpl_Fillet1dDriver());
+   TFunction_DriverTable::Get()->AddDriver(GEOMImpl_Fillet2dDriver::GetID(), new GEOMImpl_Fillet2dDriver());
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_ArchimedeDriver::GetID(), new GEOMImpl_ArchimedeDriver());
 
    // Geometrical Transformations, Offset, Scale
@@ -121,6 +162,10 @@ GEOMImpl_Gen::GEOMImpl_Gen()
    // Measurements
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_MeasureDriver::GetID(), new GEOMImpl_MeasureDriver());
 
+   // Advanced operations
+   TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PipeTShapeDriver::GetID(), new GEOMImpl_PipeTShapeDriver());
+   /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/
+
    SetEngine(this);
 }
 
@@ -350,3 +395,18 @@ GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
 
   return _mapOfGroupOperations[theDocID];
 }
+
+//=============================================================================
+/*!
+ * GetIAdvancedOperations
+ */
+//=============================================================================
+GEOMImpl_IAdvancedOperations* GEOMImpl_Gen::GetIAdvancedOperations(int theDocID)
+{
+  if(_mapOfAdvancedOperations.find(theDocID) == _mapOfAdvancedOperations.end()) {
+    _mapOfAdvancedOperations[theDocID] = new GEOMImpl_IAdvancedOperations(this, theDocID);
+  }
+
+  return _mapOfAdvancedOperations[theDocID];
+}
+