openModeller
Version 1.5.0
|
#include <Settings.hh>
Public Member Functions | |
~Settings () | |
Static Public Member Functions | |
static void | loadConfig (const std::string configFile) |
static std::string | get (const std::string &key) |
static int | count (const std::string &key) |
static std::vector< std::string > | getAll (const std::string &key) |
Private Member Functions | |
Settings () | |
Static Private Member Functions | |
static Settings & | _getInstance () |
static void | _loadConfig (Settings *settings, const std::string configFile) |
Private Attributes | |
FileParser * | _fp |
Declaration of Settings class.
LICENSE INFORMATION
Copyright(c) 2013 by CRIA - Centro de Referencia em Informacao Ambiental
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details:
http://www.gnu.org/copyleft/gpl.html Class used to access openModeller settings stored in a key = value configuration file.
Definition at line 42 of file Settings.hh.
Settings::~Settings | ( | ) |
Definition at line 53 of file Settings.cpp.
References _fp, and _getInstance().
|
private |
Definition at line 45 of file Settings.cpp.
|
staticprivate |
Definition at line 66 of file Settings.cpp.
References _fp, and _loadConfig().
Referenced by count(), get(), getAll(), loadConfig(), and ~Settings().
|
staticprivate |
Definition at line 87 of file Settings.cpp.
References _fp.
Referenced by _getInstance(), and loadConfig().
|
static |
Return the number of times that a certain key appears in the file.
key | Key to be searched. |
Definition at line 127 of file Settings.cpp.
References _fp, _getInstance(), and FileParser::count().
Referenced by CacheManager::initialize(), initialPluginPath(), isFromRejectedSource(), and omDataPath().
|
static |
Get the value of a key (case insensitive).
key | Key to be searched. |
Definition at line 112 of file Settings.cpp.
References _fp, _getInstance(), and FileParser::get().
Referenced by CacheManager::initialize(), initialPluginPath(), and omDataPath().
|
static |
Get a set of values with the same key specified in the argument.
key | Key to be searched. |
Definition at line 142 of file Settings.cpp.
References _fp, _getInstance(), and FileParser::getAll().
Referenced by isFromRejectedSource().
|
static |
Load configuration from file.
configFile | Configuration file (full path) |
Definition at line 100 of file Settings.cpp.
References _getInstance(), _loadConfig(), Log::debug(), and Log::instance().
Referenced by main().
|
private |
Definition at line 79 of file Settings.hh.
Referenced by _getInstance(), _loadConfig(), count(), get(), getAll(), and ~Settings().