libzypp: zypp/sat/LocaleSupport.cc Source File

libzypp 17.38.13

LocaleSupport.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#include <iostream>
13#include <zypp-core/base/LogTools.h>
14
15#include <zypp/sat/LocaleSupport.h>
16
17using std::endl;
18
20namespace zypp
21{
23 namespace sat
24 {
25
26 /******************************************************************
27 **
28 ** FUNCTION NAME : operator<<
29 ** FUNCTION TYPE : std::ostream &
30 */
31 std::ostream & operator<<( std::ostream & str, const LocaleSupport & obj )
32 {
33 return str << obj.locale() << '(' << (obj.isAvailable()?'a':'_') << (obj.isRequested()?'R':'_') << ')';
34 }
35
36 /******************************************************************
37 **
38 ** FUNCTION NAME : dumpOn
39 ** FUNCTION TYPE : std::ostream &
40 */
41 std::ostream & dumpOn( std::ostream & str, const LocaleSupport & obj )
42 {
43 return dumpRange( str << obj, obj.begin(), obj.end() );
44 }
45
47 } // namespace sat
50} // namespace zypp
LocaleSupport.h
LogTools.h
zypp::sat::LocaleSupport
Convenience methods to manage support for a specific Locale.
Definition LocaleSupport.h:61
zypp::sat::LocaleSupport::isRequested
bool isRequested() const
Whether the solver will automatically select language specific packages for my Locale.
Definition LocaleSupport.h:81
zypp::sat::LocaleSupport::locale
const Locale & locale() const
My Locale.
Definition LocaleSupport.h:73
zypp::sat::LocaleSupport::isAvailable
bool isAvailable() const
Whether there are language specific packages supporting my Locale.
Definition LocaleSupport.h:77
zypp::sat::LocaleSupport::begin
iterator begin() const
Definition LocaleSupport.h:93
zypp::sat::LocaleSupport::end
iterator end() const
Definition LocaleSupport.h:96
str
String related utilities and Regular expression matching.
zypp::sat
Libsolv interface
zypp::sat::operator<<
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
relates: FileConflicts Stream output
Definition FileConflicts.cc:109
zypp::sat::dumpOn
std::ostream & dumpOn(std::ostream &str, const LocaleSupport &obj)
relates: LocaleSupport More verbose stream output including dependencies
Definition LocaleSupport.cc:41
zypp
Easy-to use interface to the ZYPP dependency resolver.
Definition CodePitfalls.doc:2
zypp::dumpRange
std::ostream & dumpRange(std::ostream &str, TIterator begin, TIterator end, const std::string &intro="{", const std::string &pfx="\n ", const std::string &sep="\n ", const std::string &sfx="\n", const std::string &extro="}")
Print range defined by iterators (multiline style).
Definition LogTools.h:419