Rosetta
|
forward declaration for PausableSignalHub More...
#include <PausableSignalHub.hh>
Public Types | |
typedef Super::Size | Size |
![]() | |
typedef Super::Size | Size |
typedef std::vector< Signal > | Buffer |
![]() | |
typedef platform::Size | Size |
Public Member Functions | |
PausableSignalHub () | |
default constructor More... | |
~PausableSignalHub () override=default | |
default destructor More... | |
void | pause () |
"pause" by waiting for stdin after a signal is sent More... | |
void | unpause () |
do not wait for stdin after a signal is sent More... | |
bool | pausing () const |
will a pause occur after sending a signal? More... | |
![]() | |
BufferedSignalHub () | |
default constructor More... | |
~BufferedSignalHub () override=default | |
default destructor More... | |
void | buffer () |
block signals and buffer them for release upon unblocking More... | |
void | unblock () override |
allow signals to be sent and release any signals that were buffered More... | |
bool | buffering () const |
are signals being buffered? More... | |
void | clear_buffer () |
clear the buffer More... | |
Size | buffer_size () const |
number of signals left in the buffer More... | |
![]() | |
SignalHub () | |
default constructor More... | |
virtual | ~SignalHub () |
default destructor More... | |
void | operator() (Signal s) |
send signal to all observers connected to the hub More... | |
Size | size () const |
number of connections to the hub More... | |
void | block () |
block signals from being sent More... | |
bool | blocked () const |
are signals blocked? More... | |
void | clear () |
clear all connections More... | |
template<typename MemFn , typename Ptr > | |
Link | connect (MemFn fn, Ptr ptr) |
connect an observer's member function to this hub More... | |
template<typename MemFn , typename Ptr > | |
bool | disconnect (MemFn fn, Ptr ptr) |
disconnect an observer's member function from this hub More... | |
Size | receive_linkunits_from (SignalHub const &src) |
transfer linkunits from source to this SignalHub More... | |
Links | current_links () const |
return a copy of the list of links currently being managed by this SignalHub More... | |
Protected Member Functions | |
void | after_send () override |
wait for stdin after sending a signal More... | |
![]() | |
void | release_buffer () |
release the signals in the buffer More... | |
bool | signal_allowed (Signal const s) override |
is signal allowed to be passed? More... | |
![]() | |
virtual void | send_signal (Signal s) |
send signal to all observers More... | |
template<typename MemFn , typename Ptr > | |
Link | connect (MemFn fn, Ptr ptr, LinkUnits &links) const |
connect an observer's member function to the given LinkUnits More... | |
template<typename MemFn , typename Ptr > | |
bool | disconnect (MemFn fn, Ptr ptr, LinkUnits &links) const |
disconnect an observer's member function from the given LinkUnits More... | |
template<typename Functor > | |
LinkUnits::iterator | find_connection (Functor f, LinkUnits &links) const |
find a specific connection to this hub More... | |
void | send (Signal s, LinkUnits &links) const |
send signal to all links taking into account validity and local blocking More... | |
void | invalidate_all (LinkUnits &links) const |
invalidate and destroy internals of all links More... | |
void | remove_invalid (LinkUnits &links) const |
remove and destroy internals of invalid links More... | |
void | deallocate (LinkUnit &lu) const |
deallocate function stored in a LinkUnit More... | |
LinkUnits & | linkunits () |
returns the list of LinkUnits More... | |
Private Types | |
typedef BufferedSignalHub< ReturnType, Signal > | Super |
Private Member Functions | |
PausableSignalHub (PausableSignalHub const &rval) | |
disallow copy constructor More... | |
PausableSignalHub & | operator= (PausableSignalHub const &rval) |
disallow copy assignment More... | |
Private Attributes | |
bool | pausing_ |
flag indicating blocked signals should be buffered More... | |
Additional Inherited Members | |
![]() | |
typedef boost::function1< ReturnType, Signal > | Function |
typedef std::vector< LinkUnitOP > | LinkUnits |
typedef std::vector< Link > | Links |
forward declaration for PausableSignalHub
BufferedSignalHub capable of pausing and waiting for stdin.
When pause is set, a Signal that's passed in to the Hub will first be sent to all observers, and then afterwards the Hub will attempt to read from stdin, waiting for the user to press enter. Please see BufferedSignalHub documentation for other usage.
#define BOINC
pause behavior is non-operative. typedef Super::Size utility::signals::PausableSignalHub< ReturnType, Signal >::Size |
|
private |
|
inline |
default constructor
|
inlineoverridedefault |
default destructor
|
private |
disallow copy constructor
|
inlineoverrideprotectedvirtual |
wait for stdin after sending a signal
user presses enter to continue
Reimplemented from utility::signals::SignalHub< ReturnType, Signal >.
References utility::io::ic::cin, utility::io::icstream::clear(), utility::io::oc::cout, and utility::signals::PausableSignalHub< ReturnType, Signal >::pausing_.
|
private |
disallow copy assignment
|
inline |
"pause" by waiting for stdin after a signal is sent
References utility::signals::PausableSignalHub< ReturnType, Signal >::pausing_.
|
inline |
will a pause occur after sending a signal?
References utility::signals::PausableSignalHub< ReturnType, Signal >::pausing_.
|
inline |
do not wait for stdin after a signal is sent
References utility::signals::PausableSignalHub< ReturnType, Signal >::pausing_.
|
private |
flag indicating blocked signals should be buffered
Referenced by utility::signals::PausableSignalHub< ReturnType, Signal >::after_send(), utility::signals::PausableSignalHub< ReturnType, Signal >::pause(), utility::signals::PausableSignalHub< ReturnType, Signal >::pausing(), and utility::signals::PausableSignalHub< ReturnType, Signal >::unpause().