}
}
-int RGWHTTPArgs::get_bool(const string& name, bool *val, bool *exists)
+int RGWHTTPArgs::get_bool(const string& name, bool *val, bool *exists) const
{
- map<string, string>::iterator iter;
+ map<string, string>::const_iterator iter;
iter = val_map.find(name);
bool e = (iter != val_map.end());
if (exists)
return 0;
}
-int RGWHTTPArgs::get_bool(const char *name, bool *val, bool *exists)
+int RGWHTTPArgs::get_bool(const char *name, bool *val, bool *exists) const
{
string s(name);
return get_bool(s, val, exists);
}
-void RGWHTTPArgs::get_bool(const char *name, bool *val, bool def_val)
+void RGWHTTPArgs::get_bool(const char *name, bool *val, bool def_val) const
{
bool exists = false;
if ((get_bool(name, val, &exists) < 0) ||
}
}
-int RGWHTTPArgs::get_int(const char *name, int *val, int def_val)
+int RGWHTTPArgs::get_int(const char *name, int *val, int def_val) const
{
bool exists = false;
string val_str;
const std::string& get(const std::string& name, bool *exists = NULL) const;
boost::optional<const std::string&>
get_optional(const std::string& name) const;
- int get_bool(const std::string& name, bool *val, bool *exists);
- int get_bool(const char *name, bool *val, bool *exists);
- void get_bool(const char *name, bool *val, bool def_val);
- int get_int(const char *name, int *val, int def_val);
+ int get_bool(const std::string& name, bool *val, bool *exists) const;
+ int get_bool(const char *name, bool *val, bool *exists) const;
+ void get_bool(const char *name, bool *val, bool def_val) const;
+ int get_int(const char *name, int *val, int def_val) const;
/** Get the value for specific system argument parameter */
std::string sys_get(const std::string& name, bool *exists = nullptr) const;