X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROData%2FHYDROData_Object.cxx;h=25b9e2625187447f1a6a2ad224eb99c530b2da13;hb=23a6f7b3e29e74735d71d7e1448465a9920f91dd;hp=7204f97fde1bf06c1bcdec4e5cf52457713122ba;hpb=b8a6578b8a09ecae38f85d1cd508253c216e5963;p=modules%2Fhydro.git diff --git a/src/HYDROData/HYDROData_Object.cxx b/src/HYDROData/HYDROData_Object.cxx index 7204f97f..25b9e262 100644 --- a/src/HYDROData/HYDROData_Object.cxx +++ b/src/HYDROData/HYDROData_Object.cxx @@ -1,3 +1,20 @@ +// Copyright (C) 2014-2015 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 "HYDROData_Object.h" @@ -11,6 +28,7 @@ #include #include +#include #include @@ -359,3 +377,20 @@ void HYDROData_Object::removeShape3D() aLabel.ForgetAllAttributes(); } +bool HYDROData_Object::IsSubmersible() const +{ + Handle(TDataStd_Integer) aSubMersibleAttr; + + bool isSubmersible = true; //default + if( myLab.FindAttribute(TDataStd_Integer::GetID(), aSubMersibleAttr ) ) + { + int aValue = aSubMersibleAttr->Get(); + isSubmersible = ( aValue != 0 ); + } + return isSubmersible; +} + +void HYDROData_Object::SetIsSubmersible( bool isSubmersible ) const +{ + TDataStd_Integer::Set( myLab, isSubmersible ? 1 : 0 ); +}