Exemplo n.º 1
0
std::vector<std::string>
OptionsCont::getStringVector(const std::string &name) const throw(InvalidArgument) {
    Option *o = getSecure(name);
    std::string def = o->getString();
    if (def.find(';')!=std::string::npos&&!myHaveInformedAboutDeprecatedDivider) {
        MsgHandler::getWarningInstance()->inform("Please note that using ';' as list separator is deprecated.\n From 1.0 onwards, only ',' will be accepted.");
        myHaveInformedAboutDeprecatedDivider = true;
    }
    StringTokenizer st(def, ";,", true);
    std::vector<std::string> ret = st.getVector();
    for (std::vector<std::string>::iterator i=ret.begin(); i!=ret.end(); ++i) {
        (*i) = StringUtils::prune(*i);
    }
    return ret;
}
Exemplo n.º 2
0
std::string
OptionsCont::getString(const std::string &name) const throw(InvalidArgument) {
    Option *o = getSecure(name);
    return o->getString();
}
Exemplo n.º 3
0
std::string
OptionsCont::getString(const std::string& name) const {
    Option* o = getSecure(name);
    return o->getString();
}