X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMImpl%2FGEOMImpl_Gen.cxx;h=081bf21255d9beff033d080d1dcee6b5f2bc0e74;hb=ed87a1f7c81ec39992aff1f463d73dc81e5791e0;hp=4b91160ba33d4b899cd565a92a28ad9f29fd17b3;hpb=bc9708cd0a4a1bae5b27ec54241d889d2e9dd486;p=modules%2Fgeom.git diff --git a/src/GEOMImpl/GEOMImpl_Gen.cxx b/src/GEOMImpl/GEOMImpl_Gen.cxx index 4b91160ba..081bf2125 100644 --- a/src/GEOMImpl/GEOMImpl_Gen.cxx +++ b/src/GEOMImpl/GEOMImpl_Gen.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// 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 @@ -6,7 +6,7 @@ // 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. +// 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 @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -#ifdef WNT +#ifdef WIN32 #pragma warning( disable:4786 ) #endif @@ -82,6 +82,7 @@ #include #include #include +#include //============================================================================= /*! @@ -163,6 +164,11 @@ GEOMImpl_Gen::GEOMImpl_Gen() // Measurements TFunction_DriverTable::Get()->AddDriver(GEOMImpl_MeasureDriver::GetID(), new GEOMImpl_MeasureDriver()); + // Field + TFunction_DriverTable::Get()->AddDriver(GEOMImpl_FieldDriver::GetID(), new GEOMImpl_FieldDriver()); + + /*@@ insert new functions before this line @@ do not remove this line @@ do not remove this line @@*/ + SetEngine(this); } @@ -223,6 +229,10 @@ GEOMImpl_Gen::~GEOMImpl_Gen() std::map::iterator aGroupIter = _mapOfGroupOperations.begin(); for (; aGroupIter != _mapOfGroupOperations.end(); aGroupIter++) delete (*aGroupIter).second; + + std::map::iterator aFieldIter = _mapOfFieldOperations.begin(); + for (; aFieldIter != _mapOfFieldOperations.end(); aFieldIter++) + delete (*aFieldIter).second; } //============================================================================= @@ -392,3 +402,17 @@ GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID) return _mapOfGroupOperations[theDocID]; } + +//============================================================================= +/*! + * GetIFieldOperations + */ +//============================================================================= +GEOMImpl_IFieldOperations* GEOMImpl_Gen::GetIFieldOperations(int theDocID) +{ + if(_mapOfFieldOperations.find(theDocID) == _mapOfFieldOperations.end()) { + _mapOfFieldOperations[theDocID] = new GEOMImpl_IFieldOperations(this, theDocID); + } + + return _mapOfFieldOperations[theDocID]; +}