31 #include <SimoxUtility/algorithm/string/string_tools.h>
37 std::string description,
41 std::string casesensitivity,
42 std::string requirement,
44 std::vector<std::string>
values,
50 output = simox::alg::replace_first(output,
"%description%",
formatDescription(description));
52 output = simox::alg::replace_first(output,
"%default%",
formatDefault(default_));
53 output = simox::alg::replace_first(
55 output = simox::alg::replace_first(output,
"%required%",
formatRequirement(requirement));
56 output = simox::alg::replace_first(output,
"%regex%",
formatRegex(regex));
65 return std::string(
"%name%:") +
" %description%\n" +
" Attributes:\n" +
"%default%" +
66 "%bounds%" +
"%casesensitive%" +
"%required%" +
"%regex%" +
"%values%";
86 if (!
min.empty() &&
max.empty())
90 else if (
min.empty() && !
max.empty())
94 else if (!
min.empty() && !
max.empty())
129 std::string valueStrings;
131 if (mapValues.size() > 0)
133 valueStrings +=
" - Possible values: ";
135 std::vector<std::string>::iterator it = mapValues.begin();
137 while (it != mapValues.end())
146 valueStrings += (it != mapValues.end() ?
", " :
"\n");
162 if (!details.empty())
164 std::stringstream strStream;
165 strStream << std::setfill(
' ') << std::left << std::setw(20) << name;
166 strStream << details;
168 return " - " + strStream.str() +
"\n";
171 return std::string();
177 return "==================================================================\n" + headerText +
178 "\n" +
"==================================================================\n\n";