00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: LangCode.h 00014 00015 Author: Michael Andres <ma@suse.de> 00016 Maintainer: Michael Andres <ma@suse.de> 00017 00018 /-*/ 00019 #ifndef LangCode_h 00020 #define LangCode_h 00021 00022 #include <iosfwd> 00023 00024 #include <y2util/Ustring.h> 00025 00027 // 00028 // CLASS NAME : LangCode 00032 class LangCode : public Ustring { 00033 00034 private: 00035 00036 static UstringHash * _nameHash; 00037 00038 public: 00039 00040 explicit LangCode( const std::string & n = "" ) : 00041 Ustring( *(_nameHash? _nameHash: (_nameHash = new UstringHash)), n ) {} 00042 00043 public: 00044 00048 bool hasCountry() const; 00049 00053 LangCode languageOnly() const; 00054 }; 00055 00057 00058 #endif // LangCode_h