paludis  Version 2.6.0
match_package.hh
Go to the documentation of this file.
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2006, 2007, 2008, 2010, 2011 Ciaran McCreesh
5  *
6  * This file is part of the Paludis package manager. Paludis is free software;
7  * you can redistribute it and/or modify it under the terms of the GNU General
8  * Public License version 2, as published by the Free Software Foundation.
9  *
10  * Paludis is distributed in the hope that it will be useful, but WITHOUT ANY
11  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
17  * Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19 
20 #ifndef PALUDIS_GUARD_PALUDIS_MATCH_PACKAGE_HH
21 #define PALUDIS_GUARD_PALUDIS_MATCH_PACKAGE_HH 1
22 
23 /** \file
24  * Declarations for match_package and match_package_in_set.
25  *
26  * \ingroup g_query
27  *
28  * \section Examples
29  *
30  * - \ref example_match_package.cc "example_match_package.cc"
31  */
32 
33 #include <paludis/match_package-fwd.hh>
35 #include <paludis/dep_spec-fwd.hh>
36 #include <paludis/spec_tree-fwd.hh>
39 #include <paludis/changed_choices-fwd.hh>
40 
41 namespace paludis
42 {
43  /**
44  * Return whether the specified PackageID matches the specified
45  * PackageDepSpec.
46  *
47  * \param spec_id The PackageID the spec comes from. May be null. Used for
48  * [use=] style dependencies.
49  *
50  * \since 0.58 takes spec_id
51  *
52  * \ingroup g_query
53  */
54  bool match_package(
55  const Environment & env,
56  const PackageDepSpec & spec,
57  const std::shared_ptr<const PackageID> & id,
58  const std::shared_ptr<const PackageID> & spec_id,
59  const MatchPackageOptions & options)
60  PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
61 
62  /**
63  * Return whether the specified PackageID matches the specified
64  * PackageDepSpec, with the specified ChangedChoices applied to the target
65  * and the ID from which the dep came.
66  *
67  * \param spec_id The PackageID the spec comes from. May be null. Used for
68  * [use=] style dependencies.
69  *
70  * \since 0.58 takes spec_id
71  *
72  * \ingroup g_query
73  * \since 0.51
74  */
76  const Environment & env,
77  const PackageDepSpec & spec,
78  const ChangedChoices * const maybe_changes_to_owner,
79  const std::shared_ptr<const PackageID> & id,
80  const std::shared_ptr<const PackageID> & spec_id,
81  const ChangedChoices * const maybe_changes_to_target,
82  const MatchPackageOptions & options)
83  PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
84 
85  /**
86  * Return whether the specified PackageID matches any of the items in the
87  * specified set.
88  *
89  * Named sets inside the set are expanded.
90  *
91  * \ingroup g_query
92  */
94  const Environment & env,
95  const SetSpecTree & spec,
96  const std::shared_ptr<const PackageID> & id,
97  const MatchPackageOptions & options)
98  PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE;
99 }
100 
101 #endif
bool match_package_with_maybe_changes(const Environment &env, const PackageDepSpec &spec, const ChangedChoices *const maybe_changes_to_owner, const std::shared_ptr< const PackageID > &id, const std::shared_ptr< const PackageID > &spec_id, const ChangedChoices *const maybe_changes_to_target, const MatchPackageOptions &options) PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE
Definition: about_metadata-fwd.hh:23
bool match_package_in_set(const Environment &env, const SetSpecTree &spec, const std::shared_ptr< const PackageID > &id, const MatchPackageOptions &options) PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE
STL namespace.
Options< MatchPackageOption > MatchPackageOptions
Definition: match_package-fwd.hh:38
bool match_package(const Environment &env, const PackageDepSpec &spec, const std::shared_ptr< const PackageID > &id, const std::shared_ptr< const PackageID > &spec_id, const MatchPackageOptions &options) PALUDIS_ATTRIBUTE((warn_unused_result)) PALUDIS_VISIBLE
#define PALUDIS_ATTRIBUTE(x)
Definition: attributes.hh:53
#define PALUDIS_VISIBLE
Definition: attributes.hh:59