29 size_t Read(
void* Buffer,
size_t Count)
override;
30 size_t Write(
const void* Buffer,
size_t Count)
override;
TSeekOrigin
Used in CStream::Seek.
bool loadBufferFromFile(const std::string &file_name)
Loads the entire buffer from a file *.
void free_fn_for_zmq(void *data, void *hint)
Used in mrpt_send_to_zmq().
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
uint64_t getTotalBytesCount() const override
Returns the total size of the internal buffer.
bool saveBufferToFile(const std::string &file_name)
Saves the entire buffer to a file.
#define ASSERT_(f)
Defines an assertion mechanism.
void Clear()
Clears the memory buffer.
void * getRawBufferData()
Method for getting a pointer to the raw stored data.
This CStream derived class allow using a memory buffer as a CStream.
void assignMemoryNotOwn(const void *data, const uint64_t nBytesInData)
Initilize the data in the stream from a block of memory which is NEITHER OWNED NOR COPIED by the obje...
uint64_t Seek(int64_t Offset, CStream::TSeekOrigin Origin=sFromBeginning) override
Introduces a pure virtual method for moving to a specified position in the streamed resource...
uint64_t getPosition() const override
Method for getting the current cursor position, where 0 is the first byte and TotalBytesCount-1 the l...
GLsizei const GLchar ** string
uint64_t m_alloc_block_size
unsigned __int64 uint64_t
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void setAllocBlockSize(uint64_t alloc_block_size)
Change the size of the additional memory block that is reserved whenever the current block runs too s...
size_t Read(void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for reading from the stream.
void changeSize(uint64_t newSize)
Change size.
CMemoryStream()
Default constructor.
void_ptr_noncopy m_memory
Internal data.
size_t Write(const void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for writing to the stream.
GLsizei GLsizei GLenum GLenum const GLvoid * data
void resize(uint64_t newSize)
Resizes the internal buffer size.
bool m_read_only
If the memory block does not belong to the object.
virtual ~CMemoryStream()
Destructor.