paludis Version 3.0.2
The one true package mangler
selection_handler.hh
1/* vim: set sw=4 sts=4 et foldmethod=syntax : */
2
3/*
4 * Copyright (c) 2008, 2010 Ciaran McCreesh
5 * Copyright (c) 2008 David Leverton
6 *
7 * This file is part of the Paludis package manager. Paludis is free software;
8 * you can redistribute it and/or modify it under the terms of the GNU General
9 * Public License version 2, as published by the Free Software Foundation.
10 *
11 * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 * details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
18 * Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20
21#ifndef PALUDIS_GUARD_PALUDIS_FILTER_HANDLER_HH
22#define PALUDIS_GUARD_PALUDIS_FILTER_HANDLER_HH 1
23
24#include <paludis/selection_handler-fwd.hh>
29#include <memory>
30
31namespace paludis
32{
33 class PALUDIS_VISIBLE SelectionHandler
34 {
35 protected:
36 const FilteredGenerator _fg;
37
38 SelectionHandler(const FilteredGenerator & g) :
39 _fg(g)
40 {
41 }
42
43 public:
44 virtual ~SelectionHandler() = 0;
45
46 SelectionHandler(const SelectionHandler &) = delete;
47 SelectionHandler & operator= (const SelectionHandler &) = delete;
48
49 virtual std::string as_string() const = 0;
50
51 virtual std::shared_ptr<PackageIDSequence> perform_select(const Environment * const) const
52 PALUDIS_ATTRIBUTE((warn_unused_result)) = 0;
53 };
54}
55
56#endif
Definition environment.hh:203
Definition filtered_generator.hh:49
#define PALUDIS_ATTRIBUTE(x)
Definition attributes.hh:53
#define PALUDIS_VISIBLE
Definition attributes.hh:59
Definition about_metadata-fwd.hh:24