OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::RCWeak< RCImpl >::ControllerRef Struct Reference

Adapter object for RCWeak::Controller <—> RCPtr. More...

#include <rc.hpp>

Collaboration diagram for openvpn::RCWeak< RCImpl >::ControllerRef:
[legend]

Public Member Functions

 ControllerRef (RCWeak *parent) noexcept
 Construct a new RCWeak<RCImpl>::ControllerRef object.
 
void operator++ () noexcept
 Increments the ref count.
 
olong operator-- () noexcept
 Decrements the ref count.
 

Public Attributes

Controller::Ptr controller
 object containing actual refcount
 

Detailed Description

template<typename RCImpl>
struct openvpn::RCWeak< RCImpl >::ControllerRef

Adapter object for RCWeak::Controller <—> RCPtr.

Template Parameters
RCImplthe injected ref count implementation

Serves as an adapter that changes the normal RCPtr/RC interaction such that the embedded controller rc member is used as the ref count.

Definition at line 1244 of file rc.hpp.

Constructor & Destructor Documentation

◆ ControllerRef()

template<typename RCImpl >
openvpn::RCWeak< RCImpl >::ControllerRef::ControllerRef ( RCWeak parent)
explicitnoexcept

Construct a new RCWeak<RCImpl>::ControllerRef object.

Template Parameters
RCImplThe ref count implementation
Parameters
parentraw pointer to RCWeak enabled type

Creates a ControllerRef and associates that adapter with the specified instance

Definition at line 1269 of file rc.hpp.

Member Function Documentation

◆ operator++()

template<typename RCImpl >
void openvpn::RCWeak< RCImpl >::ControllerRef::operator++ ( )
noexcept

Increments the ref count.

Template Parameters
RCImplthe injected ref count implementation

The adapter changes the usual implementation of this operator to increment a ref count 'rc' that's inside the controller object for the controlled instance.

Definition at line 1279 of file rc.hpp.

◆ operator--()

template<typename RCImpl >
olong openvpn::RCWeak< RCImpl >::ControllerRef::operator-- ( )
noexcept

Decrements the ref count.

Template Parameters
RCImplthe injected ref count implementation

The adapter changes the usual implementation of this operator to decrement a ref count 'rc' that's inside the controller object for the controlled instance.

Definition at line 1291 of file rc.hpp.

Member Data Documentation

◆ controller

template<typename RCImpl >
Controller::Ptr openvpn::RCWeak< RCImpl >::ControllerRef::controller

object containing actual refcount

Definition at line 1255 of file rc.hpp.


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