ores.cpp.domain.json_io_impl
Table of Contents
JSON round-trip implementation. domain profile. Implements the `operator<<` overload. It writes the row with the generated codec.
See the Template variable reference for the complete list of available variables and their semantics.
1. Template
The full template source. Edit here and re-tangle with
compass build --direct tangle_codegen_templates to regenerate
library/templates/cpp_domain_type_json_io.cpp.mustache.
{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/cpp_domain.org. Edit the org source. }}
{{{cpp_license}}}
{{#domain_entity}}
#include "ores.{{component_include}}/domain/{{entity_singular}}_json_io.hpp"
{{#has_generated_wire_codec}}
#include "ores.{{component_include}}/domain/{{entity_singular}}_codec.hpp"
{{/has_generated_wire_codec}}
#include "ores.utility/codec/json_codec.hpp"
#include <ostream>
namespace ores::{{component}}::domain {
std::ostream& operator<<(std::ostream& s, const {{entity_singular}}& v) {
s << ores::utility::codec::json::write(v);
return s;
}
}
{{/domain_entity}}
{{#junction}}
#include "ores.{{component_include}}/domain/{{name_singular}}_json_io.hpp"
{{#has_generated_wire_codec}}
#include "ores.{{component_include}}/domain/{{name_singular}}_codec.hpp"
{{/has_generated_wire_codec}}
#include "ores.utility/codec/json_codec.hpp"
#include <ostream>
namespace ores::{{component}}::domain {
std::ostream& operator<<(std::ostream& s, const {{name_singular}}& v) {
s << ores::utility::codec::json::write(v);
return s;
}
}
{{/junction}}
2. See also
- Parent facet: ores.cpp.domain
- Template variable reference