libzypp  11.13.5
zypp::sat::LocaleSupport Class Reference

Convenience methods to manage support for a specific Locale. More...

#include <LocaleSupport.h>

Inheritance diagram for zypp::sat::LocaleSupport:

List of all members.

- Public Types inherited from zypp::sat::SolvIterMixin< LocaleSupport, filter_iterator< filter::ByLocaleSupport, Pool::SolvableIterator > >
typedef size_t size_type
typedef filter_iterator
< filter::ByLocaleSupport,
Pool::SolvableIterator
Solvable_iterator
typedef transform_iterator
< asPoolItem,
Solvable_iterator
PoolItem_iterator
typedef transform_iterator
< ui::asSelectable,
UnifiedSolvable_iterator
Selectable_iterator

Public Member Functions

 LocaleSupport ()
 Default ctor.
 LocaleSupport (const Locale &locale_r)
 Ctor taking a Locale.
const Localelocale () const
 My Locale.
bool isAvailable () const
 Whether there are language specific packages supporting my Locale.
bool isRequested () const
 Whether the solver will automatically select language specific packages for my Locale.
void setRequested (bool yesno_r)
 Turn on/off solver support for my Locale.
- Public Member Functions inherited from zypp::sat::SolvIterMixin< LocaleSupport, filter_iterator< filter::ByLocaleSupport, Pool::SolvableIterator > >
bool empty () const
 Whether the collection is epmty.
size_type size () const
 Size of the collection.
bool contains (const _Solv &solv_r) const
 Whether collection contains a specific Solvable.
Solvable_iterator solvableBegin () const
Solvable_iterator solvableEnd () const
PoolItem_iterator poolItemBegin () const
PoolItem_iterator poolItemEnd () const
Selectable_iterator selectableBegin () const
Selectable_iterator selectableEnd () const

Private Attributes

Locale _locale

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const LocaleSupport &obj)
std::ostream & dumpOn (std::ostream &str, const LocaleSupport &obj)
bool operator== (const LocaleSupport &lhs, const LocaleSupport &rhs)
bool operator!= (const LocaleSupport &lhs, const LocaleSupport &rhs)
bool operator< (const LocaleSupport &lhs, const LocaleSupport &rhs)

Iterate through all \ref sat::Solvables supporting my \ref Locale.

typedef Solvable_iterator iterator
iterator begin () const
iterator end () const

Additional Inherited Members

- Protected Member Functions inherited from zypp::sat::SolvIterMixin< LocaleSupport, filter_iterator< filter::ByLocaleSupport, Pool::SolvableIterator > >
 SolvIterMixin ()
 SolvIterMixin (const SolvIterMixin &)
 ~SolvIterMixin ()
void operator= (const SolvIterMixin &)
- Static Protected Member Functions inherited from zypp::sat::detail::PoolMember
static PoolImplmyPool ()

Detailed Description

Convenience methods to manage support for a specific Locale.

sat::LocaleSupport myLocale( Locale("de") );
if ( myLocale.isAvailable() )
{
MIL << "Support for locale '" << myLocale.locale() << "' is available." << endl;
}
if ( ! myLocale.isRequested() )
{
MIL << "Will enable support for locale '" << myLocale.locale() << "'." << endl;
myLocale.setRequested( true );
}
MIL << "Packages supporting locale '" << myLocale.locale() << "':" << endl;
for_( it, myLocale.begin(), myLocale.end() )
{
// iterate over sat::Solvables
MIL << " " << *it << endl;
// or get the PoolItems
DBG << " " << PoolItem(*it) << endl;
}
Todo:
If iterator is too slow install a proxy watching the Pool::serial.

Definition at line 59 of file LocaleSupport.h.


Member Typedef Documentation


Constructor & Destructor Documentation

zypp::sat::LocaleSupport::LocaleSupport ( )
inline

Default ctor.

Definition at line 64 of file LocaleSupport.h.

zypp::sat::LocaleSupport::LocaleSupport ( const Locale locale_r)
inline

Ctor taking a Locale.

Definition at line 67 of file LocaleSupport.h.


Member Function Documentation

const Locale& zypp::sat::LocaleSupport::locale ( ) const
inline

My Locale.

Definition at line 73 of file LocaleSupport.h.

bool zypp::sat::LocaleSupport::isAvailable ( ) const
inline

Whether there are language specific packages supporting my Locale.

Definition at line 77 of file LocaleSupport.h.

bool zypp::sat::LocaleSupport::isRequested ( ) const
inline

Whether the solver will automatically select language specific packages for my Locale.

Definition at line 81 of file LocaleSupport.h.

void zypp::sat::LocaleSupport::setRequested ( bool  yesno_r)
inline

Turn on/off solver support for my Locale.

Definition at line 85 of file LocaleSupport.h.

iterator zypp::sat::LocaleSupport::begin ( ) const
inline

Definition at line 93 of file LocaleSupport.h.

iterator zypp::sat::LocaleSupport::end ( ) const
inline

Definition at line 96 of file LocaleSupport.h.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const LocaleSupport obj 
)
related

Stream output

Definition at line 31 of file LocaleSupport.cc.

std::ostream & dumpOn ( std::ostream &  str,
const LocaleSupport obj 
)
related

More verbose stream output including dependencies

Definition at line 41 of file LocaleSupport.cc.

bool operator== ( const LocaleSupport lhs,
const LocaleSupport rhs 
)
related

Definition at line 112 of file LocaleSupport.h.

bool operator!= ( const LocaleSupport lhs,
const LocaleSupport rhs 
)
related

Definition at line 116 of file LocaleSupport.h.

bool operator< ( const LocaleSupport lhs,
const LocaleSupport rhs 
)
related

Definition at line 120 of file LocaleSupport.h.


Member Data Documentation

Locale zypp::sat::LocaleSupport::_locale
private

Definition at line 101 of file LocaleSupport.h.


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