PDI 1.7.1

the PDI data interface

PDI::Reference_base::Referenced_buffer Struct Reference

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.
 

Detailed Description

A descriptor for a buffer in which references can point.

Both locking and memory management happen at this granularity.

Constructor & Destructor Documentation

◆ Referenced_buffer() [1/4]

PDI::Reference_base::Referenced_buffer::Referenced_buffer ( std::function< void()>  deleter,
bool  readable,
bool  writable 
)
inlinenoexcept

Constructs a new buffer descriptor.

Parameters
deleterthe function to use to deallocate the buffer memory
readablewhether it is allowed to read the content
writablewhether it is allowed to write the content

◆ Referenced_buffer() [2/4]

PDI::Reference_base::Referenced_buffer::Referenced_buffer ( )
delete

◆ Referenced_buffer() [3/4]

PDI::Reference_base::Referenced_buffer::Referenced_buffer ( const Referenced_buffer )
delete

◆ Referenced_buffer() [4/4]

PDI::Reference_base::Referenced_buffer::Referenced_buffer ( Referenced_buffer &&  )
delete

◆ ~Referenced_buffer()

PDI::Reference_base::Referenced_buffer::~Referenced_buffer ( )
inline

Member Data Documentation

◆ m_deallocator

std::function<void()> PDI::Reference_base::Referenced_buffer::m_deallocator

The function to call to deallocate the buffer memory.

◆ m_read_locks

int PDI::Reference_base::Referenced_buffer::m_read_locks

Number of locks preventing read access.

◆ m_write_locks

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.

◆ m_notifications

std::unordered_map<const Reference_base*, std::function<void(Ref)> > PDI::Reference_base::Referenced_buffer::m_notifications

Nullification notifications registered on this instance.


The documentation for this struct was generated from the following file: