11#ifndef ZYPP_BASE_LOCALEGUARD_H 
   12#define ZYPP_BASE_LOCALEGUARD_H 
   34    LocaleGuard( 
int category_r, 
const std::string & value_r = 
"C" )
 
   37      const char * ovalue = ::setlocale( category_r, 
nullptr );
 
   38      if ( ovalue && ovalue != value_r )
 
   42        ::setlocale( 
_category, value_r.c_str() );
 
 
 
int _category
saved category or -1 if no restore needed
NON_COPYABLE(LocaleGuard)
LocaleGuard(int category_r, const std::string &value_r="C")
Ctor saving the current locale category value.
void restore()
immediately restore the saved locale category value.
~LocaleGuard()
Dtor asserts the saved locale category value is restored.
std::string _value
saved category value
Easy-to use interface to the ZYPP dependency resolver.