ores.cpp.domain.json_io_header
JSON IO declarations. domain profile. Declares the streaming `operator<<` for JSON output. The implementation in the companion `.cpp` archetype uses reflect-cpp.
See the Template variable reference for the complete list of available variables and their semantics.
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.hpp.mustache.
{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/cpp_domain.org. Edit the org source. }}
{{{cpp_license}}}
{{#domain_entity}}
#ifndef ORES_{{component_include_upper}}_DOMAIN_{{entity_singular_upper}}_JSON_IO_HPP
#define ORES_{{component_include_upper}}_DOMAIN_{{entity_singular_upper}}_JSON_IO_HPP
#include <iosfwd>
#include "ores.{{component_include}}/domain/{{entity_singular}}.hpp"
#include "ores.{{component_include}}/export.hpp"
namespace ores::{{component}}::domain {
/**
* @brief Dumps the {{entity_singular}} to a stream in JSON format.
*/
ORES_{{component_include_upper}}_EXPORT std::ostream& operator<<(std::ostream& s, const {{entity_singular}}& v);
}
#endif
{{/domain_entity}}
{{#junction}}
#ifndef ORES_{{component_include_upper}}_DOMAIN_{{name_singular_upper}}_JSON_IO_HPP
#define ORES_{{component_include_upper}}_DOMAIN_{{name_singular_upper}}_JSON_IO_HPP
#include <iosfwd>
#include "ores.{{component_include}}/domain/{{name_singular}}.hpp"
#include "ores.{{component_include}}/export.hpp"
namespace ores::{{component}}::domain {
/**
* @brief Dumps the {{name_singular}} to a stream in JSON format.
*/
ORES_{{component_include_upper}}_EXPORT std::ostream& operator<<(std::ostream& s, const {{name_singular}}& v);
}
#endif
{{/junction}}
See also
- Parent facet: ores.cpp.domain
- Template variable reference