60 "[CMemoryStream::resize] Cannot change memory block size since it " 61 "was set with 'assign'")
87 size_t nToRead = (size_t)
min(((
long)Count), maxAvail);
103 if (requiredSize >=
m_size)
206 if (fd->do_free)
delete fd->
buf;
TSeekOrigin
Used in CStream::Seek.
void set(const T *p)
This method can change the pointer, since the change is made explicitly, not through copy operators t...
bool loadBufferFromFile(const std::string &file_name)
Loads the entire buffer from a file *.
#define THROW_EXCEPTION(msg)
void free_fn_for_zmq(void *data, void *hint)
Used in mrpt_send_to_zmq().
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.
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...
This CStream derived class allow using a file as a write-only, binary stream.
GLsizei const GLchar ** string
uint64_t m_alloc_block_size
unsigned __int64 uint64_t
size_t Write(const void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for writing to the stream.
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.
void memcpy(void *dest, size_t destSize, const void *src, size_t copyCount) noexcept
An OS and compiler independent version of "memcpy".
virtual ~CMemoryStream()
Destructor.