20 #include <boost/tokenizer.hpp>
21 #include <boost/lexical_cast.hpp>
31 _id(id), _time(time) {
38 typedef boost::tokenizer<boost::char_separator<char> > tokenizer;
39 boost::char_separator<char> sep(
"_");
40 tokenizer tokens(key_string, sep);
41 tokenizer::iterator tok_iter = tokens.begin();
42 if (*tok_iter == std::string(
"grid")) {
43 Index ind = boost::lexical_cast<
Index>(*(++tok_iter));
45 _time = boost::lexical_cast<
Time>(*(++tok_iter));
48 if (*tok_iter != std::string(
"rate"))
50 Index ind = boost::lexical_cast<
Index>(*(++tok_iter));
57 std::ostringstream str;
60 str <<
"rate_" <<
_id;
62 str <<
"grid_" << _id <<
"_" <<
_time;
std::string generateName() const