X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModelAPI%2FModelAPI_Folder.h;h=749eca6c1cd3558bb4c232a78a896422b4a28b8d;hb=207f4e84daf9c78020f5f250a33a63c71f0b0556;hp=702931ffee677887de7945b8f29d172ac8e4b2db;hpb=7ab55ab9035e1f5c3249ec8d76993bb6aff006df;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI_Folder.h b/src/ModelAPI/ModelAPI_Folder.h index 702931ffe..749eca6c1 100644 --- a/src/ModelAPI/ModelAPI_Folder.h +++ b/src/ModelAPI/ModelAPI_Folder.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 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 @@ -12,10 +12,9 @@ // // 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 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef ModelAPI_Folder_H_ @@ -42,13 +41,6 @@ public: return MY_FOLDER_ID; } - /// Returns the unique kind of a feature - virtual const std::string& getKind() - { - static const std::string& MY_KIND = ModelAPI_Folder::ID(); - return MY_KIND; - } - /// Returns the group identifier of all features inline static std::string group() { @@ -90,10 +82,19 @@ public: // Helper methods, aliases for data()->method() // ----------------------------------------------------------------------------------------------- /// Returns the name stored in the attribute - inline std::string name() + inline std::wstring name() { return data()->name(); } + /// Returns the reference attribute by the identifier + inline std::shared_ptr reference(const std::string& theID) + { + return data()->reference(theID); + } + + /// Returns the last visible feature in the folder, passing through invisible, + /// that may appear as the last ones. + MODELAPI_EXPORT std::shared_ptr lastVisibleFeature(); protected: /// This method is called just after creation of the object: it must initialize