Rapicorn - Experimental UI Toolkit - Source Code
13.07.0
|
00001 // Licensed GNU LGPL v3 or later: http://www.gnu.org/licenses/lgpl.html 00002 #ifndef __RAPICORN_INIFILE_HH__ 00003 #define __RAPICORN_INIFILE_HH__ 00004 00005 #include <rcore/blobres.hh> 00006 00007 namespace Rapicorn { 00008 00009 class IniFile { 00010 typedef std::map<String,StringVector> SectionMap; 00011 SectionMap sections_; 00012 void load_ini (const String &inputname, const String &data); 00013 //bool set (const String §ion, const String &key, const String &value, const String &locale = ""); 00014 //bool del (const String §ion, const String &key, const String &locale = "*"); 00015 //bool value (const String &dotpath, const String &value); 00016 const StringVector& section (const String &name) const; 00017 public: 00018 explicit IniFile (const String &res_ini); 00019 explicit IniFile (Blob blob); 00020 explicit IniFile (const IniFile &source); 00021 IniFile& operator= (const IniFile &source); 00022 //String get (const String §ion, const String &key, const String &locale = "") const; 00023 bool has_sections () const; 00024 StringVector sections () const; 00025 bool has_section (const String §ion) const; 00026 StringVector attributes (const String §ion) const; 00027 bool has_attribute (const String §ion, const String &key) const; 00028 String raw_value (const String &dotpath) const; 00029 StringVector raw_values () const; 00030 String value_as_string (const String &dotpath) const; 00031 static String cook_string (const String &input_string); 00032 }; 00033 00034 } // Rapicorn 00035 00036 #endif /* __RAPICORN_INIFILE_HH__ */