Rosetta 3.3
Public Types | Public Member Functions | Protected Member Functions
utility::signals::PausableSignalHub< ReturnType, Signal > Class Template Reference

BufferedSignalHub capable of pausing and waiting for stdin. More...

#include <PausableSignalHub.hh>

Inheritance diagram for utility::signals::PausableSignalHub< ReturnType, Signal >:
Inheritance graph
[legend]
Collaboration diagram for utility::signals::PausableSignalHub< ReturnType, Signal >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef Super::Size Size

Public Member Functions

 PausableSignalHub ()
 default constructor
virtual ~PausableSignalHub ()
 default destructor
void pause ()
 "pause" by waiting for stdin after a signal is sent
void unpause ()
 do not wait for stdin after a signal is sent
bool pausing () const
 will a pause occur after sending a signal?

Protected Member Functions

virtual void after_send ()
 wait for stdin after sending a signal

Detailed Description

template<typename ReturnType, typename Signal>
class utility::signals::PausableSignalHub< ReturnType, Signal >

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.

Note:
If #define BOINC pause behavior is non-operative.
Warning:
PausableSignalHub objects are not copyable.

Member Typedef Documentation

template<typename ReturnType , typename Signal >
typedef Super::Size utility::signals::PausableSignalHub< ReturnType, Signal >::Size

Constructor & Destructor Documentation

template<typename ReturnType , typename Signal >
utility::signals::PausableSignalHub< ReturnType, Signal >::PausableSignalHub ( ) [inline]

default constructor

template<typename ReturnType , typename Signal >
virtual utility::signals::PausableSignalHub< ReturnType, Signal >::~PausableSignalHub ( ) [inline, virtual]

default destructor


Member Function Documentation

template<typename ReturnType , typename Signal >
virtual void utility::signals::PausableSignalHub< ReturnType, Signal >::after_send ( ) [inline, protected, virtual]

wait for stdin after sending a signal

user presses enter to continue

Returns:
true if successful, false otherwise

Reimplemented from utility::signals::SignalHub< ReturnType, Signal >.

References utility::io::ic::cin, and utility::io::oc::cout.

template<typename ReturnType , typename Signal >
void utility::signals::PausableSignalHub< ReturnType, Signal >::pause ( ) [inline]

"pause" by waiting for stdin after a signal is sent

template<typename ReturnType , typename Signal >
bool utility::signals::PausableSignalHub< ReturnType, Signal >::pausing ( ) const [inline]

will a pause occur after sending a signal?

template<typename ReturnType , typename Signal >
void utility::signals::PausableSignalHub< ReturnType, Signal >::unpause ( ) [inline]

do not wait for stdin after a signal is sent


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines