Serial.cpp
Go to the documentation of this file.
1 // (C) Copyright Renaud Detry 2007-2015.
2 // Distributed under the GNU General Public License and under the
3 // BSD 3-Clause License (See accompanying file LICENSE.txt).
4 
5 /** @file */
6 
7 #include <nuklei/Serial.h>
8 #include <nuklei/Types.h>
11 #include <type_traits>
12 
13 // Cereal signature:
14 // void serialize(Archive & ar, std::uint32_t const version)
15 // Boost Serialization signature:
16 // void serialize(Archive &ar, const unsigned int version)
17 // As long as this assertion holds, Boost Serialization and Cereal can easily
18 // coexist.
19 static_assert(std::is_same<std::uint32_t, unsigned int>::value, "Serialization may be compromised");
20 
21 namespace nuklei
22 {
23 
24  const std::string Serial::TypeNames[] =
25  { "bxml", "bxmlc",
26  "bbin", "bbinc" };
27 
28  // Template instantiations
29 
30  template
31  void Serial::readObject
32  <KernelCollection>(KernelCollection &object,
33  const std::string& filename,
34  const std::string& typeName);
35 
36  template
37  void Serial::writeObject
38  <KernelCollection>(const KernelCollection &object, const std::string& filename,
39  const std::string &typeName,
40  const int precision);
41 
42  template
43  void Serial::readObject
44  <kernel::se3>(kernel::se3 &object,
45  const std::string& filename,
46  const std::string& typeName);
47 
48  template
49  void Serial::writeObject
50  <kernel::se3>(const kernel::se3 &object, const std::string& filename,
51  const std::string &typeName,
52  const int precision);
53 
54  template
55  void Serial::readObject
56  <RGBColor>(RGBColor &object,
57  const std::string& filename,
58  const std::string& typeName);
59 
60  template
61  void Serial::writeObject
62  <RGBColor>(const RGBColor &object, const std::string& filename,
63  const std::string &typeName,
64  const int precision);
65 
66 
67 }
Public namespace.
Definition: Color.cpp:9
© Copyright 2007-2013 Renaud Detry.
Distributed under the terms of the GNU General Public License (GPL).
(See accompanying file LICENSE.txt or copy at http://www.gnu.org/copyleft/gpl.html.)
Revised Sun Sep 13 2020 19:10:06.