1 ## 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/tuple.hpp>
7 #include <cereal/types/vector.hpp>
8 #include "config.h"
9 % for iface in interfaces:
10 #include <${iface.header()}>
11 % endfor
12 
13 % for iface in interfaces:
14 <% properties = interface_composite.names(str(iface)) %>\
15 CEREAL_CLASS_VERSION(${iface.namespace()}, CLASS_VERSION);
16 % endfor
17 
18 namespace cereal
19 {
20 
21 % for iface in interfaces:
22 <% properties = interface_composite.names(str(iface)) %>\
23 template<class Archive>
24 void save(Archive& a,
25           const ${iface.namespace()}& object,
26           const std::uint32_t version)
27 {
28 <%
29     props = ["object." + p.camelCase + "()" for p in properties]
30     props = ', '.join(props)
31 %>\
32     a(${props});
33 }
34 
35 
36 template<class Archive>
37 void load(Archive& a,
38           ${iface.namespace()}& object,
39           const std::uint32_t version)
40 {
41 % for p in properties:
42 <% t = "object." + p.camelCase + "()" %>\
43     decltype(${t}) ${p.CamelCase}{};
44 % endfor
45 <%
46     props = ', '.join([p.CamelCase for p in properties])
47 %>\
48     a(${props});
49 % for p in properties:
50 <% t = "object." + p.camelCase + "(" + p.CamelCase + ")" %>\
51     ${t};
52 % endfor
53 }
54 
55 % endfor
56 } // namespace cereal
57