- virtual bool remove(ConstraintWrapperPtr theConstraint);
- /// \brief Remove entity
- /// \return \c true if the entity and all its parameters are removed successfully
- virtual bool remove(EntityWrapperPtr theEntity);
- /// \brief Remove parameter
- /// \return \c true if the parameter has been removed
- virtual bool remove(ParameterWrapperPtr theParameter);
-
- /// \brief Update the group for the given entity, its sub-entities and parameters
- virtual void changeGroup(EntityWrapperPtr theEntity, const GroupID& theGroup);
- /// \brief Update the group for the given parameter
- virtual void changeGroup(ParameterWrapperPtr theParam, const GroupID& theGroup);
-
-
-// ============= Own methods =============
-
-
-
-#ifndef OBSOLETE
-
-//// /** \brief Add or change constraint and corresponding GCS constraints to the storage
-//// * \param theConstraint [in] base SketchPlugin constraint
-//// * \param theGCSConstraints [in] list of GCS constraints created by SketchSolver constraint
-//// */
-//// void changeConstraint(const ConstraintPtr& theConstraint,
-//// const std::vector<GCSConstraintPtr>& theGCSConstraints);
-
-//// /** \brief Add GCS constraint not related to any SketchPlugin constraint.
-//// * For example, it may be related to the moved feature.
-//// * \param theConstraint [in] GCS constraint
-//// */
-//// void addConstraint(GCSConstraintPtr theConstraint);
-
-//// /** \brief Convert SketchPlugin_Feature to the corresponding entity in FreeGCS
-//// * \param theEntity [in] feature to convert
-//// * \return ID of created or updated entity
-//// */
-//// EntityID changeEntity(const FeaturePtr& theEntity);
-//// /** \brief Convert ModelAPI_Attribute to the corresponding entity in FreeGCS
-//// * \param theEntity [in] attribute to convert
-//// * \return ID of created or updated entity
-//// */
-//// EntityID changeEntity(const AttributePtr& theEntity);
-
-//// /** \brief Remove constraint and corresponding GCS constraints
-//// * \param theConstraint [in] constraint to remove
-//// * \return \c true, if the constraint is fully removed,
-//// * \c false, if there are available entities used by other constraints
-//// */
-//// bool removeConstraint(const ConstraintPtr& theConstraint);
-//// /** \brief Remove GCS constraint
-//// * \param theConstraint [in] constraint to remove
-//// * \return \c true, if the constraint is fully removed
-//// */
-//// bool removeConstraint(GCSConstraintPtr theConstraint);
-//// /** \brief Remove feature and corresponding GCS entities
-//// * \param theFeature [in] feature to remove
-//// * \return \c true, if the feature is fully removed,
-//// * \c false, if there are available entities used by other constraints or features
-//// */
-//// bool removeEntity(const FeaturePtr& theFeature);
-//// /** \brief Remove attribute and corresponding GCS entities
-//// * \param theAttribute [in] attribute to remove
-//// * \return \c true, if the attribute is removed,
-//// * \c false, if it is used by existent features or constraints
-//// */
-//// bool removeEntity(const AttributePtr& theAttribute);
-
- /// \brief Move parameters of the entity to the constants
- void makeConstant(const EntityWrapperPtr& theEntity);
- /// \brief Move parameters of the entity to the variables
- void makeVariable(const EntityWrapperPtr& theEntity);
-
-//// /// \brief Return scalar by its ID or null pointer
-//// double* getScalar(const EntityID& theID) const;
-//// /// \brief Return point by its ID or null pointer
-//// GCS::Point* getPoint(const EntityID& theID) const;
-//// /// \brief Return line by its ID or null pointer
-//// GCS::Line* getLine(const EntityID& theID) const;
-//// /// \brief Return circle by its ID or null pointer
-//// GCS::Circle* getCircle(const EntityID& theID) const;
-//// /// \brief Return arc by its ID or null pointer
-//// GCS::Arc* getArc(const EntityID& theID) const;
-////
-//// /// \brief Return list of GCS constraints corresponding to the given
-//// const std::vector<GCSConstraintPtr>& getConstraint(const ConstraintPtr& theConstraint) const;
-
-//// /// \brief Verifies, the attribute is available in current storage
-//// bool isInteract(AttributePtr theAttribute) const;
-//// /// \brief Verifies, the feature is available in current storage
-//// bool isInteract(FeaturePtr theFeature) const;
-
-private:
-//// /** \brief Creates scalar parameter in the list of parameters
-//// * \param theScalar [in] value to be converted
-//// * \return pointer to new scalar
-//// */
-//// double* createScalar(const AttributeDoublePtr& theScalar = AttributeDoublePtr());
-//// /** \brief Creates two parameters in the list of parameters to store point coordinates
-//// * \param thePoint [in] point to be converted
-//// * \return FreeGCS point
-//// */
-//// GCS::Point createPoint(const std::shared_ptr<GeomDataAPI_Point2D>& thePoint);
-//// /** \brief Creates or updates a scalar value
-//// * \param theScalar [in] attribute to update scalar value
-//// * \param theID [in] ID of scalar to be updated
-//// */
-//// void updateScalar(const AttributeDoublePtr& theScalar, EntityID& theID);
-//// /** \brief Creates or updates an angular value
-//// * \param theAngle [in] attribute to update scalar value
-//// * \param theID [in] ID of scalar to be updated
-//// */
-//// void updateAngle(const AttributeDoublePtr& theAngle, EntityID& theID);
-//// /** \brief Creates or updates parameters of the point
-//// * \param thePoint [in] point used to update parameters
-//// * \param theID [in] ID of FreeGCS entity to be updated
-//// */
-//// void updatePoint(const std::shared_ptr<GeomDataAPI_Point2D>& thePoint,
-//// EntityID& theID);
-//// /** \brief Creates or updates parameters of the line
-//// * \param theLine [in] line used to update parameters
-//// * \param theID [in/out] ID of FreeGCS entity to be updated (cleared if problems)
-//// */
-//// void updateLine(const FeaturePtr& theLine, EntityID& theID);
-//// /** \brief Creates or updates parameters of the circle
-//// * \param theLine [in] circle used to update parameters
-//// * \param theID [in/out] ID of FreeGCS entity to be updated (cleared if problems)
-//// */
-//// void updateCircle(const FeaturePtr& theCircle, EntityID& theID);
-//// /** \brief Creates or updates parameters of the arc
-//// * \param theLine [in] arc used to update parameters
-//// * \param theID [in/out] ID of FreeGCS entity to be updated (cleared if problems)
-//// */
-//// void updateArc(const FeaturePtr& theArc, EntityID& theID);
-
-//// /// \brief Check the feature is used by constraints
-//// bool isUsed(const FeaturePtr& theFeature) const;
-//// /// \brief Check the attribute is used by constraints or features
-//// bool isUsed(const AttributePtr& theAttribute) const;
-
-//// /// \brief Remove given parameter from the lists of parameters and constants
-//// void removeParameters(double* theParam1, double* theParam2 = 0);
-
- /// \brief Move parameters of the entity from the list of variables to the list of constants
- /// and vice versa
- /// \param theEntity [in] entity to be changed
- /// \param theFrom [out] source list
- /// \param theTo [out] destination list
- void toggleEntity(const EntityWrapperPtr& theEntity, GCS::VEC_pD& theFrom, GCS::VEC_pD& theTo);
-
- /// \brief Create additional constraints for correct processing of arcs
- /// \param theArc [in] updated arc
- void processArc(const EntityWrapperPtr& theArc);
-
-private:
- GCS::VEC_pD myParameters; ///< list of parameters
- GCS::VEC_pD myConst; ///< list of constants
- EntityID myEntityLastID; ///< identifier of last added entity
-
-//// std::map<ConstraintPtr, std::vector<GCSConstraintPtr> >
-//// myConstraintsMap; ///< map SketchPlugin constraints to corresponding GCS constraints
-////
-//// std::map<AttributePtr, EntityID> myAttributeEntityMap; ///< map attributes to corresponding entities
-//// std::map<FeaturePtr, EntityID> myFeatureEntityMap; ///< map features to corresponding entities
-////
-//// std::map<EntityID, double*> myGCSScalars; ///< list of scalar values and their IDs
-//// std::map<EntityID, GCSPointPtr> myGCSPoints; ///< list of points and their IDs
-//// std::map<EntityID, GCSCurvePtr> myGCSEntities; ///< list of lines, circles and arcs and their IDs
-
- std::map<EntityWrapperPtr, std::vector<GCSConstraintPtr> >
- myArcConstraintMap; ///< additional constraints for correct processing of the arcs
-
-//// std::list<double*> myRemovedParameters; ///< list of removed parameters
- std::list<GCSConstraintPtr> myRemovedConstraints; ///< list of removed constraints to notify solver
-
-#else
-
-// ================================================================================================
-// =================== OBSOLETE ===========================================================
-public:
- PlaneGCSSolver_Storage();