Base module
Application
Main icey application class.
Application
#include <icy/application.h>Main icey application class.
This class exposes basic features required by most applications:
Running the event loop
Command line option parsing See also: OptionParser
Shutdown signal (Ctrl-C) handling
Garbage collection
Public Attributes
| Return | Name | Description |
|---|---|---|
uv::Loop * | loop | Active event loop. |
loop
uv::Loop * loopActive event loop.
The event loop may be assigned on construction, otherwise the default event loop will be used.
Public Methods
| Return | Name | Description |
|---|---|---|
Application | Constructor. | |
~Application | Destructor. | |
void | run | Run the application event loop. |
void | stop | Stop the application event loop. |
void | finalize | Finalize and free any remaining pointers still held by the application event loop. |
void | waitForShutdown | Bind the shutdown signal and run the main event loop. |
void | bindShutdownSignal | Bind the shutdown signal. |
Application
Application(uv::Loop * loop)Constructor.
~Application
~Application()Destructor.
run
void run()Run the application event loop.
stop
void stop()Stop the application event loop.
finalize
void finalize()Finalize and free any remaining pointers still held by the application event loop.
waitForShutdown
void waitForShutdown(std::function< void(void *)> callback, void * opaque)Bind the shutdown signal and run the main event loop.
bindShutdownSignal
void bindShutdownSignal(std::function< void(void *)> callback, void * opaque)Bind the shutdown signal.
Public Static Methods
| Return | Name | Description |
|---|---|---|
Application & | getDefault static | Returns the default Application singleton, although Application instances may be initialized individually. |
getDefault
static
static Application & getDefault()Returns the default Application singleton, although Application instances may be initialized individually.
Protected Methods
| Return | Name | Description |
|---|---|---|
Application | Deleted constructor. | |
Application | Deleted constructor. |
Application
Application(const Application &) = deleteDeleted constructor.
Application
Application(Application &&) = deleteDeleted constructor.
