23 class BufferAccumulator;
45 explicit operator bool(
void)
const;
59 void reset(std::shared_ptr<BufferManager> manager,
const SharedBuffer &buff,
const size_t slabIndex = 0);
74 size_t getSlabIndex(
void)
const;
92 std::shared_ptr<BufferManager> getBufferManager(
void)
const;
101 bool unique(
void)
const;
106 size_t useCount(
void)
const;
153 if (counter.fetch_sub(1) == 0) this->cleanup();
165 inline Pothos::ManagedBuffer::operator bool(
void)
const 167 return _impl !=
nullptr;
172 if (_impl !=
nullptr) _impl->
decr();
190 if (_impl !=
nullptr) _impl->
decr();
196 if (_impl !=
nullptr) _impl->
incr();
207 if (_impl !=
nullptr) _impl->
decr();
208 this->_impl = obj._impl;
209 if (_impl !=
nullptr) _impl->
incr();
215 if (_impl !=
nullptr) _impl->
decr();
216 this->_impl = obj._impl;
229 return _impl < rhs._impl;
239 if (*
this)
return _impl->
counter+1;
258 if (_impl !=
nullptr) _impl->
incr();
263 return lhs._impl == rhs._impl;
Definition: BufferAccumulator.hpp:31
ManagedBuffer(void)
Definition: ManagedBuffer.hpp:159
const SharedBuffer & getBuffer(void) const
Definition: ManagedBuffer.hpp:176
#define POTHOS_API
Definition: Config.hpp:41
ManagedBuffer getNextBuffer(void) const
Definition: ManagedBuffer.hpp:249
void setNextBuffer(const ManagedBuffer &next)
Definition: ManagedBuffer.hpp:243
std::shared_ptr< BufferManager > getBufferManager(void) const
Get the associated buffer manager.
Definition: ManagedBuffer.hpp:221
bool unique(void) const
Definition: ManagedBuffer.hpp:232
Definition: Testing.hpp:134
void incr(void)
Definition: ManagedBuffer.hpp:145
void reset(void)
Definition: ManagedBuffer.hpp:170
bool operator==(const ManagedBuffer &lhs, const ManagedBuffer &rhs)
Definition: ManagedBuffer.hpp:261
SharedBuffer buffer
Definition: ManagedBuffer.hpp:141
~ManagedBuffer(void)
ManagedBuffer destructor.
Definition: ManagedBuffer.hpp:188
Definition: ManagedBuffer.hpp:31
std::atomic< int > counter
Definition: ManagedBuffer.hpp:139
size_t getSlabIndex(void) const
Definition: ManagedBuffer.hpp:182
size_t useCount(void) const
Definition: ManagedBuffer.hpp:237
Definition: SharedBuffer.hpp:21
void decr(void)
Definition: ManagedBuffer.hpp:150
std::weak_ptr< BufferManager > weakManager
Definition: ManagedBuffer.hpp:140
Definition: BufferChunk.hpp:30
ManagedBuffer & operator=(const ManagedBuffer &obj)
ManagedBuffer copy assignment.
Definition: ManagedBuffer.hpp:205
Definition: ManagedBuffer.hpp:135
bool operator<(const ManagedBuffer &) const
sortable operator for ManagedBuffer
Definition: ManagedBuffer.hpp:227
size_t slabIndex
Definition: ManagedBuffer.hpp:142
Pothos::ManagedBuffer::Impl * nextBuffer
Definition: ManagedBuffer.hpp:143