From: spo Date: Thu, 26 May 2016 12:43:07 +0000 (+0300) Subject: Add documentation for C++HighAPI X-Git-Tag: V_2.4.0~91^2~98 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7133bd57dc1b1187f4f682446cae82f3e0724e41;p=modules%2Fshaper.git Add documentation for C++HighAPI --- diff --git a/doc/tui/Modules.doc b/doc/tui/Modules.doc index 71060e595..4c6f43c2c 100644 --- a/doc/tui/Modules.doc +++ b/doc/tui/Modules.doc @@ -35,6 +35,15 @@ * */ +/** + * \defgroup CPPHighAPI C++ High API + * + * \brief C++ API for using fetures concentrated in plugins. + * + * The API intendend to be wrapped by SWIG and used in Python. + * + */ + /** * \defgroup Config Config * @@ -87,4 +96,3 @@ * (like in ExchangePlugin_ImportFormatValidator). * */ - diff --git a/src/ConstructionAPI/ConstructionAPI_Point.h b/src/ConstructionAPI/ConstructionAPI_Point.h index 8f0a1943b..0612227e7 100644 --- a/src/ConstructionAPI/ConstructionAPI_Point.h +++ b/src/ConstructionAPI/ConstructionAPI_Point.h @@ -16,25 +16,33 @@ class ModelAPI_AttributeDouble; class ModelAPI_Document; class ModelHighAPI_Double; //-------------------------------------------------------------------------------------- -/* - * +/**\class ConstructionAPI_Point + * \ingroup CPPHighAPI + * \brief C++ HighAPI interface for Point feature */ class ConstructionAPI_Point : public ModelHighAPI_Interface { public: - ConstructionAPI_Point(const std::shared_ptr & theFeature); + /// Constructor + explicit ConstructionAPI_Point(const std::shared_ptr & theFeature); + /// Constructor with values ConstructionAPI_Point(const std::shared_ptr & theFeature, const ModelHighAPI_Double & theX, const ModelHighAPI_Double & theY, const ModelHighAPI_Double & theZ); + /// Destructor virtual ~ConstructionAPI_Point(); + /// Set point values void setPoint(const ModelHighAPI_Double & theX, const ModelHighAPI_Double & theY, const ModelHighAPI_Double & theZ); + /// X coordinate for the point std::shared_ptr x() const; + /// Y coordinate for the point std::shared_ptr y() const; + /// Z coordinate for the point std::shared_ptr z() const; protected: @@ -46,6 +54,9 @@ protected: //! Pointer on point object typedef std::shared_ptr PointPtr; +/**\ingroup CPPHighAPI + * \brief C++ HighAPI function for creating Point feature + */ PointPtr addPoint(std::shared_ptr thePart, const ModelHighAPI_Double & theX, const ModelHighAPI_Double & theY, diff --git a/src/ModelHighAPI/ModelHighAPI_Interface.h b/src/ModelHighAPI/ModelHighAPI_Interface.h index 111cbf456..4393b4807 100644 --- a/src/ModelHighAPI/ModelHighAPI_Interface.h +++ b/src/ModelHighAPI/ModelHighAPI_Interface.h @@ -13,13 +13,16 @@ //-------------------------------------------------------------------------------------- class ModelAPI_Feature; //-------------------------------------------------------------------------------------- -/* - * +/**\class ModelHighAPI_Interface + * \ingroup CPPHighAPI + * \brief Base class for feature interfaces */ class ModelHighAPI_Interface { public: + /// Constructor explicit ModelHighAPI_Interface(const std::shared_ptr & theFeature); + /// Destructor virtual ~ModelHighAPI_Interface(); /// Return ModelAPI_Feature @@ -28,7 +31,7 @@ public: /// Shortcut for feature()->execute() void execute(); - /// Throw exception to event loop. + /// Throw exception to event loop void throwException(const std::string & theDescription); protected: