A descriptor for a buffer in which references can point. More...
Public Member Functions | |
Referenced_buffer (std::function< void()> deleter, bool readable, bool writable) noexcept | |
Constructs a new buffer descriptor. | |
Referenced_buffer ()=delete | |
Referenced_buffer (const Referenced_buffer &)=delete | |
Referenced_buffer (Referenced_buffer &&)=delete | |
~Referenced_buffer () | |
Public Attributes | |
std::function< void()> | m_deallocator |
The function to call to deallocate the buffer memory. | |
int | m_read_locks |
Number of locks preventing read access. | |
int | m_write_locks |
Number of locks preventing write access. | |
std::unordered_map< const Reference_base *, std::function< void(Ref)> > | m_notifications |
Nullification notifications registered on this instance. | |
A descriptor for a buffer in which references can point.
Both locking and memory management happen at this granularity.
|
inlinenoexcept |
Constructs a new buffer descriptor.
deleter | the function to use to deallocate the buffer memory |
readable | whether it is allowed to read the content |
writable | whether it is allowed to write the content |
|
delete |
|
delete |
|
delete |
|
inline |
std::function<void()> PDI::Reference_base::Referenced_buffer::m_deallocator |
The function to call to deallocate the buffer memory.
int PDI::Reference_base::Referenced_buffer::m_read_locks |
Number of locks preventing read access.
int PDI::Reference_base::Referenced_buffer::m_write_locks |
Number of locks preventing write access.
this should always remain between 0 & 2 inclusive w. current implem.
std::unordered_map<const Reference_base*, std::function<void(Ref)> > PDI::Reference_base::Referenced_buffer::m_notifications |
Nullification notifications registered on this instance.