PDI 1.4.3

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. More...
 
 Referenced_buffer ()=delete
 
 Referenced_buffer (const Referenced_buffer &)=delete
 
 Referenced_buffer (Referenced_buffer &&)=delete
 
 ~Referenced_buffer ()
 

Public Attributes

std::function< void()> m_delete
 The function to call to deallocate the buffer memory. More...
 
int m_owners
 Number of references to this buffer. More...
 
int m_read_locks
 Number of locks preventing read access. More...
 
int m_write_locks
 Number of locks preventing write access. More...
 
std::unordered_map< const Reference_base *, std::function< void(Ref)> > m_notifications
 Nullification notifications registered on this instance. More...
 

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_delete

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

The function to call to deallocate the buffer memory.

◆ m_owners

int PDI::Reference_base::Referenced_buffer::m_owners

Number of references to this buffer.

◆ 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: