X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelHighAPI%2FModelHighAPI_Interface.h;h=7c9774e3aa540cbde44096bb82aa02013e24f41d;hb=de93e11325cc65d1067e0c3484cbb5c836bdcde6;hp=009b7e89b08333ebb053d40f650f6c9cc6413f86;hpb=622e6d07002bdb703c2d7e51a8b65dfcd9fbd377;p=modules%2Fshaper.git diff --git a/src/ModelHighAPI/ModelHighAPI_Interface.h b/src/ModelHighAPI/ModelHighAPI_Interface.h index 009b7e89b..7c9774e3a 100644 --- a/src/ModelHighAPI/ModelHighAPI_Interface.h +++ b/src/ModelHighAPI/ModelHighAPI_Interface.h @@ -1,5 +1,6 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D // Name : ModelHighAPI_Interface.h -// Purpose: +// Purpose: // // History: // 17/05/16 - Sergey POKHODENKO - Creation of the file @@ -39,18 +40,31 @@ 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(bool isForce = false); + + /// Shortcut for feature()->data()->setName() + MODELHIGHAPI_EXPORT + void setName(const std::string& theName); + + /// Return firts object of the feature MODELHIGHAPI_EXPORT - void execute(); + virtual ModelHighAPI_Selection result() const; - // TODO(spo): rename to selectAll() /// Return all objects of the feature MODELHIGHAPI_EXPORT - virtual std::list result() const; + virtual std::list results() const; /// Return default result. Default implementation feature()->lastResult() MODELHIGHAPI_EXPORT @@ -69,7 +83,7 @@ public: virtual void dump(ModelHighAPI_Dumper& theDumper) const {} protected: - std::shared_ptr myFeature; + std::shared_ptr myFeature; ///< feature of this interface std::map myAttrGetter; ///< names of attributes and their getters };