]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOMAlgo/GEOMAlgo_BuilderArea.cxx
Salome HOME
0021672: [CEA 565] Dump Study from script
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_BuilderArea.cxx
index 557e8eecb87c989fefc5e3ea8c3bb8b1e3118738..d2dbd991b909c237df6e47bf5cc79c94afe29823 100755 (executable)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2012  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
 //
 
 // File:        GEOMAlgo_BuilderArea.cxx
-// Created:     
-// Author:      Peter KURNEV 
+// Created:
+// Author:      Peter KURNEV
 //
-#include <GEOMAlgo_BuilderArea.ixx>
+#include <GEOMAlgo_BuilderArea.hxx>
 
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <TopoDS_Shape.hxx>
+#include <IntTools_Context.hxx>
 
 //=======================================================================
-//function : 
-//purpose  : 
+//function :
+//purpose  :
 //=======================================================================
-  GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
+GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
 :
   GEOMAlgo_Algo()
 {
-  myContext=NULL;
 }
 //=======================================================================
 //function : ~
-//purpose  : 
+//purpose  :
 //=======================================================================
-  GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea()
+GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea()
 {
 }
 //=======================================================================
 //function : SetContext
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_BuilderArea::SetContext(const IntTools_Context& theContext)
+void GEOMAlgo_BuilderArea::SetContext(const Handle(IntTools_Context)& theContext)
 {
-  myContext=(IntTools_Context*)&theContext;
+  myContext=theContext;
+}
+//=======================================================================
+//function : Context
+//purpose  :
+//=======================================================================
+const Handle(IntTools_Context)& GEOMAlgo_BuilderArea::Context()const
+{
+  return myContext;
+}
+//=======================================================================
+//function : Perform
+//purpose  :
+//=======================================================================
+void GEOMAlgo_BuilderArea::Perform()
+{
+  if (myContext.IsNull()) {
+    myContext=new IntTools_Context;
+  }
 }
 //=======================================================================
 //function : SetShapes
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_BuilderArea::SetShapes(const TopTools_ListOfShape& theLF)
+void GEOMAlgo_BuilderArea::SetShapes(const TopTools_ListOfShape& theLF)
 {
   TopTools_ListIteratorOfListOfShape aIt;
   //
 }
 //=======================================================================
 //function : Shapes
-//purpose  : 
+//purpose  :
 //=======================================================================
-  const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Shapes()const
+const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Shapes()const
 {
   return myShapes;
 }
 //=======================================================================
 //function : Loops
-//purpose  : 
+//purpose  :
 //=======================================================================
-  const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Loops()const
+const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Loops()const
 {
   return myLoops;
 }
 //=======================================================================
-//function : Solids
-//purpose  : 
+//function : Areas
+//purpose  :
 //=======================================================================
-  const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Areas()const
+const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Areas()const
 {
   return myAreas;
 }
 //=======================================================================
 //function :PerformShapesToAvoid
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_BuilderArea::PerformShapesToAvoid()
+void GEOMAlgo_BuilderArea::PerformShapesToAvoid()
 {
 }
 //=======================================================================
 //function : PerformLoops
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_BuilderArea::PerformLoops()
+void GEOMAlgo_BuilderArea::PerformLoops()
 {
 }
 //=======================================================================
 //function : PerformAreas
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_BuilderArea::PerformAreas()
+void GEOMAlgo_BuilderArea::PerformAreas()
 {
 }
 //=======================================================================
 //function : PerformInternalShapes
-//purpose  : 
+//purpose  :
 //=======================================================================
-  void GEOMAlgo_BuilderArea::PerformInternalShapes()
+void GEOMAlgo_BuilderArea::PerformInternalShapes()
 {
 }