X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSketchPlugin%2FSketchPlugin_ConstraintCoincidence.h;h=d14a4b6de371cc9b0c2e8b19926611f04b748828;hb=acebef0bc5fb22dc9672e0046085b896e957af56;hp=5da46cf8801ae0f1e8f1b3b9d0b32a5e957bd57c;hpb=ae347a8a8014a15245199a3bb603413628e3f7d4;p=modules%2Fshaper.git diff --git a/src/SketchPlugin/SketchPlugin_ConstraintCoincidence.h b/src/SketchPlugin/SketchPlugin_ConstraintCoincidence.h index 5da46cf88..d14a4b6de 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintCoincidence.h +++ b/src/SketchPlugin/SketchPlugin_ConstraintCoincidence.h @@ -2,34 +2,36 @@ // Created: 08 May 2014 // Author: Artem ZHIDKOV -#ifndef SketchPlugin_ConstraintCoincidence_HeaderFile -#define SketchPlugin_ConstraintCoincidence_HeaderFile +#ifndef SketchPlugin_ConstraintCoincidence_H_ +#define SketchPlugin_ConstraintCoincidence_H_ #include "SketchPlugin.h" -#include "SketchPlugin_Constraint.h" +#include "SketchPlugin_ConstraintBase.h" #include #include -/// Coincidence constraint kind -const std::string SKETCH_CONSTRAINT_COINCIDENCE_KIND("SketchConstraintCoincidence"); - /** \class SketchPlugin_ConstraintCoincidence * \ingroup DataModel * \brief Feature for creation of a new constraint which defines equivalence of two points * - * These constraint has two attributes: - * CONSTRAINT_ATTR_ENTITY_A and CONSTRAINT_ATTR_ENTITY_B + * This constraint has two attributes: + * SketchPlugin_Constraint::ENTITY_A() and SketchPlugin_Constraint::ENTITY_B() */ -class SketchPlugin_ConstraintCoincidence: public SketchPlugin_Constraint +class SketchPlugin_ConstraintCoincidence : public SketchPlugin_ConstraintBase { -public: + public: + /// Parallel constraint kind + inline static const std::string& ID() + { + static const std::string MY_CONSTRAINT_COINCIDENCE_ID("SketchConstraintCoincidence"); + return MY_CONSTRAINT_COINCIDENCE_ID; + } /// \brief Returns the kind of a feature - SKETCHPLUGIN_EXPORT virtual const std::string& getKind() - {static std::string MY_KIND = SKETCH_CONSTRAINT_COINCIDENCE_KIND; return MY_KIND;} - - /// \brief Returns to which group in the document must be added feature - SKETCHPLUGIN_EXPORT virtual const std::string& getGroup() - {static std::string MY_GROUP = SKETCH_KIND; return MY_GROUP;} + SKETCHPLUGIN_EXPORT virtual const std::string& getKind() + { + static std::string MY_KIND = SketchPlugin_ConstraintCoincidence::ID(); + return MY_KIND; + } /// \brief Creates a new part document if needed SKETCHPLUGIN_EXPORT virtual void execute(); @@ -37,9 +39,6 @@ public: /// \brief Request for initialization of data model of the feature: adding all attributes SKETCHPLUGIN_EXPORT virtual void initAttributes(); - /// \brief Returns the sketch preview - SKETCHPLUGIN_EXPORT virtual const boost::shared_ptr& preview(); - /// \brief Use plugin manager for features creation SketchPlugin_ConstraintCoincidence(); };