17 #include "libmesh/vector_value.h" 18 #include "libmesh/point.h" 30 return "**START YAML DATA**\n";
36 return "**END YAML DATA**\n";
44 const std::string & search_string,
47 std::ostringstream oss;
48 std::string
indent(depth * 2,
' ');
50 for (
auto & iter : params)
52 std::string
name = iter.first;
54 if (params.isPrivate(iter.first) ||
name ==
"active" ||
55 (search_string !=
"" && search_string != iter.first) ||
haveSeenIt(prefix, iter.first))
61 seenIt(prefix, iter.first);
64 std::string required = params.isParamRequired(iter.first) ?
"Yes" :
"No";
67 oss <<
indent <<
" required: " << required <<
"\n";
68 oss <<
indent <<
" default: !!str ";
71 if (params.isParamValid(iter.first))
78 std::ostringstream toss;
82 std::string tmp_str = toss.str();
83 for (
auto & ch : tmp_str)
87 oss <<
"\"" << tmp_str <<
"\"";
91 else if (params.hasDefaultCoupledValue(iter.first))
92 oss << params.defaultCoupledValue(iter.first);
94 std::string doc = params.getDocString(iter.first);
98 <<
indent <<
" cpp_type: " << params.type(iter.first) <<
"\n" 99 <<
indent <<
" group_name: ";
100 std::string group_name = params.getGroupName(iter.first);
101 if (!group_name.empty())
102 oss <<
"'" << group_name <<
"'";
105 oss <<
indent <<
" doc_unit: ";
106 std::string doc_unit = params.getDocUnit(iter.first);
107 if (!doc_unit.empty())
108 oss <<
"'" << doc_unit <<
"'";
111 oss <<
indent <<
" doc_range: ";
112 std::string doc_range;
113 if (params.isRangeChecked(iter.first))
114 doc_range = params.rangeCheckedFunction(iter.first);
115 if (!doc_range.empty())
116 oss <<
"'" << doc_range <<
"'";
125 if (params.have_parameter<std::vector<MooseEnum>>(
name))
128 oss <<
indent <<
" description: |\n " <<
indent << doc << std::endl;
134 template <
typename T>
138 const std::string &
indent)
140 oss <<
indent <<
" options: " << param.getRawNames() <<
'\n';
141 const auto & docs = param.getItemDocumentation();
144 oss <<
indent <<
" option_docs:\n";
145 for (
const auto & doc : docs)
147 oss <<
indent <<
" - name: " << doc.first.name() <<
"\n";
148 oss <<
indent <<
" description: |\n";
149 oss <<
indent <<
" " << doc.second <<
"\n";
157 std::string
indent(depth * 2,
' ');
159 return indent +
" subblocks:\n";
165 std::ostringstream oss;
166 std::string
indent(depth * 2,
' ');
168 std::string docEscaped = doc;
172 oss <<
indent <<
" description: |\n" <<
indent <<
" " << docEscaped <<
"\n";
173 oss <<
indent <<
" parameters:\n";
181 return std::string();
186 std::ostringstream & output,
187 const std::iterator_traits<InputParameters::iterator>::value_type & p)
192 InputParameters::Parameter<Point> * ptr0 =
dynamic_cast<InputParameters::Parameter<Point> *
>(val);
195 InputParameters::Parameter<RealVectorValue> * ptr1 =
196 dynamic_cast<InputParameters::Parameter<RealVectorValue> *
>(val);
200 output << ptr0->get().operator()(0) <<
" " << ptr0->get().operator()(1) <<
" " 201 << ptr0->get().operator()(2);
205 output << ptr1->get().operator()(0) <<
" " << ptr1->get().operator()(1) <<
" " 206 << ptr1->get().operator()(2);
210 p.second->print(output);
std::string name(const ElemQuality q)
std::string indent(unsigned int spaces)
Create empty string for indenting.
A MultiMooseEnum object to hold "execute_on" flags.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
bool haveSeenIt(const std::string &prefix, const std::string &item) const
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
void seenIt(const std::string &prefix, const std::string &item)
void escape(std::string &str)