7 #ifndef _QI_BUFFER_HPP_
8 # define _QI_BUFFER_HPP_
12 # include <boost/shared_ptr.hpp>
17 # pragma warning( push )
18 # pragma warning( disable: 4251 )
118 bool write(
const void *data,
size_t size);
127 size_t addSubBuffer(
const Buffer& buffer);
133 bool hasSubBuffer(
size_t offset)
const;
140 const Buffer& subBuffer(
size_t offset)
const;
155 size_t totalSize()
const;
162 const std::vector<std::pair<size_t, Buffer> >& subBuffers()
const;
170 void* reserve(
size_t size);
186 const void* data()
const;
197 const void* read(
size_t offset = 0,
size_t length = 0)
const;
209 size_t read(
void* buffer,
size_t offset = 0,
size_t length = 0)
const;
214 boost::shared_ptr<BufferPrivate> _p;
241 size_t read(
void *data,
size_t length);
249 void *read(
size_t offset);
255 bool seek(
size_t offset);
263 void *peek(
size_t offset)
const;
270 bool hasSubBuffer()
const;
276 const Buffer& subBuffer();
281 size_t position()
const;
296 # pragma warning( pop )
299 #endif // _QI_BUFFER_HPP_
void printBuffer(std::ostream &stream, const Buffer &buffer)
dll import/export and compiler message
Class to read const buffer. <includename>qi/buffer.hpp</includename> This class is intendeed to rea...
Class to store buffer. <includename>qi/buffer.hpp</includename> .