X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FConstructionPlugin%2FConstructionPlugin_Point.h;h=8e0f0fcda6f74a4b959fdbbe664db39ab332ed0a;hb=020e7187ee88afbd18286f149536cdef61d9f61e;hp=637b96193d5d0f205d926920c550171cccb00cc0;hpb=3d7368386762b057fff327d24d0079b4a73c3004;p=modules%2Fshaper.git diff --git a/src/ConstructionPlugin/ConstructionPlugin_Point.h b/src/ConstructionPlugin/ConstructionPlugin_Point.h index 637b96193..8e0f0fcda 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Point.h +++ b/src/ConstructionPlugin/ConstructionPlugin_Point.h @@ -9,29 +9,42 @@ #include "ConstructionPlugin.h" #include - -/// Point kind -const std::string CONSTRUCTION_POINT_KIND("Point"); - -/// attribute name for X coordinate -const std::string POINT_ATTR_X = "x"; -/// attribute name for Y coordinate -const std::string POINT_ATTR_Y = "y"; -/// attribute name for Z coordinate -const std::string POINT_ATTR_Z = "z"; +#include +#include /**\class ConstructionPlugin_Point - * \ingroup DataModel + * \ingroup Plugins * \brief Feature for creation of the new part in PartSet. */ -class ConstructionPlugin_Point : public ModelAPI_Feature +class ConstructionPlugin_Point : public ModelAPI_Feature, public GeomAPI_ICustomPrs { public: /// Returns the kind of a feature - CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind() + CONSTRUCTIONPLUGIN_EXPORT virtual const std::string& getKind(); + + inline static const std::string& ID() { - static std::string MY_KIND = CONSTRUCTION_POINT_KIND; - return MY_KIND; + static const std::string CONSTRUCTION_POINT_KIND("Point"); + return CONSTRUCTION_POINT_KIND; + } + + /// attribute name for X coordinate + inline static const std::string& X() + { + static const std::string POINT_ATTR_X("x"); + return POINT_ATTR_X; + } + /// attribute name for Y coordinate + inline static const std::string& Y() + { + static const std::string POINT_ATTR_Y("y"); + return POINT_ATTR_Y; + } + /// attribute name for Z coordinate + inline static const std::string& Z() + { + static const std::string POINT_ATTR_Z("z"); + return POINT_ATTR_Z; } /// Creates a new part document if needed @@ -45,6 +58,10 @@ class ConstructionPlugin_Point : public ModelAPI_Feature /// Use plugin manager for features creation ConstructionPlugin_Point(); + + /// Customize presentation of the feature + virtual bool customisePresentation(ResultPtr theResult, AISObjectPtr thePrs, + std::shared_ptr theDefaultPrs); }; #endif