X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI_Interface.h;h=43d267642b495617a8b0c65c34d9f60d09578aa6;hb=d34842c50d5f335cca443c78910c16c54139c7d0;hp=7d61ffbfb69ee940f6f987d0075f216881beb53a;hpb=f98f887290d4e2b4bd6618389911e82b6b9674f3;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI_Interface.h b/src/ModelHighAPI/ModelHighAPI_Interface.h index 7d61ffbfb..43d267642 100644 --- a/src/ModelHighAPI/ModelHighAPI_Interface.h +++ b/src/ModelHighAPI/ModelHighAPI_Interface.h @@ -11,6 +11,7 @@ #include "ModelHighAPI.h" #include +#include #include #include #include @@ -18,6 +19,7 @@ class ModelAPI_Feature; class ModelAPI_Result; class ModelHighAPI_Selection; +class ModelHighAPI_Dumper; //-------------------------------------------------------------------------------------- /**\class ModelHighAPI_Interface * \ingroup CPPHighAPI @@ -37,13 +39,23 @@ public: MODELHIGHAPI_EXPORT std::shared_ptr feature() const; + /// If feature is composite return intefrace for sub-feature by zero-based index, + /// or empty pointer if feature not composite or does not have sub-feature with such index. + MODELHIGHAPI_EXPORT + std::shared_ptr subFeature(const int theIndex) const; + /// Shortcut for feature()->getKind() MODELHIGHAPI_EXPORT const std::string& getKind() const; /// Shortcut for feature()->execute() + /// \param isForce start execution of feature instead of sending events MODELHIGHAPI_EXPORT - void execute(); + void execute(bool isForce = false); + + /// Shortcut for feature()->data()->setName() + MODELHIGHAPI_EXPORT + void setName(const std::string& theName); // TODO(spo): rename to selectAll() /// Return all objects of the feature @@ -58,8 +70,18 @@ public: MODELHIGHAPI_EXPORT void throwException(const std::string & theDescription); + /// Return name of getter for specified attribute + MODELHIGHAPI_EXPORT + const std::string& attributeGetter(const std::string& theAttrName); + + /// Dump wrapped feature + MODELHIGHAPI_EXPORT + virtual void dump(ModelHighAPI_Dumper& theDumper) const {} + protected: std::shared_ptr myFeature; + + std::map myAttrGetter; ///< names of attributes and their getters }; //! Pointer on Interface object