5 #include <SimoxUtility/algorithm/string/string_tools.h>
11 std::vector<aron::data::DictPtr>
14 std::vector<aron::data::DictPtr> result;
17 result.push_back(instance.
data());
34 template <
class DataT>
35 static std::string makeLine(
int depth,
const DataT&
data, std::optional<size_t> size = std::nullopt)
47 ss << simox::alg::capitalize_words(DataT::getLevelName());
48 ss <<
" '" << simox::alg::capitalize_words(
data.getKeyString()) <<
"'";
51 ss <<
" (size " << size.value() <<
")";
58 template <
class DataT>
59 static std::string _print(
const DataT&
data,
int maxDepth,
int depth)
62 ss << makeLine(depth,
data,
data.size());
63 if (maxDepth < 0 || maxDepth > 0)
65 data.forEachChild([&ss, maxDepth, depth](
const auto& instance)
75 return _print(
data, maxDepth, depth);
79 return _print(
data, maxDepth, depth);
83 return _print(
data, maxDepth, depth);
87 return _print(
data, maxDepth, depth);
91 return _print(
data, maxDepth, depth);
98 ss << makeLine(depth,
data);