paludis  Version 2.6.0
Public Member Functions | List of all members
paludis::Choices Class Reference

#include <choice.hh>

Public Member Functions

void add (const std::shared_ptr< const Choice > &)
 
const std::shared_ptr< const ChoiceValuefind_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))
 

Basic operations

 Choices ()
 
 ~Choices ()
 

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))
 

Detailed Description

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.

Since
0.32

Member Function Documentation

void paludis::Choices::add ( const std::shared_ptr< const Choice > &  )

Add a new Choice to our collection.

ConstIterator paludis::Choices::find ( const ChoicePrefixName ) const
Since
0.44
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.

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.


The documentation for this class was generated from the following file: