paludis  Version 2.6.0
elike_choices.hh
1 /* vim: set sw=4 sts=4 et foldmethod=syntax : */
2 
3 /*
4  * Copyright (c) 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_ELIKE_CHOICES_HH
21 #define PALUDIS_GUARD_PALUDIS_ELIKE_CHOICES_HH 1
22 
23 #include <paludis/elike_choices-fwd.hh>
25 #include <paludis/util/tribool-fwd.hh>
26 #include <paludis/choice.hh>
29 
30 namespace paludis
31 {
33  public ChoiceValue
34  {
35  private:
36  const bool _enabled;
37  const bool _mask;
38 
39  public:
40  ELikeOptionalTestsChoiceValue(const std::shared_ptr<const PackageID> &,
41  const Environment * const env, const std::shared_ptr<const Choice> &,
42  const bool mask);
43 
44  virtual const UnprefixedChoiceName unprefixed_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
45  virtual const ChoiceNameWithPrefix name_with_prefix() const PALUDIS_ATTRIBUTE((warn_unused_result));
46  virtual bool enabled() const PALUDIS_ATTRIBUTE((warn_unused_result));
47  virtual bool enabled_by_default() const PALUDIS_ATTRIBUTE((warn_unused_result));
48  virtual bool locked() const PALUDIS_ATTRIBUTE((warn_unused_result));
49  virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result));
50  virtual ChoiceOrigin origin() const PALUDIS_ATTRIBUTE((warn_unused_result));
51  virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
52  virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
53  PALUDIS_ATTRIBUTE((warn_unused_result));
54  virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
55 
56  static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
57  static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
58  };
59 
61  public ChoiceValue
62  {
63  private:
64  const bool _enabled;
65  const bool _mask;
66 
67  public:
68  ELikeRecommendedTestsChoiceValue(const std::shared_ptr<const PackageID> &,
69  const Environment * const env, const std::shared_ptr<const Choice> &,
70  const bool mask);
71 
72  virtual const UnprefixedChoiceName unprefixed_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
73  virtual const ChoiceNameWithPrefix name_with_prefix() const PALUDIS_ATTRIBUTE((warn_unused_result));
74  virtual bool enabled() const PALUDIS_ATTRIBUTE((warn_unused_result));
75  virtual bool enabled_by_default() const PALUDIS_ATTRIBUTE((warn_unused_result));
76  virtual bool locked() const PALUDIS_ATTRIBUTE((warn_unused_result));
77  virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result));
78  virtual ChoiceOrigin origin() const PALUDIS_ATTRIBUTE((warn_unused_result));
79  virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
80  virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
81  PALUDIS_ATTRIBUTE((warn_unused_result));
82  virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
83 
84  static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
85  static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
86  };
87 
89  public ChoiceValue
90  {
91  private:
92  const bool _enabled;
93  const bool _mask;
94 
95  public:
96  ELikeExpensiveTestsChoiceValue(const std::shared_ptr<const PackageID> &,
97  const Environment * const env, const std::shared_ptr<const Choice> &,
98  const bool mask);
99 
100  virtual const UnprefixedChoiceName unprefixed_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
101  virtual const ChoiceNameWithPrefix name_with_prefix() const PALUDIS_ATTRIBUTE((warn_unused_result));
102  virtual bool enabled() const PALUDIS_ATTRIBUTE((warn_unused_result));
103  virtual bool enabled_by_default() const PALUDIS_ATTRIBUTE((warn_unused_result));
104  virtual bool locked() const PALUDIS_ATTRIBUTE((warn_unused_result));
105  virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result));
106  virtual ChoiceOrigin origin() const PALUDIS_ATTRIBUTE((warn_unused_result));
107  virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
108  virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
109  PALUDIS_ATTRIBUTE((warn_unused_result));
110  virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
111 
112  static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
113  static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
114  };
115 
117  public ChoiceValue
118  {
119  private:
120  const bool _enabled;
121  const std::string _parameter;
122 
123  public:
124  ELikeJobsChoiceValue(const std::shared_ptr<const PackageID> &,
125  const Environment * const env, const std::shared_ptr<const Choice> &);
126 
127  virtual const UnprefixedChoiceName unprefixed_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
128  virtual const ChoiceNameWithPrefix name_with_prefix() const PALUDIS_ATTRIBUTE((warn_unused_result));
129  virtual bool enabled() const PALUDIS_ATTRIBUTE((warn_unused_result));
130  virtual bool enabled_by_default() const PALUDIS_ATTRIBUTE((warn_unused_result));
131  virtual bool locked() const PALUDIS_ATTRIBUTE((warn_unused_result));
132  virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result));
133  virtual ChoiceOrigin origin() const PALUDIS_ATTRIBUTE((warn_unused_result));
134  virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
135  virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
136  PALUDIS_ATTRIBUTE((warn_unused_result));
137  virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
138 
139  static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
140  static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
141  };
142 
144  public ChoiceValue
145  {
146  private:
147  const bool _enabled;
148 
149  public:
150  ELikeTraceChoiceValue(const std::shared_ptr<const PackageID> &,
151  const Environment * const env, const std::shared_ptr<const Choice> &);
152 
153  virtual const UnprefixedChoiceName unprefixed_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
154  virtual const ChoiceNameWithPrefix name_with_prefix() const PALUDIS_ATTRIBUTE((warn_unused_result));
155  virtual bool enabled() const PALUDIS_ATTRIBUTE((warn_unused_result));
156  virtual bool enabled_by_default() const PALUDIS_ATTRIBUTE((warn_unused_result));
157  virtual bool locked() const PALUDIS_ATTRIBUTE((warn_unused_result));
158  virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result));
159  virtual ChoiceOrigin origin() const PALUDIS_ATTRIBUTE((warn_unused_result));
160  virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
161  virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
162  PALUDIS_ATTRIBUTE((warn_unused_result));
163  virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
164 
165  static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
166  static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
167  };
168 
170  public ChoiceValue
171  {
172  private:
173  const bool _enabled;
175 
176  public:
177  ELikeSymbolsChoiceValue(const std::shared_ptr<const PackageID> &,
178  const Environment * const env, const std::shared_ptr<const Choice> &,
179  const ELikeSymbolsChoiceValueParameter _force);
180 
181  virtual const UnprefixedChoiceName unprefixed_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
182  virtual const ChoiceNameWithPrefix name_with_prefix() const PALUDIS_ATTRIBUTE((warn_unused_result));
183  virtual bool enabled() const PALUDIS_ATTRIBUTE((warn_unused_result));
184  virtual bool enabled_by_default() const PALUDIS_ATTRIBUTE((warn_unused_result));
185  virtual bool locked() const PALUDIS_ATTRIBUTE((warn_unused_result));
186  virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result));
187  virtual ChoiceOrigin origin() const PALUDIS_ATTRIBUTE((warn_unused_result));
188  virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
189  virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
190  PALUDIS_ATTRIBUTE((warn_unused_result));
191  virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
192 
193  static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
194  static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
195 
196  static bool should_split(const std::string &) PALUDIS_ATTRIBUTE((warn_unused_result));
197  static bool should_strip(const std::string &) PALUDIS_ATTRIBUTE((warn_unused_result));
198  static bool should_compress(const std::string &) PALUDIS_ATTRIBUTE((warn_unused_result));
199  };
200 
202  public ChoiceValue
203  {
204  private:
205  const bool _enabled;
206  const ELikeWorkChoiceValueParameter _param;
207 
208  public:
209  ELikeWorkChoiceValue(const std::shared_ptr<const PackageID> &,
210  const Environment * const env, const std::shared_ptr<const Choice> &,
211  const ELikeWorkChoiceValueParameter force);
212 
213  virtual const UnprefixedChoiceName unprefixed_name() const PALUDIS_ATTRIBUTE((warn_unused_result));
214  virtual const ChoiceNameWithPrefix name_with_prefix() const PALUDIS_ATTRIBUTE((warn_unused_result));
215  virtual bool enabled() const PALUDIS_ATTRIBUTE((warn_unused_result));
216  virtual bool enabled_by_default() const PALUDIS_ATTRIBUTE((warn_unused_result));
217  virtual bool locked() const PALUDIS_ATTRIBUTE((warn_unused_result));
218  virtual const std::string description() const PALUDIS_ATTRIBUTE((warn_unused_result));
219  virtual ChoiceOrigin origin() const PALUDIS_ATTRIBUTE((warn_unused_result));
220  virtual const std::string parameter() const PALUDIS_ATTRIBUTE((warn_unused_result));
221  virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
222  PALUDIS_ATTRIBUTE((warn_unused_result));
223  virtual bool presumed() const PALUDIS_ATTRIBUTE((warn_unused_result));
224 
225  static const UnprefixedChoiceName canonical_unprefixed_name() PALUDIS_ATTRIBUTE((warn_unused_result));
226  static const ChoiceNameWithPrefix canonical_name_with_prefix() PALUDIS_ATTRIBUTE((warn_unused_result));
227 
228  static bool should_remove(const std::string &) PALUDIS_ATTRIBUTE((warn_unused_result));
229  static bool should_remove_on_failure(const std::string &) PALUDIS_ATTRIBUTE((warn_unused_result));
230  static bool should_merge_nondestructively(const std::string &) PALUDIS_ATTRIBUTE((warn_unused_result));
231  };
232 
234  public ChoiceValue
235  {
236  private:
237  bool _enabled;
238 
239  public:
240  ELikeDwarfCompressionChoiceValue(const std::shared_ptr<const PackageID> &,
241  const Environment * const,
242  const std::shared_ptr<const Choice> &);
243 
244  ///\name Properties
245  ///\{
246 
247  virtual const UnprefixedChoiceName unprefixed_name() const
248  PALUDIS_ATTRIBUTE((warn_unused_result));
249  virtual const ChoiceNameWithPrefix name_with_prefix() const
250  PALUDIS_ATTRIBUTE((warn_unused_result));
251  virtual bool enabled() const
252  PALUDIS_ATTRIBUTE((warn_unused_result));
253  virtual bool enabled_by_default() const
254  PALUDIS_ATTRIBUTE((warn_unused_result));
255  virtual bool presumed() const
256  PALUDIS_ATTRIBUTE((warn_unused_result));
257  virtual bool locked() const
258  PALUDIS_ATTRIBUTE((warn_unused_result));
259  virtual const std::string description() const
260  PALUDIS_ATTRIBUTE((warn_unused_result));
261  virtual ChoiceOrigin origin() const
262  PALUDIS_ATTRIBUTE((warn_unused_result));
263  virtual const std::string parameter() const
264  PALUDIS_ATTRIBUTE((warn_unused_result));
265  virtual const std::shared_ptr<const PermittedChoiceValueParameterValues> permitted_parameter_values() const
266  PALUDIS_ATTRIBUTE((warn_unused_result));
267 
268  /// \}
269 
270  static const UnprefixedChoiceName canonical_unprefixed_name()
271  PALUDIS_ATTRIBUTE((warn_unused_result));
272  static const ChoiceNameWithPrefix canonical_name_with_prefix()
273  PALUDIS_ATTRIBUTE((warn_unused_result));
274  };
275 }
276 
277 #endif
278 
Definition: about_metadata-fwd.hh:23
Definition: elike_choices.hh:143
Definition: elike_choices.hh:60
ELikeWorkChoiceValueParameter
Definition: elike_choices-fwd.hh:8
Definition: elike_choices.hh:169
ELikeSymbolsChoiceValueParameter
Definition: elike_choices-fwd.hh:29
Definition: environment.hh:200
Definition: elike_choices.hh:32
Definition: elike_choices.hh:88
Definition: wrapped_value-fwd.hh:29
Definition: elike_choices.hh:233
Definition: elike_choices.hh:201
ChoiceOrigin
Definition: choice-fwd.hh:14
Definition: choice.hh:333
#define PALUDIS_ATTRIBUTE(x)
Definition: attributes.hh:53
#define PALUDIS_VISIBLE
Definition: attributes.hh:59
Definition: elike_choices.hh:116