Go to the documentation of this file.
24 struct CSerializablePtr;
51 virtual size_t Read(
void *Buffer,
size_t Count) = 0;
55 virtual size_t Write(
const void *Buffer,
size_t Count) = 0;
77 size_t ReadBuffer(
void *Buffer,
size_t Count);
97 #if !MRPT_IS_BIG_ENDIAN
99 return ReadBuffer(ptr,ElementCount*
sizeof(T));
102 const size_t nread = ReadBuffer(ptr,ElementCount*
sizeof(T));
120 void WriteBuffer (
const void *Buffer,
size_t Count);
138 template <
typename T>
141 #if !MRPT_IS_BIG_ENDIAN
143 return WriteBuffer(ptr,ElementCount*
sizeof(T));
146 for (
size_t i=0;i<ElementCount;i++) (*
this) << ptr[i];
165 virtual uint64_t getTotalBytesCount() = 0;
169 virtual uint64_t getPosition() =0;
179 CSerializablePtr ReadObject();
204 template <typename T>
209 for (
size_t i=0;i<N;i++)
211 this->printf(fmt,V[i]);
212 if (i!=(N-1)) this->printf(
",");
256 bool getline(std::string &out_str);
262 #define DECLARE_CSTREAM_READ_WRITE_SIMPLE_TYPE( T ) \
263 CStream BASE_IMPEXP & operator<<(mrpt::utils::CStream&out, const T &a); \
264 CStream BASE_IMPEXP & operator>>(mrpt::utils::CStream&in, T &a);
278 #ifdef HAVE_LONG_DOUBLE
302 #if MRPT_WORD_SIZE!=32 // If it's 32 bit, size_t <=> uint32_t
327 #if MRPT_WORD_SIZE!=32 // If it's 32 bit, size_t <=> uint32_t
void WriteBufferFixEndianness(const T *ptr, size_t ElementCount)
Writes a sequence of elemental datatypes, taking care of reordering their bytes from the running arch...
std::vector< uint32_t > vector_uint
std::vector< uint16_t > vector_word
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
BASE_IMPEXP ::mrpt::utils::CStream & operator>>(mrpt::utils::CStream &in, CImagePtr &pObj)
std::vector< uint8_t > vector_byte
#define MRPT_printf_format_check(_FMT_, _VARARGS_)
void reverseBytesInPlace(T &v_in_out)
Reverse the order of the bytes of a given type (useful for transforming btw little/big endian)
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
A class that contain generic messages, that can be sent and received from a "CClientTCPSocket" object...
std::vector< int8_t > vector_signed_byte
The virtual base class which provides a unified interface for all persistent objects in MRPT.
std::vector< int16_t > vector_signed_word
std::vector< int32_t > vector_int
virtual size_t ReadBufferImmediate(void *Buffer, size_t Count)
Reads a block of bytes from the stream into Buffer, and returns the amound of bytes actually read,...
#define DECLARE_CSTREAM_READ_WRITE_SIMPLE_TYPE(T)
size_t ReadBufferFixEndianness(T *ptr, size_t ElementCount)
Reads a sequence of elemental datatypes, taking care of reordering their bytes from the MRPT stream s...
void printf_vector(const char *fmt, const std::vector< T > &V)
Prints a vector in the format [A,B,C,...] to std::cout, and the fmt string for each vector element.
TSeekOrigin
Used in CStream::Seek.
std::vector< bool > vector_bool
A type for passing a vector of bools.
CStream BASE_IMPEXP & operator<<(mrpt::utils::CStream &s, const char *a)
std::vector< int64_t > vector_long
Page generated by Doxygen 1.8.17 for MRPT 1.4.0 SVN: at Sat Jan 18 22:37:07 UTC 2020 | | |