Salome HOME
Update copyrights
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Interface.h
index f4c156fb756d7ceaedd30ca7754cfbece4d9cdca..8675bb66ce33f14083bc5ab8d424f5c8100d57b4 100644 (file)
@@ -1,8 +1,21 @@
-// Name   : ModelHighAPI_Interface.h
-// Purpose: 
+// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-// History:
-// 17/05/16 - Sergey POKHODENKO - Creation of the file
 
 #ifndef SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_
 #define SRC_MODELHIGHAPI_MODELHIGHAPI_INTERFACE_H_
@@ -49,17 +62,25 @@ public:
   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()
+  /// Shortcut for feature()->data()->name()
+  MODELHIGHAPI_EXPORT
+  std::string name() const;
+
+  /// Return firts object of the feature
+  MODELHIGHAPI_EXPORT
+  virtual ModelHighAPI_Selection result() const;
+
   /// Return all objects of the feature
   MODELHIGHAPI_EXPORT
-  virtual std::list<ModelHighAPI_Selection> result() const;
+  virtual std::list<ModelHighAPI_Selection> results() const;
 
   /// Return default result. Default implementation feature()->lastResult()
   MODELHIGHAPI_EXPORT
@@ -78,7 +99,7 @@ public:
   virtual void dump(ModelHighAPI_Dumper& theDumper) const {}
 
 protected:
-  std::shared_ptr<ModelAPI_Feature> myFeature;
+  std::shared_ptr<ModelAPI_Feature> myFeature; ///< feature of this interface
 
   std::map<std::string, std::string> myAttrGetter; ///< names of attributes and their getters
 };