Fixed goof in config interface. All the functions are now named getValue(), since they have different signatures.

This commit is contained in:
Marius Nita 2002-08-26 15:00:14 +00:00
parent afa215efb6
commit a95a6bd8e8
4 changed files with 10 additions and 10 deletions

View file

@ -46,7 +46,7 @@ Config::~Config()
} }
bool Config::getStringValue(Config::StringType type, string &ret) const bool Config::getValue(Config::StringType type, string &ret) const
{ {
StringItemList::const_iterator it = string_items.begin(), end = string_items.end(); StringItemList::const_iterator it = string_items.begin(), end = string_items.end();
for (; it != end; ++it) { for (; it != end; ++it) {
@ -59,7 +59,7 @@ bool Config::getStringValue(Config::StringType type, string &ret) const
} }
bool Config::getNumberValue(Config::NumberType type, int &ret) const bool Config::getValue(Config::NumberType type, int &ret) const
{ {
NumberItemList::const_iterator it = number_items.begin(), end = number_items.end(); NumberItemList::const_iterator it = number_items.begin(), end = number_items.end();
for (; it != end; ++it) { for (; it != end; ++it) {
@ -72,7 +72,7 @@ bool Config::getNumberValue(Config::NumberType type, int &ret) const
} }
bool Config::getBoolValue(Config::BoolType type, bool &ret) const bool Config::getValue(Config::BoolType type, bool &ret) const
{ {
BoolItemList::const_iterator it = bool_items.begin(), end = bool_items.end(); BoolItemList::const_iterator it = bool_items.begin(), end = bool_items.end();
for (; it != end; ++it) { for (; it != end; ++it) {

View file

@ -63,9 +63,9 @@ public:
Config(); Config();
~Config(); ~Config();
bool getBoolValue(BoolType, bool &) const; bool getValue(BoolType, bool &) const;
bool getStringValue(StringType, std::string &) const; bool getValue(StringType, std::string &) const;
bool getNumberValue(NumberType, int &) const; bool getValue(NumberType, int &) const;
void addOption(const std::string &, const std::string &); void addOption(const std::string &, const std::string &);
}; };

View file

@ -222,7 +222,7 @@ void keytree::initialize(void)
{ {
int tval = 0; int tval = 0;
_epist->getConfig()->getNumberValue(Config::chainTimeout, tval); _epist->getConfig()->getValue(Config::chainTimeout, tval);
_timer = new BTimer(_epist, this); _timer = new BTimer(_epist, this);
if (tval <= 0) if (tval <= 0)

View file

@ -64,7 +64,7 @@ screen::screen(epist *epist, int number)
_info = _epist->getScreenInfo(_number); _info = _epist->getScreenInfo(_number);
_root = _info->getRootWindow(); _root = _info->getRootWindow();
_config->getBoolValue(Config::stackedCycling, _stacked_cycling); _config->getValue(Config::stackedCycling, _stacked_cycling);
// find a window manager supporting NETWM, waiting for it to load if we must // find a window manager supporting NETWM, waiting for it to load if we must
int count = 20; // try for 20 seconds int count = 20; // try for 20 seconds
@ -672,7 +672,7 @@ void screen::changeWorkspaceVert(const int num) const {
int active_desktop = (signed)_active_desktop; int active_desktop = (signed)_active_desktop;
int wnum = 0; int wnum = 0;
_config->getNumberValue(Config::workspaceColumns, width); _config->getValue(Config::workspaceColumns, width);
if (width > num_desktops || width <= 0) if (width > num_desktops || width <= 0)
return; return;
@ -704,7 +704,7 @@ void screen::changeWorkspaceHorz(const int num) const {
int active_desktop = (signed)_active_desktop; int active_desktop = (signed)_active_desktop;
int wnum = 0; int wnum = 0;
_config->getNumberValue(Config::workspaceColumns, width); _config->getValue(Config::workspaceColumns, width);
if (width > num_desktops || width <= 0) if (width > num_desktops || width <= 0)
return; return;