libzypp  10.5.0
LocaleSupport.cc
Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                          ____ _   __ __ ___                          |
00003 |                         |__  / \ / / . \ . \                         |
00004 |                           / / \ V /|  _/  _/                         |
00005 |                          / /__ | | | | | |                           |
00006 |                         /_____||_| |_| |_|                           |
00007 |                                                                      |
00008 \---------------------------------------------------------------------*/
00012 #include <iostream>
00013 #include "zypp/base/LogTools.h"
00014 
00015 #include "zypp/sat/LocaleSupport.h"
00016 
00017 using std::endl;
00018 
00020 namespace zypp
00021 { 
00022 
00023   namespace sat
00024   { 
00025 
00026     /******************************************************************
00027     **
00028     **  FUNCTION NAME : operator<<
00029     **  FUNCTION TYPE : std::ostream &
00030     */
00031     std::ostream & operator<<( std::ostream & str, const LocaleSupport & obj )
00032     {
00033       return str << obj.locale() << '(' << (obj.isAvailable()?'a':'_') << (obj.isRequested()?'R':'_') << ')';
00034     }
00035 
00036     /******************************************************************
00037     **
00038     **  FUNCTION NAME : dumpOn
00039     **  FUNCTION TYPE : std::ostream &
00040     */
00041     std::ostream & dumpOn( std::ostream & str, const LocaleSupport & obj )
00042     {
00043       return dumpRange( str << obj, obj.begin(), obj.end() );
00044     }
00045 
00047   } // namespace sat
00050 } // namespace zypp