Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Namespaces | Macros | Functions
CArchive.h File Reference
#include <cstdint>
#include <mrpt/config.h>
#include <mrpt/core/is_shared_ptr.h>
#include <mrpt/core/reverse_bytes.h>
#include <mrpt/serialization/CSerializable.h>
#include <vector>
#include <string>
#include <type_traits>
#include <stdexcept>
#include <mrpt/typemeta/TTypeName.h>
#include <variant>
Include dependency graph for CArchive.h:

Go to the source code of this file.

Classes

class  mrpt::serialization::CExceptionEOF
 Used in mrpt::serialization::CArchive. More...
 
class  mrpt::serialization::CArchive
 Virtual base class for "archives": classes abstracting I/O streams. More...
 
class  mrpt::serialization::CArchiveStreamBase< STREAM >
 CArchive for mrpt::io::CStream classes (use as template argument). More...
 

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 
 mrpt::serialization
 

Macros

#define DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE(T)
 
#define MRPT_READ_POD(_STREAM, _VARIABLE)
 

Functions

 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (bool)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (uint8_t)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (int8_t)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (uint16_t)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (int16_t)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (uint32_t)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (int32_t)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (uint64_t)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (int64_t)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (float)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (double)
 
 mrpt::serialization::DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (long double)
 
CArchive & mrpt::serialization::operator<< (CArchive &s, const char *a)
 
CArchivemrpt::serialization::operator<< (CArchive &s, const std::string &str)
 
CArchivemrpt::serialization::operator<< (CArchive &, const std::vector< int32_t > &a)
 
CArchivemrpt::serialization::operator<< (CArchive &, const std::vector< uint32_t > &a)
 
CArchivemrpt::serialization::operator<< (CArchive &, const std::vector< uint16_t > &a)
 
CArchivemrpt::serialization::operator<< (CArchive &, const std::vector< int16_t > &a)
 
CArchivemrpt::serialization::operator<< (CArchive &, const std::vector< int64_t > &a)
 
CArchivemrpt::serialization::operator<< (CArchive &, const std::vector< uint8_t > &a)
 
CArchivemrpt::serialization::operator<< (CArchive &, const std::vector< int8_t > &a)
 
CArchivemrpt::serialization::operator<< (CArchive &, const std::vector< bool > &a)
 
CArchivemrpt::serialization::operator<< (CArchive &, const std::vector< std::string > &)
 
CArchivemrpt::serialization::operator<< (CArchive &, const std::vector< size_t > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &in, char *a)
 
CArchivemrpt::serialization::operator>> (CArchive &in, std::string &str)
 
CArchivemrpt::serialization::operator>> (CArchive &in, std::vector< int32_t > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &in, std::vector< uint32_t > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &in, std::vector< uint16_t > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &in, std::vector< int16_t > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &in, std::vector< int64_t > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &in, std::vector< uint8_t > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &in, std::vector< int8_t > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &in, std::vector< bool > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &in, std::vector< std::string > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &s, std::vector< float > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &s, std::vector< double > &a)
 
CArchivemrpt::serialization::operator<< (CArchive &s, const std::vector< float > &a)
 
CArchivemrpt::serialization::operator<< (CArchive &s, const std::vector< double > &a)
 
CArchivemrpt::serialization::operator>> (CArchive &s, std::vector< size_t > &a)
 
template<typename T , std::enable_if_t< std::is_base_of< mrpt::serialization::CSerializable, T >::value > * = nullptr>
CArchive & mrpt::serialization::operator>> (CArchive &in, std::shared_ptr< T > &pObj)
 Read a smart pointer to a non-CSerializable (POD,...) data type. More...
 
template<typename... T>
CArchive & mrpt::serialization::operator>> (CArchive &in, typename std::variant< T... > &pObj)
 
template<typename... T>
CArchive & mrpt::serialization::operator<< (CArchive &out, const typename std::variant< T... > &pObj)
 
template<class T , std::enable_if_t<!std::is_base_of< mrpt::serialization::CSerializable, T >::value > * = nullptr>
CArchive & mrpt::serialization::operator<< (CArchive &out, const std::shared_ptr< T > &pObj)
 Write a shared_ptr to a non-CSerializable object. More...
 
template<class STREAM >
CArchiveStreamBase< STREAM > mrpt::serialization::archiveFrom (STREAM &s)
 Helper function to create a templatized wrapper CArchive object for a: MRPT's CStream, std::istream, std::ostream, std::stringstream More...
 

Macro Definition Documentation

◆ DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE

#define DECLARE_CArchive_READ_WRITE_SIMPLE_TYPE (   T)
Value:
CArchive& operator<<(CArchive& out, const T a); \
CArchive& operator>>(CArchive& in, T& a)

Definition at line 399 of file CArchive.h.

◆ MRPT_READ_POD

#define MRPT_READ_POD (   _STREAM,
  _VARIABLE 
)
Value:
do \
{ \
const std::remove_cv_t<std::remove_reference_t<decltype(_VARIABLE)>> \
val = _STREAM.ReadPOD<std::remove_cv_t< \
std::remove_reference_t<decltype(_VARIABLE)>>>(); \
::memcpy(&_VARIABLE, &val, sizeof(val)); \
} while (0)

Definition at line 417 of file CArchive.h.

mrpt::serialization::operator<<
CArchive & operator<<(CArchive &out, const std::shared_ptr< T > &pObj)
Write a shared_ptr to a non-CSerializable object.
Definition: CArchive.h:506
val
int val
Definition: mrpt_jpeglib.h:955
operator>>
CArchive & operator>>(CArchive &a, Foo &f)
Definition: stl_serialize_unittest.cpp:77
in
GLuint in
Definition: glext.h:7274
a
GLubyte GLubyte GLubyte a
Definition: glext.h:6279
mrpt::system::os::memcpy
void memcpy(void *dest, size_t destSize, const void *src, size_t copyCount) noexcept
An OS and compiler independent version of "memcpy".
Definition: os.cpp:356



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST