31 #include <SimoxUtility/algorithm/string/string_tools.h>
39 std::string description,
43 std::string casesensitivity,
44 std::string requirement,
46 std::vector<std::string>
values,
52 output = simox::alg::replace_first(output,
"%description%",
formatDescription(description));
54 output = simox::alg::replace_first(output,
"%default%",
formatDefault(default_));
55 output = simox::alg::replace_first(
57 output = simox::alg::replace_first(output,
"%required%",
formatRequirement(requirement));
58 output = simox::alg::replace_first(output,
"%regex%",
formatRegex(regex));
68 return std::string(
"<property name=\"%name%\">\n") +
" %description%" +
69 " <attributes>\n" +
"%default%" +
"%bounds%" +
"%casesensitive%" +
"%required%" +
70 "%regex%" +
"%values%" +
"%value%" +
" </attributes>\n" +
"</property>\n";
82 return "<description>" +
Encode(description) +
"</description>\n";
123 std::string valueStrings;
125 if (mapValues.size() > 0)
127 valueStrings +=
" <values>\n";
129 std::vector<std::string>::iterator it = mapValues.begin();
131 while (it != mapValues.end())
141 valueStrings +=
" </values>\n";
155 return " <value>" +
value +
"</value>\n";
161 if (!details.empty())
163 return " <attribute name=\"" +
getPrefix() + name +
"\">" + details +
167 return std::string();
173 return "<!-- " + headerText +
" -->\n\n";