Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Private Types | Private Member Functions | List of all members
utility::signals::LinkUnit Struct Reference

struct specifying actual link data between observers and subjects More...

#include <LinkUnit.hh>

Inheritance diagram for utility::signals::LinkUnit:
Inheritance graph
[legend]

Public Member Functions

 LinkUnit (void *f)
 function pointer constructor More...
 
 ~LinkUnit () override=default
 default destructor More...
 
template<typename Function >
Function & fref ()
 return a reference to the function object with requested cast More...
 
template<typename Function , typename Signal >
void send (Signal s)
 send a signal using the member function More...
 
- Public Member Functions inherited from utility::VirtualBase
 VirtualBase ()=default
 Default constructor. More...
 
virtual ~VirtualBase ()=default
 The virtual destructor is one of the main reasons for the VirtualBase class. More...
 
 VirtualBase (VirtualBase const &)=default
 
 VirtualBase (VirtualBase &&)=default
 
VirtualBaseoperator= (VirtualBase const &)=default
 
VirtualBaseoperator= (VirtualBase &&)=default
 

Public Attributes

void * fn
 the observer's member function More...
 
bool valid
 connection still valid? More...
 
bool blocked
 connection locally blocked? More...
 

Private Types

typedef utility::VirtualBase Super
 

Private Member Functions

 LinkUnit ()
 disallow default constructor More...
 
 LinkUnit (LinkUnit const &rval)
 disallow copy constructor More...
 
LinkUnitoperator= (LinkUnit const &rval)
 disallow copy assignment More...
 

Detailed Description

struct specifying actual link data between observers and subjects

Remarks
Used internally by SignalHub. There is no copy constructor and copy assignment, a LinkUnit is meant to be created only once for each connection.

Member Typedef Documentation

Constructor & Destructor Documentation

utility::signals::LinkUnit::LinkUnit ( )
private

disallow default constructor

utility::signals::LinkUnit::LinkUnit ( LinkUnit const &  rval)
private

disallow copy constructor

utility::signals::LinkUnit::LinkUnit ( void *  f)
inline

function pointer constructor

Parameters
fpointer to function object with proper signature
utility::signals::LinkUnit::~LinkUnit ( )
inlineoverridedefault

default destructor

Member Function Documentation

template<typename Function >
Function& utility::signals::LinkUnit::fref ( )
inline

return a reference to the function object with requested cast

References debug_assert, and fn.

LinkUnit& utility::signals::LinkUnit::operator= ( LinkUnit const &  rval)
private

disallow copy assignment

template<typename Function , typename Signal >
void utility::signals::LinkUnit::send ( Signal  s)
inline

send a signal using the member function

Template Parameters
theboost function type
theSignal to send, must match the necessary function signature

References blocked, debug_assert, fn, and valid.

Member Data Documentation

bool utility::signals::LinkUnit::blocked

connection locally blocked?

Referenced by send().

void* utility::signals::LinkUnit::fn

the observer's member function

dependent upon SignalHub to manage memory

Referenced by utility::signals::SignalHub< ReturnType, Signal >::deallocate(), fref(), and send().

bool utility::signals::LinkUnit::valid

connection still valid?

Referenced by send().


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