iv::callback_client_ptr< TypedClient > Class Template Reference

#include <client_ptr.hpp>

Public Member Functions

callback_client_ptr< TypedClient > & operator= (callback_client_ptr< TypedClient > const &other)
 
callback_client_ptr< TypedClient > & operator= (TypedClient *instance)
 
void set_change_callback (std::function< void() > const &)
 
- Public Member Functions inherited from iv::client_ptr< TypedClient >
 client_ptr (TypedClient *client=nullptr)
 
 client_ptr (client_ptr< TypedClient > const &other)
 
 ~client_ptr ()
 
client_ptr< TypedClient > & operator= (client_ptr< TypedClient > const &other)
 
client_ptr< TypedClient > & operator= (TypedClient *client)
 
bool operator== (client_ptr< TypedClient > const &other)
 
bool operator!= (client_ptr< TypedClient > const &other)
 
bool operator< (client_ptr< TypedClient > const &other)
 
bool operator> (client_ptr< TypedClient > const &other)
 
bool operator<= (client_ptr< TypedClient > const &other)
 
bool operator>= (client_ptr< TypedClient > const &other)
 
TypedClient * get () const
 
TypedClient & operator* () const
 
TypedClient * operator-> () const
 
 operator bool () const
 

Protected Member Functions

virtual void invalidate (Instance *inst) override
 
- Protected Member Functions inherited from iv::instance_ptr_interface
void addSelfToSC (Instance *inst)
 
void removeSelfFromSC (Instance *inst)
 

Detailed Description

template<class TypedClient>
class iv::callback_client_ptr< TypedClient >

Careful - there is no guarantee about where the callback might get called. So do as little as possible from the callback, preferably just set some dirty flag and process the change from better controlled stack.

Definition at line 53 of file client_ptr.hpp.

Member Function Documentation

◆ operator=() [1/2]

template<class TypedClient >
callback_client_ptr< TypedClient > & iv::callback_client_ptr< TypedClient >::operator= ( callback_client_ptr< TypedClient > const &  other)

Definition at line 121 of file client_ptr.inl.

◆ operator=() [2/2]

template<class TypedClient >
callback_client_ptr< TypedClient > & iv::callback_client_ptr< TypedClient >::operator= ( TypedClient *  instance)

Definition at line 130 of file client_ptr.inl.

◆ set_change_callback()

template<class TypedClient >
void iv::callback_client_ptr< TypedClient >::set_change_callback ( std::function< void() > const &  cb)

Definition at line 139 of file client_ptr.inl.

◆ invalidate()

template<class TypedClient >
void iv::callback_client_ptr< TypedClient >::invalidate ( Instance inst)
overrideprotectedvirtual

Reimplemented from iv::client_ptr< TypedClient >.

Definition at line 145 of file client_ptr.inl.


The documentation for this class was generated from the following files: