paludis::Choices Class Reference
[Choices]

#include <choice.hh>

Inheritance diagram for paludis::Choices:

paludis::PrivateImplementationPattern< C_ >

List of all members.

Iterate over Choice children

typedef WrappedForwardIterator
< ConstIteratorTag, const
std::tr1::shared_ptr< const
Choice > > 
ConstIterator
ConstIterator begin () const PALUDIS_ATTRIBUTE((warn_unused_result))
ConstIterator end () const PALUDIS_ATTRIBUTE((warn_unused_result))

Basic operations

 Choices ()
 ~Choices ()

Public Member Functions

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


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::tr1::shared_ptr< const Choice > &   ) 

Add a new Choice to our collection.

const std::tr1::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:
Generated on Mon Sep 21 10:36:09 2009 for paludis by  doxygen 1.5.4