libbio
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
bio::CowControlBlock< T > Struct Template Reference

#include <CowControlBlock.h>

Public Member Functions

 CowControlBlock (T *payload, bool immutable)
 

Public Attributes

CowRefCount mRefCount
 
TmPayload
 
bool mImmutable
 

Detailed Description

template<typename T>
struct bio::CowControlBlock< T >

The shared control block behind CowPtr (CowPtr.h): a plain struct (no vtable, no ThreadSafe inheritance) so it adds no bytes beyond the refcount + payload ptr + the immutable flag. An OWNED CowPtr points at one of these; a BORROWED CowPtr has none.

Template Parameters
Tthe owned payload type.

Constructor & Destructor Documentation

◆ CowControlBlock()

template<typename T >
bio::CowControlBlock< T >::CowControlBlock ( T payload,
bool  immutable 
)
inline

Member Data Documentation

◆ mImmutable

template<typename T >
bool bio::CowControlBlock< T >::mImmutable

◆ mPayload

template<typename T >
T* bio::CowControlBlock< T >::mPayload

◆ mRefCount

template<typename T >
CowRefCount bio::CowControlBlock< T >::mRefCount

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