Go to the documentation of this file.
10 #include <gtest/gtest.h>
17 buf.
Write(
"1234567890", 10);
20 buf.
Write(
"123456789", 9);
27 auto nRead = buf.
Read(r, 1);
32 nRead = buf.
Read(&r[1], 100);
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.
mrpt::io::CMemoryStream CMemoryStream
EXPECT_EQ(out.image_pair_was_used.size(), NUM_IMGS)
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 memory buffer as a CStream.
size_t Write(const void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for writing to the stream.
TEST(CMemoryStream, readwrite)
size_t Read(void *Buffer, size_t Count) override
Introduces a pure virtual method responsible for reading from the stream.
Page generated by Doxygen 1.8.17 for MRPT 2.0.4 at Sun Jul 19 17:54:30 UTC 2020 | |