paludis  Version 2.6.0
partially_made_package_dep_spec.hh
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 2005, 2006, 2007, 2008, 2009, 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_PARTIALLY_MADE_PACKAGE_DEP_SPEC_HH
21 #define PALUDIS_GUARD_PALUDIS_PARTIALLY_MADE_PACKAGE_DEP_SPEC_HH 1
22 
23 #include <paludis/partially_made_package_dep_spec-fwd.hh>
24 #include <paludis/util/pimp.hh>
25 #include <paludis/name-fwd.hh>
26 #include <paludis/dep_spec.hh>
27 
28 namespace paludis
29 {
30  /**
31  * A PartiallyMadePackageDepSpec is returned by make_package_dep_spec()
32  * and is used to incrementally build a PackageDepSpec.
33  *
34  * \ingroup g_dep_spec
35  * \since 0.26
36  */
38  {
39  private:
41 
42  public:
43  ///\name Basic operations
44  ///\{
45 
50 
51  ///\}
52 
53  /**
54  * Set our package requirements, return ourself.
55  */
57 
58  /**
59  * Clear our package requirements, return ourself.
60  *
61  * \since 0.55
62  */
63  PartiallyMadePackageDepSpec & clear_package();
64 
65  /**
66  * Set our slot requirements, return ourself.
67  */
68  PartiallyMadePackageDepSpec & slot_requirement(const std::shared_ptr<const SlotRequirement> &);
69 
70  /**
71  * Clear our slot requirements, return ourself.
72  *
73  * \since 0.55
74  */
75  PartiallyMadePackageDepSpec & clear_slot_requirement();
76 
77  /**
78  * Set our in-repository requirement, return ourself.
79  */
80  PartiallyMadePackageDepSpec & in_repository(const RepositoryName &);
81 
82  /**
83  * Clear our in-repository requirement, return ourself.
84  *
85  * \since 0.55
86  */
87  PartiallyMadePackageDepSpec & clear_in_repository();
88 
89  /**
90  * Set our from-repository requirement, return ourself.
91  */
92  PartiallyMadePackageDepSpec & from_repository(const RepositoryName &);
93 
94  /**
95  * Clear our from-repository requirement, return ourself.
96  *
97  * \since 0.55
98  */
99  PartiallyMadePackageDepSpec & clear_from_repository();
100 
101  /**
102  * Set our installable-to-repository requirement, return ourself.
103  *
104  * \since 0.32
105  */
106  PartiallyMadePackageDepSpec & installable_to_repository(const InstallableToRepository &);
107 
108  /**
109  * Clear our installable-to-repository requirement, return ourself.
110  *
111  * \since 0.55
112  */
113  PartiallyMadePackageDepSpec & clear_installable_to_repository();
114 
115  /**
116  * Set our installed-at-path requirement, return ourself.
117  *
118  * \since 0.32
119  */
120  PartiallyMadePackageDepSpec & installed_at_path(const FSPath &);
121 
122  /**
123  * Clear our installed-at-path requirement, return ourself.
124  *
125  * \since 0.55
126  */
127  PartiallyMadePackageDepSpec & clear_installed_at_path();
128 
129  /**
130  * Set our installable-to-path requirement, return ourself.
131  *
132  * \since 0.32
133  */
134  PartiallyMadePackageDepSpec & installable_to_path(const InstallableToPath &);
135 
136  /**
137  * Clear our installable-to-path requirement, return ourself.
138  *
139  * \since 0.55
140  */
141  PartiallyMadePackageDepSpec & clear_installable_to_path();
142 
143  /**
144  * Set our package name part requirements, return ourself.
145  */
146  PartiallyMadePackageDepSpec & package_name_part(const PackageNamePart &);
147 
148  /**
149  * Clear our package name part requirements, return ourself.
150  *
151  * \since 0.55
152  */
153  PartiallyMadePackageDepSpec & clear_package_name_part();
154 
155  /**
156  * Set our category name part requirements, return ourself.
157  */
158  PartiallyMadePackageDepSpec & category_name_part(const CategoryNamePart &);
159 
160  /**
161  * Clear our category name part requirements, return ourself.
162  *
163  * \since 0.55
164  */
165  PartiallyMadePackageDepSpec & clear_category_name_part();
166 
167  /**
168  * Add a version requirement, return ourself.
169  */
170  PartiallyMadePackageDepSpec & version_requirement(const VersionRequirement &);
171 
172  /**
173  * Clear all version requirement, return ourself.
174  *
175  * \since 0.55
176  */
177  PartiallyMadePackageDepSpec & clear_version_requirements();
178 
179  /**
180  * Set our version requirements mode, return ourself.
181  */
182  PartiallyMadePackageDepSpec & version_requirements_mode(const VersionRequirementsMode &);
183 
184  /**
185  * Add an additional requirement, return ourself.
186  */
187  PartiallyMadePackageDepSpec & additional_requirement(
188  const std::shared_ptr<const AdditionalPackageDepSpecRequirement> &);
189 
190  /**
191  * Clear additional requirements, return ourself.
192  *
193  * \since 0.41
194  */
195  PartiallyMadePackageDepSpec & clear_additional_requirements();
196 
197  /**
198  * Turn ourselves into a PackageDepSpec.
199  */
200  operator const PackageDepSpec() const;
201 
202  /**
203  * Explicitly turn ourselves into a PackageDepSpec.
204  */
205  const PackageDepSpec to_package_dep_spec() const;
206  };
207 
208  extern template class Pimp<PartiallyMadePackageDepSpec>;
209 }
210 
211 #endif
Definition: pimp.hh:51
Definition: about_metadata-fwd.hh:23
Definition: name.hh:110
Definition: dep_spec.hh:322
Definition: dep_spec.hh:345
Definition: partially_made_package_dep_spec.hh:37
VersionRequirementsMode
Definition: version_requirements-fwd.hh:54
Definition: wrapped_value-fwd.hh:29
Definition: version_requirements.hh:60
Definition: options-fwd.hh:34
Definition: fs_path.hh:33
Definition: dep_spec.hh:310
#define PALUDIS_VISIBLE
Definition: attributes.hh:59