coal/serialization/serializer.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2024 INRIA
3 //
4 
5 #ifndef COAL_SERIALIZATION_SERIALIZER_H
6 #define COAL_SERIALIZATION_SERIALIZER_H
7 
9 
10 namespace coal {
11 namespace serialization {
12 
13 struct Serializer {
15  template <typename T>
16  static void loadFromText(T& object, const std::string& filename) {
18  }
19 
21  template <typename T>
22  static void saveToText(const T& object, const std::string& filename) {
24  }
25 
27  template <typename T>
28  static void loadFromStringStream(T& object, std::istringstream& is) {
30  }
31 
33  template <typename T>
34  static void saveToStringStream(const T& object, std::stringstream& ss) {
36  }
37 
39  template <typename T>
40  static void loadFromString(T& object, const std::string& str) {
42  }
43 
45  template <typename T>
46  static std::string saveToString(const T& object) {
48  }
49 
51  template <typename T>
52  static void loadFromXML(T& object, const std::string& filename,
53  const std::string& tag_name) {
55  }
56 
58  template <typename T>
59  static void saveToXML(const T& object, const std::string& filename,
60  const std::string& tag_name) {
61  ::coal::serialization::saveToXML(object, filename, tag_name);
62  }
63 
65  template <typename T>
66  static void loadFromBinary(T& object, const std::string& filename) {
68  }
69 
71  template <typename T>
72  static void saveToBinary(const T& object, const std::string& filename) {
74  }
75 
77  template <typename T>
78  static void loadFromBuffer(T& object, boost::asio::streambuf& container) {
79  ::coal::serialization::loadFromBuffer(object, container);
80  }
81 
83  template <typename T>
84  static void saveToBuffer(const T& object, boost::asio::streambuf& container) {
85  ::coal::serialization::saveToBuffer(object, container);
86  }
87 };
88 
89 } // namespace serialization
90 } // namespace coal
91 
92 #endif // ifndef COAL_SERIALIZATION_SERIALIZER_H
coal::serialization::loadFromBinary
void loadFromBinary(T &object, const std::string &filename)
Loads an object from a binary file.
Definition: coal/serialization/archive.h:228
coal::serialization::loadFromString
void loadFromString(T &object, const std::string &str)
Loads an object from a std::string.
Definition: coal/serialization/archive.h:141
coal::serialization::Serializer::saveToStringStream
static void saveToStringStream(const T &object, std::stringstream &ss)
Saves an object to a string stream.
Definition: coal/serialization/serializer.h:34
coal
Main namespace.
Definition: coal/broadphase/broadphase_bruteforce.h:44
coal::serialization::Serializer::loadFromStringStream
static void loadFromStringStream(T &object, std::istringstream &is)
Loads an object from a stream string.
Definition: coal/serialization/serializer.h:28
coal::serialization::Serializer::saveToXML
static void saveToXML(const T &object, const std::string &filename, const std::string &tag_name)
Saves an object as an XML file.
Definition: coal/serialization/serializer.h:59
coal::serialization::Serializer::saveToBuffer
static void saveToBuffer(const T &object, boost::asio::streambuf &container)
Saves an object as a binary buffer.
Definition: coal/serialization/serializer.h:84
coal::serialization::Serializer::loadFromBinary
static void loadFromBinary(T &object, const std::string &filename)
Loads a Derived object from an binary file.
Definition: coal/serialization/serializer.h:66
coal::serialization::Serializer::loadFromText
static void loadFromText(T &object, const std::string &filename)
Loads an object from a text file.
Definition: coal/serialization/serializer.h:16
coal::serialization::Serializer::loadFromBuffer
static void loadFromBuffer(T &object, boost::asio::streambuf &container)
Loads an object from a binary buffer.
Definition: coal/serialization/serializer.h:78
coal::serialization::loadFromText
void loadFromText(T &object, const std::string &filename)
Loads an object from a TXT file.
Definition: coal/serialization/archive.h:63
coal::serialization::Serializer::saveToBinary
static void saveToBinary(const T &object, const std::string &filename)
Saves a Derived object as an binary file.
Definition: coal/serialization/serializer.h:72
coal::serialization::saveToXML
void saveToXML(const T &object, const std::string &filename, const std::string &tag_name)
Saves an object inside a XML file.
Definition: coal/serialization/archive.h:202
coal::serialization::Serializer::loadFromXML
static void loadFromXML(T &object, const std::string &filename, const std::string &tag_name)
Loads an object from an XML file.
Definition: coal/serialization/serializer.h:52
collision-bench.filename
filename
Definition: collision-bench.py:6
coal::serialization::Serializer
Definition: coal/serialization/serializer.h:13
archive.h
coal::serialization::Serializer::saveToText
static void saveToText(const T &object, const std::string &filename)
Saves an object as a text file.
Definition: coal/serialization/serializer.h:22
coal::serialization::saveToText
void saveToText(const T &object, const std::string &filename)
Saves an object inside a TXT file.
Definition: coal/serialization/archive.h:87
coal::serialization::saveToStringStream
void saveToStringStream(const T &object, std::stringstream &ss)
Saves an object inside a std::stringstream.
Definition: coal/serialization/archive.h:127
coal::serialization::saveToBinary
void saveToBinary(const T &object, const std::string &filename)
Saves an object inside a binary file.
Definition: coal/serialization/archive.h:249
coal::serialization::loadFromStringStream
void loadFromStringStream(T &object, std::istringstream &is)
Loads an object from a std::stringstream.
Definition: coal/serialization/archive.h:109
coal::serialization::saveToString
std::string saveToString(const T &object)
Saves an object inside a std::string.
Definition: coal/serialization/archive.h:156
str
const char * str()
Definition: doxygen_xml_parser.py:885
coal::serialization::loadFromXML
void loadFromXML(T &object, const std::string &filename, const std::string &tag_name)
Loads an object from a XML file.
Definition: coal/serialization/archive.h:172
coal::serialization::saveToBuffer
void saveToBuffer(const T &object, boost::asio::streambuf &buffer)
Saves an object to a binary buffer.
Definition: coal/serialization/archive.h:284
coal::serialization::Serializer::saveToString
static std::string saveToString(const T &object)
Saves a Derived object to a string.
Definition: coal/serialization/serializer.h:46
coal::serialization::loadFromBuffer
void loadFromBuffer(T &object, boost::asio::streambuf &buffer)
Loads an object from a binary buffer.
Definition: coal/serialization/archive.h:270
coal::serialization::Serializer::loadFromString
static void loadFromString(T &object, const std::string &str)
Loads an object from a string.
Definition: coal/serialization/serializer.h:40


hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:59