232 void DoDump(
const T&
object, YAML::Emitter& ss, std::optional<YAML::EMITTER_MANIP> formatEntries = {})
238 if constexpr (std::is_same_v<T, i8> || std::is_same_v<T, u8>)
244 if (
object.has_value()) {
245 DoDump(
object.value(), ss);
252 ss << YAML::BeginSeq;
256 if constexpr (std::is_same_v<T, std::vector<bool>>) {
257 for (
bool element :
object) {
258 if (formatEntries.has_value()) {
259 ss << formatEntries.value();
265 for (
const auto& element :
object) {
266 if (formatEntries.has_value()) {
267 ss << formatEntries.value();
275 ss << YAML::BeginMap;
276 for (
const auto& [key, value] :
object) {
277 if (formatEntries.has_value()) {
278 ss << formatEntries.value();
280 if constexpr (
IsOptional<std::remove_cv_t<std::remove_reference_t<
decltype(value)>>>) {
281 if (value.has_value()) {
282 ss << YAML::Key << key;
286 ss << YAML::Key << key;
294 constexpr auto nProperties = std::tuple_size<
decltype(T::Properties)>::value;
296 ss << fmtTag.value();
300 auto&
property = std::get<0>(T::Properties);
301 auto& value =
property.Get(
object);
302 auto format =
property.Format();
303 if (format.has_value()) {
304 ss << format.value();
306 DoDump(value, ss, property.FormatEntries());
309 ss << YAML::BeginMap;
310 ForEach(std::make_integer_sequence<std::size_t, nProperties>{}, [&](
auto index) {
311 auto&
property = std::get<index>(T::Properties);
312 auto& value =
property.Get(
object);
313 auto format =
property.Format();
314 if constexpr (
IsOptional<std::remove_cv_t<std::remove_reference_t<
decltype(value)>>>) {
315 if (value.has_value()) {
316 ss << YAML::Key << std::string{
property.Key()};
320 ss << YAML::Key << std::string{
property.Key()};
322 if (format.has_value()) {
323 ss << format.value();
326 DoDump(value, ss, property.FormatEntries());