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(
"\\prop %name%: \n") +
"%description%<br />\n" +
"Attributes:\n" +
66 "%default%" +
"%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 if (it != mapValues.end())
148 valueStrings +=
", ";
167 if (!details.empty())
169 std::stringstream strStream;
170 strStream << std::setfill(
' ') <<
std::left << std::setw(20) << name;
171 strStream << details;
173 return " - " + strStream.str() +
"\n";
176 return std::string();
189 std::string docComment =
"\n";
191 std::stringstream textStream(text);
193 while (std::getline(textStream, line,
'\n'))
195 docComment +=
"" + line +
"\n";