25 std::string indent(depth * 2,
' ');
26 std::string opening_string;
29 opening_string =
"./";
31 return std::string(
"\n") + indent +
"[" + opening_string + name +
"]\n";
37 std::string indent(depth * 2,
' ');
38 std::string closing_string;
41 closing_string =
"../";
43 return std::string(
"") + indent +
"[" + closing_string +
"]\n";
48 const std::string & fully_qualified_name,
51 const std::string & search_string,
54 std::stringstream oss;
56 std::string quotes =
"";
57 std::string spacing =
"";
58 std::string forward =
"";
59 std::string backdots =
"";
61 for (
int i = 0; i < depth; ++i)
68 for (
const auto & iter : params)
74 std::string value =
"INVALID";
78 std::ostringstream toss;
79 iter.second->print(toss);
84 std::ostringstream toss;
99 const auto & active = params.
get<std::vector<std::string>>(iter.first);
100 if (active.size() == 1 && active[0] ==
"__all__")
106 seenIt(fully_qualified_name, iter.first);
109 if (iter.first ==
"type")
113 const auto & active = params.
get<std::string>(iter.first);
120 oss << spacing <<
" " << std::left << std::setw(offset) << iter.first <<
" = ";
127 if (value.find(
' ') != std::string::npos)
135 if (value.size() == 0)
136 value =
"(no_default)";
137 oss << quotes << value << quotes;
138 l_offset -= value.size();
149 std::vector<std::string> elements;
155 for (
auto & element : elements)
158 oss << std::right << std::setw(l_offset) <<
"# " << elements[0];
159 for (
unsigned int i = 1; i < elements.size(); ++i)
161 <<
" " << std::setw(63) <<
"# " << elements[i];
163 const std::string group = params.
getGroupName(iter.first);
168 <<
" " << std::setw(70) <<
"# Group: " << group;
170 oss << std::right << std::setw(l_offset) <<
"# Group: " << group;
void seenIt(const std::string &prefix, const std::string &item)
bool haveSeenIt(const std::string &prefix, const std::string &item) const
void tokenize(const std::string &str, std::vector< T > &elements, unsigned int min_len=1, const std::string &delims="/")
This function will split the passed in string on a set of delimiters appending the substrings to the ...
void escape(std::string &str)
std::string trim(const std::string &str, const std::string &white_space=" \t\n\v\f\r")
Standard scripting language trim function.
bool wildCardMatch(std::string name, std::string search_string)