Async 1.8.0
Async::CppApplication Class Reference

An application class for writing non GUI applications. More...

#include <AsyncCppApplication.h>

Inheritance diagram for Async::CppApplication:
Async::Application

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.
 
- Public Member Functions inherited from Async::Application
 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 Public Member Functions inherited from Async::Application
static Applicationapp (void)
 Get the one and only application instance.
 
- Protected Member Functions inherited from Async::Application
void clearTasks (void)
 

Detailed Description

Constructor & Destructor Documentation

◆ CppApplication()

Async::CppApplication::CppApplication ( void )

Constructor.

◆ ~CppApplication()

Async::CppApplication::~CppApplication ( void )

Destructor.

Member Function Documentation

◆ catchUnixSignal()

void Async::CppApplication::catchUnixSignal ( int signum)

Catch the specified UNIX signal.

Parameters
signumThe signal number to catch
Examples
AsyncHttpServer_demo.cpp.

◆ exec()

◆ quit()

void Async::CppApplication::quit ( void )
virtual

Exit the application main loop.

This function should be called to exit the application core main loop.

Implements Async::Application.

Examples
AsyncHttpServer_demo.cpp.

◆ uncatchUnixSignal()

void Async::CppApplication::uncatchUnixSignal ( int signum)

Uncatch the specified UNIX signal.

Parameters
signumThe UNIX signal to uncatch

Member Data Documentation

◆ unixSignalCaught

sigc::signal<void, int> Async::CppApplication::unixSignalCaught

A signal that is emitted when a monitored UNIX signal is caught.

Parameters
signumThe 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.

Examples
AsyncHttpServer_demo.cpp.

Definition at line 185 of file AsyncCppApplication.h.


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