1 // Copyright (C) 2014-2017 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
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef Selector_AlgoWithSubs_H_
22 #define Selector_AlgoWithSubs_H_
24 #include "Selector_Algo.h"
28 /**\class Selector_AlgoWithSubs
30 * \brief Kind of selection algorithm: generic algorithm that contains sub-algorithms inside.
31 * It is base for Container, Intersection and FilterByNeighbours algorithms.
33 class Selector_AlgoWithSubs: public Selector_Algo
35 std::list<Selector_Algo*> mySubSelList; ///< list of sub-algorithms
37 /// Initializes selector
38 Selector_AlgoWithSubs();
40 virtual ~Selector_AlgoWithSubs();
41 /// Erases the sub-algorithms stored
43 /// Returns the next label for a new sub-selector created
44 TDF_Label newSubLabel();
45 /// Appends a new algorithm to the list, erases list if it is null (failed)
46 bool append(Selector_Algo* theAlgo, const bool theEraseIfNull = true);
47 /// Returns the stored list of sub-algorithms.
48 std::list<Selector_Algo*>& list();