X-Git-Url: http://git.home-dn.net/?p=manu%2Fsuphp.git;a=blobdiff_plain;f=src%2FIniFile.hpp;h=d1e49d50431ca01e5db884066f5283068b415933;hp=565a1572fecbb514ecb7cb705b38570f2556bbbe;hb=849f4a7977b5780eacae8fad7a078d05f4a615ee;hpb=b0eaa3f1fbf491fdc8a3044cf20754f14254338a diff --git a/src/IniFile.hpp b/src/IniFile.hpp index 565a157..d1e49d5 100644 --- a/src/IniFile.hpp +++ b/src/IniFile.hpp @@ -1,5 +1,5 @@ /* - suPHP - (c)2002-2005 Sebastian Marsching + suPHP - (c)2002-2008 Sebastian Marsching This file is part of suPHP. @@ -41,33 +41,35 @@ namespace suPHP { */ class IniFile { private: - std::map sections; + std::map sections; + + std::string parseValue(const std::string& value) const throw (ParsingException); public: - /** - * Reads values from INI file - */ - void parse(File file) throw (IOException, ParsingException); + /** + * Reads values from INI file + */ + void parse(const File& file) throw (IOException, ParsingException); - /** - * Returns section - */ - IniSection& getSection(std::string name) throw (KeyNotFoundException); - - /** - * Index operator - */ - IniSection& operator[](std::string name) throw (KeyNotFoundException); + /** + * Returns section + */ + const IniSection& getSection(const std::string& name) const throw (KeyNotFoundException); + + /** + * Index operator + */ + const IniSection& operator[](const std::string& name) const throw (KeyNotFoundException); - /** - * Returns vector containing names of all sections - */ - std::vector getSections(); + /** + * Returns vector containing names of all sections + */ + const std::vector getSections(); - /** - * Checks wheter a section is existing - */ - bool hasSection(std::string name); + /** + * Checks wheter a section is existing + */ + bool hasSection(const std::string& name) const; }; };