proxsuite 0.6.7
The Advanced Proximal Optimization Toolbox
Loading...
Searching...
No Matches
proxsuite::serialization Namespace Reference

Functions

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 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 loadFromJSON (T &object, const std::string &filename)
 Loads an object from a JSON file.
 
template<typename T >
void saveToJSON (const T &object, const std::string &filename)
 Saves an object inside a JSON file.
 
template<typename T >
void loadFromXML (T &object, const std::string &filename)
 Loads an object from a XML file.
 
template<typename T >
void saveToXML (const T &object, const std::string &filename)
 Saves an object inside a XML file.
 

Function Documentation

◆ loadFromStringStream()

template<typename T >
void proxsuite::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.

Definition at line 33 of file archive.hpp.

◆ saveToStringStream()

template<typename T >
void proxsuite::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.

Definition at line 50 of file archive.hpp.

◆ loadFromString()

template<typename T >
void proxsuite::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.

Definition at line 66 of file archive.hpp.

◆ saveToString()

template<typename T >
std::string proxsuite::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.

Definition at line 83 of file archive.hpp.

◆ loadFromBinary()

template<typename T >
void proxsuite::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.

Definition at line 100 of file archive.hpp.

◆ saveToBinary()

template<typename T >
void proxsuite::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.

Definition at line 123 of file archive.hpp.

◆ loadFromJSON()

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

Loads an object from a JSON 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.

Definition at line 146 of file archive.hpp.

◆ saveToJSON()

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

Saves an object inside a JSON 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.

Definition at line 169 of file archive.hpp.

◆ loadFromXML()

template<typename T >
void proxsuite::serialization::loadFromXML ( T & object,
const std::string & filename )
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.

Definition at line 192 of file archive.hpp.

◆ saveToXML()

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

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.

Definition at line 215 of file archive.hpp.