Async 1.8.0
|
An application class for writing non GUI applications. More...
#include <AsyncCppApplication.h>
Public Member Functions | |
CppApplication (void) | |
Constructor. | |
~CppApplication (void) | |
Destructor. | |
void | catchUnixSignal (int signum) |
Catch the specified UNIX signal. | |
void | uncatchUnixSignal (int signum) |
Uncatch the specified UNIX signal. | |
void | exec (void) |
Execute the application main loop. | |
void | quit (void) |
Exit the application main loop. | |
![]() | |
Application (void) | |
Default constructor. | |
virtual | ~Application (void) |
Destructor. | |
void | runTask (sigc::slot< void > task) |
Run a task from the Async main loop. | |
Public Attributes | |
sigc::signal< void, int > | unixSignalCaught |
A signal that is emitted when a monitored UNIX signal is caught. | |
Additional Inherited Members | |
![]() | |
static Application & | app (void) |
Get the one and only application instance. | |
![]() | |
void | clearTasks (void) |
An application class for writing non GUI applications.
Definition at line 136 of file AsyncCppApplication.h.
Async::CppApplication::CppApplication | ( | void | ) |
Constructor.
Async::CppApplication::~CppApplication | ( | void | ) |
Destructor.
void Async::CppApplication::catchUnixSignal | ( | int | signum | ) |
Catch the specified UNIX signal.
signum | The signal number to catch |
|
virtual |
Execute the application main loop.
When this member function is called the application core will enter the main loop. It will not exit from this loop until the Async::Application::quit method is called.
Implements Async::Application.
|
virtual |
Exit the application main loop.
This function should be called to exit the application core main loop.
Implements Async::Application.
void Async::CppApplication::uncatchUnixSignal | ( | int | signum | ) |
Uncatch the specified UNIX signal.
signum | The UNIX signal to uncatch |
sigc::signal<void, int> Async::CppApplication::unixSignalCaught |
A signal that is emitted when a monitored UNIX signal is caught.
signum | The signal number that was caught |
Use the catchUnixSignal and uncatchUnixSignal functions to add signals to be monitored for activity. When the signal is triggered, this sigc signal will be emitted.
Definition at line 185 of file AsyncCppApplication.h.