5 #ifndef COAL_SERIALIZATION_SERIALIZER_H
6 #define COAL_SERIALIZATION_SERIALIZER_H
11 namespace serialization {
22 static void saveToText(
const T&
object,
const std::string& filename) {
52 static void loadFromXML(T&
object,
const std::string& filename,
53 const std::string& tag_name) {
59 static void saveToXML(
const T&
object,
const std::string& filename,
60 const std::string& tag_name) {
72 static void saveToBinary(
const T&
object,
const std::string& filename) {
84 static void saveToBuffer(
const T&
object, boost::asio::streambuf& container) {
void loadFromBuffer(T &object, boost::asio::streambuf &buffer)
Loads an object from a binary buffer.
Definition: archive.h:270
void loadFromBinary(T &object, const std::string &filename)
Loads an object from a binary file.
Definition: archive.h:228
void loadFromText(T &object, const std::string &filename)
Loads an object from a TXT file.
Definition: archive.h:63
void loadFromXML(T &object, const std::string &filename, const std::string &tag_name)
Loads an object from a XML file.
Definition: archive.h:172
void loadFromString(T &object, const std::string &str)
Loads an object from a std::string.
Definition: archive.h:141
void saveToXML(const T &object, const std::string &filename, const std::string &tag_name)
Saves an object inside a XML file.
Definition: archive.h:202
void loadFromStringStream(T &object, std::istringstream &is)
Loads an object from a std::stringstream.
Definition: archive.h:109
void saveToText(const T &object, const std::string &filename)
Saves an object inside a TXT file.
Definition: archive.h:87
void saveToStringStream(const T &object, std::stringstream &ss)
Saves an object inside a std::stringstream.
Definition: archive.h:127
void saveToBinary(const T &object, const std::string &filename)
Saves an object inside a binary file.
Definition: archive.h:249
std::string saveToString(const T &object)
Saves an object inside a std::string.
Definition: archive.h:156
void saveToBuffer(const T &object, boost::asio::streambuf &buffer)
Saves an object to a binary buffer.
Definition: archive.h:284
Main namespace.
Definition: broadphase_bruteforce.h:44
Definition: serializer.h:13
static void loadFromXML(T &object, const std::string &filename, const std::string &tag_name)
Loads an object from an XML file.
Definition: serializer.h:52
static void saveToBuffer(const T &object, boost::asio::streambuf &container)
Saves an object as a binary buffer.
Definition: serializer.h:84
static void loadFromString(T &object, const std::string &str)
Loads an object from a string.
Definition: serializer.h:40
static void saveToBinary(const T &object, const std::string &filename)
Saves a Derived object as an binary file.
Definition: serializer.h:72
static void loadFromBuffer(T &object, boost::asio::streambuf &container)
Loads an object from a binary buffer.
Definition: serializer.h:78
static void saveToStringStream(const T &object, std::stringstream &ss)
Saves an object to a string stream.
Definition: serializer.h:34
static void loadFromText(T &object, const std::string &filename)
Loads an object from a text file.
Definition: serializer.h:16
static void saveToText(const T &object, const std::string &filename)
Saves an object as a text file.
Definition: serializer.h:22
static void saveToXML(const T &object, const std::string &filename, const std::string &tag_name)
Saves an object as an XML file.
Definition: serializer.h:59
static void loadFromStringStream(T &object, std::istringstream &is)
Loads an object from a stream string.
Definition: serializer.h:28
static void loadFromBinary(T &object, const std::string &filename)
Loads a Derived object from an binary file.
Definition: serializer.h:66
static std::string saveToString(const T &object)
Saves a Derived object to a string.
Definition: serializer.h:46