|
paludis Version 3.0.2
The one true package mangler
|
#include <choice.hh>
Public Member Functions | |
| void | add (const std::shared_ptr< const Choice > &) |
| const std::shared_ptr< const ChoiceValue > | find_by_name_with_prefix (const ChoiceNameWithPrefix &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| bool | has_matching_contains_every_value_prefix (const ChoiceNameWithPrefix &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
Iterate over Choice children | |
| typedef WrappedForwardIterator< ConstIteratorTag, const std::shared_ptr< const Choice > > | ConstIterator |
| ConstIterator | begin () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| ConstIterator | end () const PALUDIS_ATTRIBUTE((warn_unused_result)) |
| ConstIterator | find (const ChoicePrefixName &) const PALUDIS_ATTRIBUTE((warn_unused_result)) |
Choices holds a collection of configurable values for a PackageID.
A PackageID may have a choices_key holding a Choices object. This Choices object will hold a number of Choice objects. Examples of things held by Choice objects for ebuilds include USE, USE_EXPAND values (linguas, video_cards and so on), ARCH and build_options.
| void paludis::Choices::add | ( | const std::shared_ptr< const Choice > & | ) |
Add a new Choice to our collection.
References PALUDIS_ATTRIBUTE.
| ConstIterator paludis::Choices::find | ( | const ChoicePrefixName & | ) | const |
| const std::shared_ptr< const ChoiceValue > paludis::Choices::find_by_name_with_prefix | ( | const ChoiceNameWithPrefix & | ) | const |
Find a ChoiceValue that has a particular prefix and name.
Returns a zero pointer for no match.
This is a convenient way of getting a particular use flag's details. Calling this method with, say, "nls" or "ruby" will get the value for that flag without having to hunt around in all the subkeys manually. Prefixes work too, e.g. "linguas_en" for 0-based EAPIs or "linguas:en" for exheres EAPIs.
References find_by_name_with_prefix(), and PALUDIS_ATTRIBUTE.
Referenced by find_by_name_with_prefix().
| bool paludis::Choices::has_matching_contains_every_value_prefix | ( | const ChoiceNameWithPrefix & | ) | const |
Do we have a Choice subkey with contains_every_value true and a prefix matching this name?
0-based EAPIs don't require things like userland_GNU in IUSE. So if you're looking for a flag and don't find it, check this method before issuing a QA notice.
References has_matching_contains_every_value_prefix(), and PALUDIS_ATTRIBUTE.
Referenced by has_matching_contains_every_value_prefix().