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

interface wrapper around utility::signals::LinkUnit More...

#include <Link.hh>

Public Member Functions

 Link ()
 default constructor More...
 
 Link (LinkUnitOP unit)
 LinkUnit constructor. More...
 
 Link (Link const &)=default
 copy constructor More...
 
 ~Link ()=default
 default destructor More...
 
Linkoperator= (Link const &rval)
 copy assignment More...
 
bool operator== (Link const &rval)
 equality comparison More...
 
bool empty () const
 link empty? More...
 
bool valid () const
 link still valid? More...
 
void invalidate ()
 cut the connection, safe to call even when link is empty More...
 
bool blocked () const
 link blocked? More...
 
void block ()
 locally block the link More...
 
void unblock ()
 locally unblock the link More...
 

Private Types

typedef
utility::pointer::shared_ptr
< LinkUnit
LinkUnitOP
 

Private Attributes

LinkUnitOP unit_
 

Detailed Description

interface wrapper around utility::signals::LinkUnit

Can be used to manage the link between Subject and Observer. Signals can be temporarily blocked and the connection can be invalidated (disconnected) by the user. If a Subject is destroyed or a manual disconnect is called via the SignalHub, the Link will automatically become invalidated.

Remarks
Returned by utility::signals::SignalHub upon connection.

Member Typedef Documentation

typedef utility::pointer::shared_ptr< LinkUnit > utility::signals::Link::LinkUnitOP
private

Constructor & Destructor Documentation

utility::signals::Link::Link ( )
inline

default constructor

utility::signals::Link::Link ( LinkUnitOP  unit)
inline

LinkUnit constructor.

utility::signals::Link::Link ( Link const &  )
inlinedefault

copy constructor

utility::signals::Link::~Link ( )
inlinedefault

default destructor

Member Function Documentation

void utility::signals::Link::block ( )
inline

locally block the link

References unit_.

bool utility::signals::Link::blocked ( ) const
inline

link blocked?

true if link is blocked or empty, otherwise false

References unit_.

bool utility::signals::Link::empty ( ) const
inline

link empty?

References unit_.

void utility::signals::Link::invalidate ( )
inline

cut the connection, safe to call even when link is empty

References unit_.

Link& utility::signals::Link::operator= ( Link const &  rval)
inline

copy assignment

References unit_.

bool utility::signals::Link::operator== ( Link const &  rval)
inline

equality comparison

References unit_.

void utility::signals::Link::unblock ( )
inline

locally unblock the link

References unit_.

bool utility::signals::Link::valid ( ) const
inline

link still valid?

Returns
false if link invalid or empty, otherwise true

References unit_.

Member Data Documentation

LinkUnitOP utility::signals::Link::unit_
private

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