31 #include <boost/tokenizer.hpp> 42 typedef boost::escaped_list_separator<char> SeparatorType;
43 typedef boost::tokenizer<SeparatorType> TokenizerType;
45 SeparatorType sep(
'\\',
'.');
46 TokenizerType tok(input, sep);
47 copy(tok.begin(), tok.end(), back_inserter(output));
49 for (vector<string>::const_iterator outputIt = output.begin();
50 outputIt != output.end(); ++outputIt) {
51 if (outputIt->empty()) {
52 throw invalid_argument(
"Empty component in key '" + input +
"'");
57 throw invalid_argument(
"Option key is empty");
void splitKeyAtDots(const std::string &input, std::vector< std::string > &output)
Creates a key vector structure used in the options backend from a dot-separated string.