26 #ifndef CASADI_SERIALIZER_HPP
27 #define CASADI_SERIALIZER_HPP
32 #include <unordered_map>
44 class DeserializerBase;
56 void pack(
const MX& e);
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);
105 static std::string type_to_string(SerializationType type);
127 MX blind_unpack_mx();
128 MX blind_unpack_mx_v1();
139 std::vector<MX> blind_unpack_mx_vector();
140 std::vector<MX> blind_unpack_mx_vector_v1();
142 std::vector< Matrix<SXElem> > blind_unpack_sx_vector();
143 std::vector< Matrix<SXElem> > blind_unpack_sx_vector_v1();
162 std::vector<MX> unpack_mx_vector();
164 std::vector< Matrix<SXElem> > unpack_sx_vector();
219 std::string encode();
248 void decode(
const std::string&
string);
std::vector< casadi_int > blind_unpack_int_vector()
std::vector< Linsol > unpack_linsol_vector()
std::unique_ptr< DeserializingStream > deserializer_
std::string blind_unpack_string()
std::string unpack_string()
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< Linsol > blind_unpack_linsol_vector()
std::vector< Matrix< double > > unpack_dm_vector()
std::vector< double > blind_unpack_double_vector()
GenericType unpack_generictype()
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()
GenericType blind_unpack_generictype()
Sparsity blind_unpack_sparsity()
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.
Generic data type, can hold different types such as bool, casadi_int, std::string etc.
void pack(const std::vector< double > &e)
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)
@ SERIALIZED_FUNCTION_VECTOR
@ SERIALIZED_MX_VECTOR_v1
@ SERIALIZED_STRING_VECTOR
@ SERIALIZED_LINSOL_VECTOR
@ SERIALIZED_GENERICTYPE_VECTOR
@ SERIALIZED_SX_VECTOR_v1
@ 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)
void pack(const double &e)
Helper class for Serialization.
GenericType::Dict Dict
C++ equivalent of Python's dict or MATLAB's struct.