44 std::vector<std::vector<float> >
parseVVF(
const std::string& input, std::string& error_return)
46 std::vector<std::vector<float> > result;
48 std::stringstream input_ss(input);
50 std::vector<float> current_vector;
51 while (!!input_ss && !input_ss.eof())
53 switch (input_ss.peek())
61 error_return =
"Array depth greater than 2";
65 current_vector.clear();
71 error_return =
"More close ] than open [";
77 result.push_back(current_vector);
88 std::stringstream err_ss;
89 err_ss <<
"Numbers at depth other than 2. Char was '" << char(input_ss.peek()) <<
"'.";
90 error_return = err_ss.str();
97 current_vector.push_back(value);
105 error_return =
"Unterminated vector string.";