Salome HOME
Implementation of naming parametrisation of sketch result
[modules/shaper.git] / src / ModelAPI / ModelAPI_CompositeFeature.h
1 // File:        ModelAPI_CompositeFeature.hxx
2 // Created:     20 Oct 2014
3 // Author:      Mikhail PONIKAROV
4
5 #ifndef ModelAPI_CompositeFeature_H_
6 #define ModelAPI_CompositeFeature_H_
7
8 #include "ModelAPI_Feature.h"
9
10 /**\class ModelAPI_CompositeFeature
11  * \ingroup DataModel
12  * \brief Feature that consists of other features: like sketcher
13  * with edges inside. It just allows t oadd a feature to this feature only
14  * instead of adding in both document and this feature.
15  */
16 class ModelAPI_CompositeFeature : public ModelAPI_Feature
17 {
18 public:
19   /// Adds feature to the sketch and to its document
20   virtual boost::shared_ptr<ModelAPI_Feature> addFeature(std::string theID) = 0;
21
22   /// Returns the number of sub-elements
23   virtual int numberOfSubs() const = 0;
24
25   /// Returns the sub-feature by zero-base index
26   virtual boost::shared_ptr<ModelAPI_Feature> subFeature(const int theIndex) const = 0;
27
28   /// Returns the sub-feature unique identifier in this composite feature by zero-base index
29   virtual int subFeatureId(const int theIndex) const = 0;
30 };
31
32 //! Pointer on the composite feature object
33 typedef boost::shared_ptr<ModelAPI_CompositeFeature> CompositeFeaturePtr;
34
35 #endif