Salome HOME
Add copyright header according to request of CEA from 06.06.2017
[modules/shaper.git] / src / ModelAPI / ModelAPI_ResultCompSolid.h
1 // Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 //
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.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
18 //
19
20 #ifndef ModelAPI_ResultCompSolid_H_
21 #define ModelAPI_ResultCompSolid_H_
22
23 #include "ModelAPI_Result.h"
24 #include "ModelAPI_ResultBody.h"
25 #include <string>
26
27 /**\class ModelAPI_ResultCompSolid
28 * \ingroup DataModel
29 * \brief The comp solid (container of results) result of a feature.
30 *
31 * Provides a conainer of body result that may be displayed in the viewer.
32 */
33 class ModelAPI_ResultCompSolid : public ModelAPI_ResultBody
34 {
35 public:
36   MODELAPI_EXPORT virtual ~ModelAPI_ResultCompSolid();
37   /// Returns the group identifier of this result
38
39   /// Returns the number of sub-elements
40   virtual int numberOfSubs(bool forTree = false) const = 0;
41
42   /// Returns the sub-result by zero-base index
43   virtual std::shared_ptr<ModelAPI_ResultBody> subResult(const int theIndex,
44                                                          bool forTree = false) const = 0;
45
46   /// Returns true if feature or reuslt belong to this composite feature as subs
47   virtual bool isSub(ObjectPtr theObject) const = 0;
48
49   /// Set displayed flag to the result and all sub results
50   /// \param theDisplay a boolean value
51   MODELAPI_EXPORT virtual void setDisplayed(const bool theDisplay);
52
53 protected:
54 };
55
56 //! Pointer on feature object
57 typedef std::shared_ptr<ModelAPI_ResultCompSolid> ResultCompSolidPtr;
58
59 #endif