paludis  Version 2.6.0
filter_handler.hh
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2008, 2011 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/filter_handler-fwd.hh>
25 #include <paludis/name-fwd.hh>
30 #include <memory>
31 
32 namespace paludis
33 {
35  {
36  public:
37  virtual ~FilterHandler() = 0;
38 
39  virtual std::string as_string() const = 0;
40 
41  virtual const RepositoryContentMayExcludes may_excludes() const = 0;
42 
43  virtual std::shared_ptr<const RepositoryNameSet> repositories(
44  const Environment * const,
45  const std::shared_ptr<const RepositoryNameSet> &) const = 0;
46 
47  virtual std::shared_ptr<const CategoryNamePartSet> categories(
48  const Environment * const,
49  const std::shared_ptr<const RepositoryNameSet> &,
50  const std::shared_ptr<const CategoryNamePartSet> &) const = 0;
51 
52  virtual std::shared_ptr<const QualifiedPackageNameSet> packages(
53  const Environment * const,
54  const std::shared_ptr<const RepositoryNameSet> &,
55  const std::shared_ptr<const QualifiedPackageNameSet> &) const = 0;
56 
57  virtual std::shared_ptr<const PackageIDSet> ids(
58  const Environment * const,
59  const std::shared_ptr<const PackageIDSet> &) const = 0;
60  };
61 
63  public FilterHandler
64  {
65  public:
66  virtual const RepositoryContentMayExcludes may_excludes() const;
67 
68  virtual std::shared_ptr<const RepositoryNameSet> repositories(
69  const Environment * const,
70  const std::shared_ptr<const RepositoryNameSet> &) const;
71 
72  virtual std::shared_ptr<const CategoryNamePartSet> categories(
73  const Environment * const,
74  const std::shared_ptr<const RepositoryNameSet> &,
75  const std::shared_ptr<const CategoryNamePartSet> &) const;
76 
77  virtual std::shared_ptr<const QualifiedPackageNameSet> packages(
78  const Environment * const,
79  const std::shared_ptr<const RepositoryNameSet> &,
80  const std::shared_ptr<const QualifiedPackageNameSet> &) const;
81 
82  virtual std::shared_ptr<const PackageIDSet> ids(
83  const Environment * const,
84  const std::shared_ptr<const PackageIDSet> &) const;
85  };
86 }
87 
88 #endif
Definition: about_metadata-fwd.hh:23
Definition: filter_handler.hh:34
Definition: filter_handler.hh:62
Definition: environment.hh:200
Definition: options-fwd.hh:34
#define PALUDIS_VISIBLE
Definition: attributes.hh:59