1 // Copyright (C) 2017-20xx CEA/DEN, EDF R&D
3 // File: PlaneGCSSolver_EntityBuilder.h
4 // Created: 14 Feb 2017
5 // Author: Artem ZHIDKOV
7 #ifndef PlaneGCSSolver_EntityBuilder_H_
8 #define PlaneGCSSolver_EntityBuilder_H_
10 #include <PlaneGCSSolver_Defs.h>
11 #include <PlaneGCSSolver_Storage.h>
13 /** \class PlaneGCSSolver_EntityBuilder
15 * \brief API to convert data model entity to the entity applicable for PlaneGCS solver
17 class PlaneGCSSolver_EntityBuilder
20 /// \brief Create entity in the given storage.
21 /// If the storage is empty, the entity should not be changed
22 /// while constraint solving. So, it is created out of the storage.
23 PlaneGCSSolver_EntityBuilder(PlaneGCSSolver_Storage* theStorage = 0)
24 : myStorage(theStorage)
27 virtual ~PlaneGCSSolver_EntityBuilder() {}
29 /// \brief Converts an attribute to the solver's entity.
30 /// Double attributes and 2D points are supported only.
31 /// \param theAttribute [in] attribute to create
32 /// \return Created wrapper of the attribute applicable for specific solver
33 virtual EntityWrapperPtr createAttribute(AttributePtr theAttribute) = 0;
35 /// \brief Converts SketchPlugin's feature to the solver's entity.
36 /// Result if based on the list of already converted attributes.
37 /// \param theFeature [in] feature to create
38 virtual EntityWrapperPtr createFeature(FeaturePtr) = 0;
40 /// \brief Return list of constraints necessary to fix feature's extra DoF
41 virtual const std::list<GCSConstraintPtr>& constraints() const = 0;
44 PlaneGCSSolver_Storage* myStorage;