PDI 0.4.1

Data exchange made easy

PDI::Ref_base::Referenced Struct Reference

Manipulate and grant access to a buffer depending on the remaining right access (read/write). More...

Public Member Functions

 Referenced ()=delete
 
 Referenced (const Referenced &)=delete
 
 Referenced (Referenced &&)=delete
 
 Referenced (void *buffer, std::function< void(void *)> deleter, Datatype_uptr type, bool readable, bool writable) noexcept
 Constructs the content. More...
 
 ~Referenced ()
 

Public Attributes

void * m_buffer
 buffer that contains data More...
 
std::function< void(void *)> m_delete
 The function to call to deallocate the buffer memory. More...
 
Datatype_uptr m_type
 type of the data inside the buffer More...
 
int m_owners
 number of references to this content More...
 
int m_read_locks
 number of locks preventing read access More...
 
int m_write_locks
 number of locks preventing write access (should always remain between 0 & 2 inclusive w. current implem.) More...
 
std::unordered_map< const Ref_base *, std::function< void(Ref)> > m_notifications
 Nullification notifications registered on this instance. More...
 

Detailed Description

Manipulate and grant access to a buffer depending on the remaining right access (read/write).

Constructor & Destructor Documentation

◆ Referenced() [1/4]

PDI::Ref_base::Referenced::Referenced ( )
delete

◆ Referenced() [2/4]

PDI::Ref_base::Referenced::Referenced ( const Referenced )
delete

◆ Referenced() [3/4]

PDI::Ref_base::Referenced::Referenced ( Referenced &&  )
delete

◆ Referenced() [4/4]

PDI::Ref_base::Referenced::Referenced ( void *  buffer,
std::function< void(void *)>  deleter,
Datatype_uptr  type,
bool  readable,
bool  writable 
)
inlinenoexcept

Constructs the content.

Parameters
bufferthe actual content
deleterthe function to use to deallocate the buffer memory
typethe content type, this takes ownership of the type
readablewhether it is allowed to read the content
writablewhether it is allowed to write the content

◆ ~Referenced()

PDI::Ref_base::Referenced::~Referenced ( )
inline

Member Data Documentation

◆ m_buffer

void* PDI::Ref_base::Referenced::m_buffer

buffer that contains data

◆ m_delete

std::function<void(void*)> PDI::Ref_base::Referenced::m_delete

The function to call to deallocate the buffer memory.

◆ m_type

Datatype_uptr PDI::Ref_base::Referenced::m_type

type of the data inside the buffer

◆ m_owners

int PDI::Ref_base::Referenced::m_owners

number of references to this content

◆ m_read_locks

int PDI::Ref_base::Referenced::m_read_locks

number of locks preventing read access

◆ m_write_locks

int PDI::Ref_base::Referenced::m_write_locks

number of locks preventing write access (should always remain between 0 & 2 inclusive w. current implem.)

◆ m_notifications

std::unordered_map<const Ref_base*, std::function<void(Ref)> > PDI::Ref_base::Referenced::m_notifications

Nullification notifications registered on this instance.


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