24 std::string& ret_string )
const {
25 std::stringstream children_stream;
27 children_map_t::const_iterator itr;
33 children_stream <<
";";
35 children_stream << itr->first <<
"{" << itr->second <<
"}";
37 ret_string = children_stream.str();
42 const std::string& child,
43 const std::string& context ) {
47 std::stringstream msg;
48 msg <<
"child [" << child <<
"] already exists";
58 const std::string& child ) {
62 std::stringstream msg;
63 msg <<
"child [" << child <<
"] not found";
74 std::string& _child ) {
81 std::stringstream msg;
83 msg <<
" - Trying to retrieve first child from children string but string appears to be empty.";
91 std::string& _child ) {
100 std::stringstream msg;
102 msg <<
" - Trying to retrieve last child from children string but string appears to be empty.";
111 const std::string& str ) {
118 if ( !
str.empty() ) {
122 std::size_t current_pos = 0;
123 while ( result.
ok() && !done ) {
126 std::size_t end_pos =
str.find(
";", current_pos );
127 std::string complete_child =
str.substr( current_pos, end_pos - current_pos );
130 std::size_t context_start = complete_child.find(
"{" );
131 std::string child = complete_child.substr( 0, context_start );
133 if ( context_start != std::string::npos ) {
135 std::size_t context_end = complete_child.find(
"}", context_start );
136 if ( context_end == std::string::npos ) {
137 std::stringstream msg;
138 msg <<
"missing matching \"}\" in child context string \"" <<
str <<
"\"";
142 context = complete_child.substr( context_start, context_end - context_start );
149 if ( end_pos == std::string::npos ) {
153 current_pos = end_pos + 1;
155 if ( current_pos >=
str.size() ) {