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 )
37 bool write(
const void *data,
size_t size);
40 size_t addSubBuffer(
const Buffer& buffer);
42 bool hasSubBuffer(
size_t offset)
const;
44 const Buffer& subBuffer(
size_t offset)
const;
49 size_t totalSize()
const;
52 const std::vector<std::pair<size_t, Buffer> >& subBuffers()
const;
55 void* reserve(
size_t size);
62 const void* data()
const;
65 const void* read(
size_t offset = 0,
size_t length = 0)
const;
67 size_t read(
void* buffer,
size_t offset = 0,
size_t length = 0)
const;
72 boost::shared_ptr<BufferPrivate> _p;
81 # pragma warning( pop )
84 #endif // _QI_BUFFER_HPP_
Class to read const buffer.
void printBuffer(std::ostream &stream, const Buffer &buffer)
dll import/export and compiler message