blob: f4179170fa67dca8fb70866fe6ee6cda22388e22 [file] [log] [blame]
Deepak Kodihallif7b03992017-08-04 11:25:41 -05001## This file is a template. The comment below is emitted
2## into the rendered file; feel free to edit this file.
3// This file was auto generated. Do not edit.
4
5#include <cereal/types/string.hpp>
6#include <cereal/types/vector.hpp>
7% for iface in interfaces:
8#include <${iface.header()}>
9% endfor
10
11namespace cereal
12{
13
14% for iface in interfaces:
15<% properties = interface_composite.names(str(iface)) %>\
16template<class Archive>
17void save(Archive& a,
18 const ${iface.namespace()}& object)
19{
20<%
21 props = ["object." + p[:1].lower() + p[1:] + "()" for p in properties]
22 props = ', '.join(props)
23%>\
24 a(${props});
25}
26
27
28template<class Archive>
29void load(Archive& a,
30 ${iface.namespace()}& object)
31{
32% for p in properties:
33<% t = "object." + p[:1].lower() + p[1:] + "()" %>\
34 decltype(${t}) ${p}{};
35% endfor
36<%
37 props = ', '.join(properties)
38%>\
39 a(${props});
40% for p in properties:
41<% t = "object." + p[:1].lower() + p[1:] + "(" + p + ")" %>\
42 ${t};
43% endfor
44}
45
46% endfor
47} // namespace cereal