Lines Matching defs:SharedBuffer
27 class SharedBuffer
39 static SharedBuffer* alloc(size_t size);
41 /*! free the memory associated with the SharedBuffer.
42 * Fails if there are any users associated with this SharedBuffer.
46 static ssize_t dealloc(const SharedBuffer* released);
57 //! get back a SharedBuffer object from its data
58 static inline SharedBuffer* bufferFromData(void* data);
60 //! get back a SharedBuffer object from its data
61 static inline const SharedBuffer* bufferFromData(const void* data);
63 //! get the size of a SharedBuffer object from its data
67 SharedBuffer* edit() const;
70 SharedBuffer* editResize(size_t size) const;
73 SharedBuffer* attemptEdit() const;
76 SharedBuffer* reset(size_t size) const;
92 inline SharedBuffer() { }
93 inline ~SharedBuffer() { }
94 SharedBuffer(const SharedBuffer&);
95 SharedBuffer& operator = (const SharedBuffer&);
105 const void* SharedBuffer::data() const {
109 void* SharedBuffer::data() {
113 size_t SharedBuffer::size() const {
117 SharedBuffer* SharedBuffer::bufferFromData(void* data) {
118 return data ? static_cast<SharedBuffer *>(data)-1 : 0;
121 const SharedBuffer* SharedBuffer::bufferFromData(const void* data) {
122 return data ? static_cast<const SharedBuffer *>(data)-1 : 0;
125 size_t SharedBuffer::sizeFromData(const void* data) {
129 bool SharedBuffer::onlyOwner() const {