5 #ifndef __pinocchio_serialization_serializable_hpp__ 6 #define __pinocchio_serialization_serializable_hpp__ 8 #include "pinocchio/serialization/archive.hpp" 15 template<
class Derived>
20 Derived &
derived() {
return *
static_cast<Derived*
>(
this); }
21 const Derived &
derived()
const {
return *
static_cast<const Derived*
>(
this); }
63 const std::string & tag_name)
70 const std::string & tag_name)
const 116 #endif // ifndef __pinocchio_serialization_serializable_hpp__
void saveToBinary(const T &object, const std::string &filename)
Saves an object inside a binary file.
void saveToBinary(boost::asio::streambuf &container) const
Saves a Derived object as a binary container.
void saveToBinary(StaticBuffer &container) const
Saves a Derived object as a static binary container.
void loadFromXML(const std::string &filename, const std::string &tag_name)
Loads a Derived object from an XML file.
void loadFromXML(T &object, const std::string &filename, const std::string &tag_name)
Loads an object from a XML file.
void loadFromBinary(StaticBuffer &container)
Loads a Derived object from a static binary container.
void saveToStringStream(const T &object, std::stringstream &ss)
Saves an object inside a std::stringstream.
void loadFromBinary(boost::asio::streambuf &container)
Loads a Derived object from a binary container.
std::string saveToString(const T &object)
Saves an object inside a std::string.
void saveToText(const T &object, const std::string &filename)
Saves an object inside a TXT file.
void saveToStringStream(std::stringstream &ss) const
Saves a Derived object to a string stream.
std::string saveToString() const
Saves a Derived object to a string.
Static buffer with pre-allocated memory.
void saveToXML(const std::string &filename, const std::string &tag_name) const
Saves a Derived object as an XML file.
void loadFromText(T &object, const std::string &filename)
Loads an object from a TXT file.
void saveToBinary(const std::string &filename) const
Saves a Derived object as an binary file.
void loadFromStringStream(std::istringstream &is)
Loads a Derived object from a stream string.
void loadFromString(T &object, const std::string &str)
Loads an object from a std::string.
void loadFromStringStream(T &object, std::istringstream &is)
Loads an object from a std::stringstream.
Main pinocchio namespace.
void saveToXML(const T &object, const std::string &filename, const std::string &tag_name)
Saves an object inside a XML file.
void loadFromString(const std::string &str)
Loads a Derived object from a string.
void loadFromText(const std::string &filename)
Loads a Derived object from a text file.
void saveToText(const std::string &filename) const
Saves a Derived object as a text file.
const Derived & derived() const
void loadFromBinary(T &object, const std::string &filename)
Loads an object from a binary file.
void loadFromBinary(const std::string &filename)
Loads a Derived object from an binary file.