26 #ifndef CASADI_SERIALIZER_HPP
27 #define CASADI_SERIALIZER_HPP
32 #include <unordered_map>
44 class DeserializerBase;
62 void pack(
const casadi_int& e);
63 void pack(
const double& e);
64 void pack(
const std::string& e);
65 void pack(
const std::vector<Sparsity>& e);
66 void pack(
const std::vector<MX>& e);
69 void pack(
const std::vector<Linsol>& e);
70 void pack(
const std::vector<Function>& e);
71 void pack(
const std::vector<GenericType>& e);
72 void pack(
const std::vector<casadi_int>& e);
73 void pack(
const std::vector<double>& e);
74 void pack(
const std::vector<std::string>& e);
std::vector< casadi_int > blind_unpack_int_vector()
std::vector< Linsol > unpack_linsol_vector()
Matrix< SXElem > blind_unpack_sx()
std::unique_ptr< DeserializingStream > deserializer_
std::string blind_unpack_string()
std::string unpack_string()
DeserializingStream & deserializer()
std::vector< Function > unpack_function_vector()
Matrix< double > unpack_dm()
std::vector< casadi_int > unpack_int_vector()
casadi_int blind_unpack_int()
Sparsity unpack_sparsity()
std::unique_ptr< std::istream > dstream_
std::vector< MX > blind_unpack_mx_vector()
std::vector< Linsol > blind_unpack_linsol_vector()
std::vector< Matrix< SXElem > > unpack_sx_vector()
std::vector< Matrix< double > > unpack_dm_vector()
std::vector< double > blind_unpack_double_vector()
std::vector< MX > unpack_mx_vector()
GenericType unpack_generictype()
Matrix< SXElem > unpack_sx()
Linsol blind_unpack_linsol()
std::vector< double > unpack_double_vector()
std::vector< std::string > blind_unpack_string_vector()
std::vector< Sparsity > unpack_sparsity_vector()
std::vector< GenericType > unpack_generictype_vector()
std::vector< GenericType > blind_unpack_generictype_vector()
Function blind_unpack_function()
void connect(SerializerBase &s)
GenericType blind_unpack_generictype()
Sparsity blind_unpack_sparsity()
std::vector< Matrix< SXElem > > blind_unpack_sx_vector()
SerializerBase::SerializationType pop_type()
std::vector< Function > blind_unpack_function_vector()
Function unpack_function()
Matrix< double > blind_unpack_dm()
std::vector< std::string > unpack_string_vector()
double blind_unpack_double()
std::vector< Sparsity > blind_unpack_sparsity_vector()
std::vector< Matrix< double > > blind_unpack_dm_vector()
Helper class for Serialization.
FileDeserializer(const std::string &fname)
Advanced deserialization of CasADi objects.
FileSerializer(const std::string &fname, const Dict &opts=Dict())
Advanced serialization of CasADi objects.
Generic data type, can hold different types such as bool, casadi_int, std::string etc.
Sparse matrix class. SX and DM are specializations.
void pack(const std::vector< double > &e)
void connect(DeserializerBase &s)
void pack(const std::string &e)
void pack(const std::vector< Matrix< double > > &e)
void pack(const std::vector< casadi_int > &e)
std::unique_ptr< SerializingStream > serializer_
void pack(const std::vector< std::string > &e)
void pack(const Sparsity &e)
void pack(const Function &e)
std::unique_ptr< std::ostream > sstream_
void pack(const std::vector< Function > &e)
SerializingStream & serializer()
void pack(const std::vector< MX > &e)
@ SERIALIZED_FUNCTION_VECTOR
@ SERIALIZED_STRING_VECTOR
@ SERIALIZED_LINSOL_VECTOR
@ SERIALIZED_GENERICTYPE_VECTOR
@ SERIALIZED_DOUBLE_VECTOR
@ SERIALIZED_SPARSITY_VECTOR
void pack(const std::vector< GenericType > &e)
void pack(const std::vector< Linsol > &e)
void pack(const Matrix< SXElem > &e)
void pack(const std::vector< Matrix< SXElem > > &e)
void pack(const Matrix< double > &e)
void pack(const GenericType &e)
void pack(const std::vector< Sparsity > &e)
void pack(const casadi_int &e)
void pack(const Linsol &e)
static std::string type_to_string(SerializationType type)
void pack(const double &e)
Helper class for Serialization.
StringDeserializer(const std::string &string)
Advanced deserialization of CasADi objects.
void decode(const std::string &string)
Sets the string to deserialize objects from.
std::string encode()
Returns a string that holds the serialized objects.
StringSerializer(const Dict &opts=Dict())
Advanced serialization of CasADi objects.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.