X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_Object.sip;h=abe2d98498078952d577b4dfb8499ee902d4017e;hb=09203a28a524e987ab86ad2c85026555e4f37c98;hp=39f890264827b8b210899deb94e1a045f1dd9512;hpb=efb8a93b758b3a8ca6b277de19e8f9eb5d21b14a;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_Object.sip b/src/HYDROPy/HYDROData_Object.sip index 39f89026..abe2d984 100644 --- a/src/HYDROPy/HYDROData_Object.sip +++ b/src/HYDROPy/HYDROData_Object.sip @@ -1,12 +1,8 @@ -// Copyright (C) 2007-2013 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 -// +// 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. +// 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 @@ -24,7 +20,7 @@ #include %End -class HYDROData_Object : HYDROData_Entity /Abstract/ +class HYDROData_Object : public HYDROData_Entity /Abstract/ { %TypeHeaderCode #include @@ -138,6 +134,48 @@ public: */ virtual QColor GetBorderColor() const; + + /** + * Returns sequence of object groups. + */ + HYDROData_SequenceOfObjects GetGroups() const; + + /** + * Returns group data model object by it id. + */ + HYDROData_ShapesGroup GetGroup( const int theGroupId ) const [Handle_HYDROData_ShapesGroup ()]; + %MethodCode + + Handle(HYDROData_ShapesGroup) aRefGroup; + + Py_BEGIN_ALLOW_THREADS + aRefGroup = sipSelfWasArg ? sipCpp->HYDROData_Object::GetGroup( a0 ) : + sipCpp->GetGroup( a0 ); + Py_END_ALLOW_THREADS + + sipRes = (HYDROData_ShapesGroup*)createPointer( aRefGroup ); + + %End + + /** + * Returns group id by data model object. + */ + int GetGroupId( HYDROData_ShapesGroup theGroup ) const [int (const Handle_HYDROData_ShapesGroup&)]; + %MethodCode + + Handle(HYDROData_ShapesGroup) aRefGroup = + Handle(HYDROData_ShapesGroup)::DownCast( createHandle( a0 ) ); + if ( !aRefGroup.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipRes = sipSelfWasArg ? sipCpp->HYDROData_Object::GetGroupId( aRefGroup ) : + sipCpp->GetGroupId( aRefGroup ); + Py_END_ALLOW_THREADS + } + + %End + + protected: /**