1 // Copyright (C) 2014-2019 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef Selector_AlgoWithSubs_H_
21 #define Selector_AlgoWithSubs_H_
23 #include "Selector_Algo.h"
27 /**\class Selector_AlgoWithSubs
29 * \brief Kind of selection algorithm: generic algorithm that contains sub-algorithms inside.
30 * It is base for Container, Intersection and FilterByNeighbours algorithms.
32 class Selector_AlgoWithSubs: public Selector_Algo
34 std::list<Selector_Algo*> mySubSelList; ///< list of sub-algorithms
36 /// Initializes selector
37 Selector_AlgoWithSubs();
39 virtual ~Selector_AlgoWithSubs();
40 /// Erases the sub-algorithms stored
42 /// Returns the next label for a new sub-selector created
43 TDF_Label newSubLabel();
44 /// Appends a new algorithm to the list, erases list if it is null (failed)
45 bool append(Selector_Algo* theAlgo, const bool theEraseIfNull = true);
46 /// Returns the stored list of sub-algorithms.
47 std::list<Selector_Algo*>& list();