29 std::string str_spaces(
str);
30 std::replace(str_spaces.begin(), str_spaces.end(),
',',
' ');
32 std::istringstream iss(str_spaces);
33 std::for_each(std::istream_iterator<std::string>(iss), std::istream_iterator<std::string>(),
34 [&result](
auto x) { result.
append(std::stoi(x)); });
43 std::for_each(data.begin(), data.end(), [&result](
auto x) { result.append(x); });
51 auto comma_fold = [](std::string a,
int b) {
return std::move(a) +
',' + std::to_string(b); };
52 return m_data.empty() ? std::string()
53 : std::accumulate(std::next(
m_data.begin()),
m_data.end(),
54 std::to_string(
m_data[0]), comma_fold);
Supports navigation through SessionModel.
void prepend(PathElement element)
static Path fromVector(const std::vector< int > &data)
Constructs Path object from vector of integers..
static Path fromString(const std::string &str)
Constructs Path object from string containing sequence of integers ("0,0,1,3").
std::string str() const
Returns string representing path ("0,0,1,3").
container_t::iterator iterator
container_t::const_iterator const_iterator
void append(PathElement element)
materialitems.h Collection of materials to populate MaterialModel.