codac 2.0.0
Loading...
Searching...
No Matches
codac2_serialization.h File Reference
#include <fstream>
#include "codac2_Vector.h"
#include "codac2_SampledTraj.h"
Include dependency graph for codac2_serialization.h:

Go to the source code of this file.

Namespaces

namespace  codac2
 

Functions

template<typename T>
requires (std::is_trivially_copyable_v<T>)
void codac2::serialize (std::ostream &f, const T &x)
 Writes the binary representation of a trivially copyable object to the given output stream.
 
template<typename T>
requires (std::is_trivially_copyable_v<T>)
void codac2::deserialize (std::istream &f, T &x)
 Reads the binary representation of a trivially copyable object from the given input stream.
 
void codac2::serialize (std::ostream &f, const Interval &x)
 Writes the binary representation of an Interval object to the given output stream.
 
void codac2::deserialize (std::istream &f, Interval &x)
 Creates an Interval object from the binary representation given in an input stream.
 
template<typename T, int R = -1, int C = -1>
void codac2::serialize (std::ostream &f, const Eigen::Matrix< T, R, C > &x)
 Writes the binary representation of an Eigen::Matrix to the given output stream. The structure can be a matrix, a row, a vector, with double or Interval components.
 
template<typename T, int R = -1, int C = -1>
void codac2::deserialize (std::istream &f, Eigen::Matrix< T, R, C > &x)
 Reads the binary representation of an Eigen::Matrix from the given input stream. The structure can be a matrix, a row, a vector, with double or Interval components.
 
template<typename T>
void codac2::serialize (std::ostream &f, const SampledTraj< T > &x)
 Writes the binary representation of a SampledTraj object to the given output stream.
 
template<typename T>
void codac2::deserialize (std::istream &f, SampledTraj< T > &x)
 Reads the binary representation of a SampledTraj object from the given input stream.
 

Detailed Description

Date
2024
Author
Simon Rohou
License: GNU Lesser General Public License (LGPL)