Salome HOME
Add copyright header according to request of CEA from 06.06.2017
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / PlaneGCSSolver_FeatureBuilder.h
1 // Copyright (C) 2017-20xx CEA/DEN, EDF R&D
2
3 // File:    PlaneGCSSolver_FeatureBuilder.h
4 // Created: 10 Feb 2017
5 // Author:  Artem ZHIDKOV
6
7 #ifndef PlaneGCSSolver_FeatureBuilder_H_
8 #define PlaneGCSSolver_FeatureBuilder_H_
9
10 #include <PlaneGCSSolver_AttributeBuilder.h>
11
12 typedef std::map<AttributePtr, EntityWrapperPtr> AttributeEntityMap;
13
14 /** \class   PlaneGCSSolver_FeatureBuilder
15  *  \ingroup Plugins
16  *  \brief   Converts SketchPlugin_Feature to the entity applicable for PlaneGCS solver
17  */
18 class PlaneGCSSolver_FeatureBuilder : public PlaneGCSSolver_AttributeBuilder
19 {
20 public:
21   PlaneGCSSolver_FeatureBuilder(PlaneGCSSolver_Storage* theStorage = 0);
22   PlaneGCSSolver_FeatureBuilder(const StoragePtr& theStorage);
23
24   /// \brief Converts an attribute to the solver's entity and stores it for further processing.
25   ///        Double attributes and 2D points are supported only.
26   /// \param theAttribute [in]  attribute to create
27   /// \return Created wrapper of the attribute applicable for specific solver
28   virtual EntityWrapperPtr createAttribute(AttributePtr theAttribute);
29
30   /// \brief Converts SketchPlugin's feature to the solver's entity.
31   ///        Result if based on the list of already converted attributes.
32   /// \param theFeature [in]  feature to create
33   virtual EntityWrapperPtr createFeature(FeaturePtr theFeature);
34
35 private:
36   /// list of converted attributes (will be cleared when the feature is created)
37   AttributeEntityMap myAttributes;
38 };
39
40 #endif