9 #ifndef CMEMORYSTREAM_H 10 #define CMEMORYSTREAM_H 34 uint64_t
m_size, m_position, m_bytesWritten;
37 void resize(uint64_t newSize);
48 void assignMemoryNotOwn(
const void *
data,
const uint64_t nBytesInData );
54 void changeSize( uint64_t newSize );
59 uint64_t getTotalBytesCount() MRPT_OVERRIDE;
61 uint64_t getPosition() MRPT_OVERRIDE;
64 void* getRawBufferData();
67 bool saveBufferToFile( const
std::
string &file_name );
70 bool loadBufferFromFile( const
std::
string &file_name );
73 void setAllocBlockSize( uint64_t alloc_block_size )
76 m_alloc_block_size = alloc_block_size;
TSeekOrigin
Used in CStream::Seek.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
uint64_t m_alloc_block_size
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
This CStream derived class allow using a memory buffer as a CStream.
bool m_read_only
If the memory block does not belong to the object.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void_ptr_noncopy m_memory
Internal data.
void BASE_IMPEXP free_fn_for_zmq(void *data, void *hint)
Used in mrpt_send_to_zmq(). hint points to a TFreeFnDataForZMQ struct, to be freed here...