44 database_type::const_iterator q =
m_map.find(realm);
46 if (q ==
m_map.end()) {
47 vout.
crucial(
"%s: key \'%s\' not found.\n", __func__, realm.c_str());
54 for (creator_callback_list::const_iterator p = cl.begin(); p != cl.end(); ++p) {
72 printf(
"%s: append to %s\n", __func__, subrealm.c_str());
73 printf(
"%s: realm \'%s\": callback append to %s\n", __func__, realm.c_str(), subrealm.c_str());
76 m_map[subrealm].push_back(cb);
87 std::vector<std::string> retv;
89 size_t npos = src.length();
94 size_t q = src.find(delim, p);
97 retv.push_back(src.substr(p));
101 retv.push_back(src.substr(p, q - p));
111 if (src.size() == 0)
return std::string();
113 std::string buf = src[0];
114 for (
size_t i = 1; i < src.size(); ++i) {
std::string string_concat(const std::vector< std::string > &src, const char delim= '.')
Parameters * create_parameters(const std::string &realm)
bool register_callback(const std::string &realm, const creator_callback &cb)
static ParametersFactory & Instance()
static ParametersFactory * s_instance
void crucial(const char *format,...)
std::list< creator_callback > creator_callback_list
std::vector< std::string > string_tokenize(const std::string &src, const char delim= '.')
static void CreateInstance()