X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomValidators%2FGeomValidators_Finite.cpp;h=305875190bf4a1730e4b8b539b43e147dd232205;hb=91e256f2c81a2bb26bef21ad008d7d02f31d0e38;hp=c8f5d02ad17121e3a4707accc5f64f789fa9607d;hpb=87474d56199326bace66da349e9dc2c44e02d3a7;p=modules%2Fshaper.git diff --git a/src/GeomValidators/GeomValidators_Finite.cpp b/src/GeomValidators/GeomValidators_Finite.cpp old mode 100755 new mode 100644 index c8f5d02ad..305875190 --- a/src/GeomValidators/GeomValidators_Finite.cpp +++ b/src/GeomValidators/GeomValidators_Finite.cpp @@ -1,8 +1,21 @@ -// Copyright (C) 2014-20xx CEA/DEN, EDF R&D - -// File: GeomValidators_Finite.cpp -// Created: 27 Aug 2015 -// Author: Natalia ERMOLAEVA +// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// +// 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 +// #include @@ -20,23 +33,23 @@ bool GeomValidators_Finite::isValid(const AttributePtr& theAttribute, const std::string anAttributeType = theAttribute->attributeType(); if(anAttributeType == ModelAPI_AttributeSelection::typeId()) { - AttributeSelectionPtr aSelectionAttr = + AttributeSelectionPtr aSelectionAttr = std::dynamic_pointer_cast(theAttribute); ResultPtr aResult = aSelectionAttr->context(); - ResultConstructionPtr aConstruction = + ResultConstructionPtr aConstruction = std::dynamic_pointer_cast(aResult); if (aConstruction.get() && aConstruction->isInfinite()) { aValid = false; theError = "Infinite result is selected."; } } else if(anAttributeType == ModelAPI_AttributeSelectionList::typeId()) { - AttributeSelectionListPtr aSelectionListAttr = + AttributeSelectionListPtr aSelectionListAttr = std::dynamic_pointer_cast(theAttribute); for (int i = 0, aSize = aSelectionListAttr->size(); i < aSize; i++) { AttributeSelectionPtr aSelectAttr = aSelectionListAttr->value(i); ResultPtr aResult = aSelectAttr->context(); if (aResult.get() && aResult->groupName() == ModelAPI_ResultConstruction::group()) { - ResultConstructionPtr aConstruction = + ResultConstructionPtr aConstruction = std::dynamic_pointer_cast(aResult); if (aConstruction.get() && aConstruction->isInfinite()) { aValid = false;