Main MRPT website > C++ reference for MRPT 1.9.9
Classes | Namespaces | Macros | Functions
CStream.h File Reference
#include <mrpt/utils/core_defs.h>
#include <mrpt/utils/types_simple.h>
#include <mrpt/utils/exceptions.h>
#include <mrpt/utils/bits.h>
#include <mrpt/utils/CSerializable.h>
#include <mrpt/utils/variant.h>
#include <mrpt/otherlibs/mapbox/variant.hpp>
#include <vector>
#include <type_traits>

Go to the source code of this file.

Classes

class  mrpt::utils::CStream
 This base class is used to provide a unified interface to files,memory buffers,..Please see the derived classes. More...
 

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 
 mrpt::utils
 Classes for serialization, sockets, ini-file manipulation, streams, list of properties-values, timewatch, extensions to STL.
 

Macros

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

Functions

CStreammrpt::utils::operator<< (mrpt::utils::CStream &s, const char *a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &s, const std::string &str)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &, const vector_int &a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &, const vector_uint &a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &, const vector_word &a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &, const vector_signed_word &a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &, const vector_long &a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &, const vector_byte &a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &, const vector_signed_byte &a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &, const vector_bool &a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &, const std::vector< std::string > &)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &, const std::vector< size_t > &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, char *a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, std::string &str)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, vector_int &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, vector_uint &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, vector_word &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, vector_signed_word &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, vector_long &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, vector_byte &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, vector_signed_byte &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, vector_bool &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, std::vector< std::string > &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &s, std::vector< float > &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &s, std::vector< double > &a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &s, const std::vector< float > &a)
 
CStreammrpt::utils::operator<< (mrpt::utils::CStream &s, const std::vector< double > &a)
 
CStreammrpt::utils::operator>> (mrpt::utils::CStream &s, std::vector< size_t > &a)
 
template<typename T , std::enable_if_t< std::is_base_of< mrpt::utils::CSerializable, T >::value > * = nullptr>
mrpt::utils::CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, typename std::shared_ptr< T > &pObj)
 
template<typename... T>
mrpt::utils::CStreammrpt::utils::operator>> (mrpt::utils::CStream &in, typename mrpt::utils::variant< T... > &pObj)
 
template<typename... T>
mrpt::utils::CStreammrpt::utils::operator<< (mrpt::utils::CStream &out, const typename mrpt::utils::variant< T... > &pObj)
 

Macro Definition Documentation

◆ DECLARE_CSTREAM_READ_WRITE_SIMPLE_TYPE

#define DECLARE_CSTREAM_READ_WRITE_SIMPLE_TYPE (   T)
Value:
CStream& operator<<(mrpt::utils::CStream& out, const T a); \
mrpt::utils::CStream & operator>>(mrpt::utils::CStream &in, typename mrpt::utils::variant< T... > &pObj)
Definition: CStream.h:522
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:41
std::ostream & operator<<(std::ostream &out, MD5 md5)
Definition: md5.cpp:423
GLuint in
Definition: glext.h:7274
GLubyte GLubyte GLubyte a
Definition: glext.h:6279

Definition at line 433 of file CStream.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)
int val
Definition: mrpt_jpeglib.h:955
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:355

Definition at line 453 of file CStream.h.

Referenced by mrpt::obs::CObservationGPS::readFromStream().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019