1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef ModelAPI_ResultCompSolid_H_
22 #define ModelAPI_ResultCompSolid_H_
24 #include "ModelAPI_Result.h"
25 #include "ModelAPI_ResultBody.h"
28 /**\class ModelAPI_ResultCompSolid
30 * \brief The comp solid (container of results) result of a feature.
32 * Provides a conainer of body result that may be displayed in the viewer.
34 class ModelAPI_ResultCompSolid : public ModelAPI_ResultBody
37 MODELAPI_EXPORT virtual ~ModelAPI_ResultCompSolid();
38 /// Returns the group identifier of this result
40 /// Returns the number of sub-elements
41 virtual int numberOfSubs(bool forTree = false) const = 0;
43 /// Returns the sub-result by zero-base index
44 virtual std::shared_ptr<ModelAPI_ResultBody> subResult(const int theIndex,
45 bool forTree = false) const = 0;
47 /// Returns true if feature or reuslt belong to this composite feature as subs
48 /// Returns theIndex - zero based index of sub if found
49 virtual bool isSub(ObjectPtr theObject, int& theIndex) const = 0;
51 /// Set displayed flag to the result and all sub results
52 /// \param theDisplay a boolean value
53 MODELAPI_EXPORT virtual void setDisplayed(const bool theDisplay);
58 //! Pointer on feature object
59 typedef std::shared_ptr<ModelAPI_ResultCompSolid> ResultCompSolidPtr;