coal 3.0.2
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
Loading...
Searching...
No Matches
coal::serialization Namespace Reference

Namespaces

namespace  detail

Classes

struct  register_type
struct  register_type< CollisionGeometry >
struct  Serializer

Functions

template<typename T>
void loadFromText (T &object, const std::string &filename)
 Loads an object from a TXT file.
template<typename T>
void saveToText (const T &object, const std::string &filename)
 Saves an object inside a TXT file.
template<typename T>
void loadFromStringStream (T &object, std::istringstream &is)
 Loads an object from a std::stringstream.
template<typename T>
void saveToStringStream (const T &object, std::stringstream &ss)
 Saves an object inside a std::stringstream.
template<typename T>
void loadFromString (T &object, const std::string &str)
 Loads an object from a std::string.
template<typename T>
std::string saveToString (const T &object)
 Saves an object inside a std::string.
template<typename T>
void loadFromXML (T &object, const std::string &filename, const std::string &tag_name)
 Loads an object from a XML file.
template<typename T>
void saveToXML (const T &object, const std::string &filename, const std::string &tag_name)
 Saves an object inside a XML file.
template<typename T>
void loadFromBinary (T &object, const std::string &filename)
 Loads an object from a binary file.
template<typename T>
void saveToBinary (const T &object, const std::string &filename)
 Saves an object inside a binary file.
template<typename T>
void loadFromBuffer (T &object, boost::asio::streambuf &buffer)
 Loads an object from a binary buffer.
template<typename T>
void saveToBuffer (const T &object, boost::asio::streambuf &buffer)
 Saves an object to a binary buffer.

Function Documentation

◆ loadFromBinary()

template<typename T>
void coal::serialization::loadFromBinary(T &object,
const std::string &filename )
inline

Loads an object from a binary file.

Template Parameters
TType of the object to deserialize.
Parameters
[out]objectObject in which the loaded data are copied.
[in]filenameName of the file containing the serialized data.

◆ loadFromBuffer()

template<typename T>
void coal::serialization::loadFromBuffer(T &object,
boost::asio::streambuf &buffer )
inline

Loads an object from a binary buffer.

Template Parameters
TType of the object to deserialize.
Parameters
[out]objectObject in which the loaded data are copied.
[in]bufferInput buffer containing the serialized data.

◆ loadFromString()

template<typename T>
void coal::serialization::loadFromString(T &object,
const std::string &str )
inline

Loads an object from a std::string.

Template Parameters
TType of the object to deserialize.
Parameters
[out]objectObject in which the loaded data are copied.
[in]strstring constaining the serialized content of the object.

◆ loadFromStringStream()

template<typename T>
void coal::serialization::loadFromStringStream(T &object,
std::istringstream &is )
inline

Loads an object from a std::stringstream.

Template Parameters
TType of the object to deserialize.
Parameters
[out]objectObject in which the loaded data are copied.
[in]isstring stream constaining the serialized content of the object.

◆ loadFromText()

template<typename T>
void coal::serialization::loadFromText(T &object,
const std::string &filename )
inline

Loads an object from a TXT file.

Template Parameters
TType of the object to deserialize.
Parameters
[out]objectObject in which the loaded data are copied.
[in]filenameName of the file containing the serialized data.

◆ loadFromXML()

template<typename T>
void coal::serialization::loadFromXML(T &object,
const std::string &filename,
const std::string &tag_name )
inline

Loads an object from a XML file.

Template Parameters
TType of the object to deserialize.
Parameters
[out]objectObject in which the loaded data are copied.
[in]filenameName of the file containing the serialized data.
[in]tag_nameXML Tag for the given object.

◆ saveToBinary()

template<typename T>
void coal::serialization::saveToBinary(const T &object,
const std::string &filename )

Saves an object inside a binary file.

Template Parameters
TType of the object to deserialize.
Parameters
[in]objectObject in which the loaded data are copied.
[in]filenameName of the file containing the serialized data.

◆ saveToBuffer()

template<typename T>
void coal::serialization::saveToBuffer(const T &object,
boost::asio::streambuf &buffer )

Saves an object to a binary buffer.

Template Parameters
TType of the object to serialize.
Parameters
[in]objectObject in which the loaded data are copied.
[out]bufferOutput buffer containing the serialized data.

◆ saveToString()

template<typename T>
std::string coal::serialization::saveToString(const T &object)
inline

Saves an object inside a std::string.

Template Parameters
TType of the object to deserialize.
Parameters
[in]objectObject in which the loaded data are copied.
Returns
a string constaining the serialized content of the object.

◆ saveToStringStream()

template<typename T>
void coal::serialization::saveToStringStream(const T &object,
std::stringstream &ss )
inline

Saves an object inside a std::stringstream.

Template Parameters
TType of the object to deserialize.
Parameters
[in]objectObject in which the loaded data are copied.
[out]ssString stream constaining the serialized content of the object.

◆ saveToText()

template<typename T>
void coal::serialization::saveToText(const T &object,
const std::string &filename )
inline

Saves an object inside a TXT file.

Template Parameters
TType of the object to deserialize.
Parameters
[in]objectObject in which the loaded data are copied.
[in]filenameName of the file containing the serialized data.

◆ saveToXML()

template<typename T>
void coal::serialization::saveToXML(const T &object,
const std::string &filename,
const std::string &tag_name )
inline

Saves an object inside a XML file.

Template Parameters
TType of the object to deserialize.
Parameters
[in]objectObject in which the loaded data are copied.
[in]filenameName of the file containing the serialized data.
[in]tag_nameXML Tag for the given object.