Cupt
config.hpp
Go to the documentation of this file.
00001 /**************************************************************************
00002 *   Copyright (C) 2010 by Eugene V. Lyubimkin                             *
00003 *                                                                         *
00004 *   This program is free software; you can redistribute it and/or modify  *
00005 *   it under the terms of the GNU General Public License                  *
00006 *   (version 3 or above) as published by the Free Software Foundation.    *
00007 *                                                                         *
00008 *   This program is distributed in the hope that it will be useful,       *
00009 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00010 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00011 *   GNU General Public License for more details.                          *
00012 *                                                                         *
00013 *   You should have received a copy of the GNU GPL                        *
00014 *   along with this program; if not, write to the                         *
00015 *   Free Software Foundation, Inc.,                                       *
00016 *   51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA               *
00017 **************************************************************************/
00018 #ifndef CUPT_CONFIG_SEEN
00019 #define CUPT_CONFIG_SEEN
00020 
00022 
00023 #include <cupt/common.hpp>
00024 
00025 namespace cupt {
00026 
00027 namespace internal {
00028 
00029 struct ConfigImpl;
00030 
00031 }
00032 
00034 class CUPT_API Config
00035 {
00036     internal::ConfigImpl* __impl;
00037  public:
00039 
00042     Config();
00044     virtual ~Config();
00045 
00047     Config(const Config& other);
00049     Config& operator=(const Config& other);
00050 
00052     vector< string > getScalarOptionNames() const;
00054     vector< string > getListOptionNames() const;
00055 
00057 
00061     void setScalar(const string& optionName, const string& value);
00063 
00067     void setList(const string& optionName, const string& value);
00068 
00070 
00073     vector< string > getList(const string& optionName) const;
00075 
00078     string getString(const string& optionName) const;
00080 
00083     bool getBool(const string& optionName) const;
00085 
00088     ssize_t getInteger(const string& optionName) const;
00090 
00093     string getPath(const string& optionName) const;
00094 };
00095 
00096 } // namespace
00097 
00098 #endif
00099