#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
| Return | Name | Description |
|---|---|---|
uv::Loop * | loop | Active event loop. |
uv::Loop * loopActive event loop.
The event loop may be assigned on construction, otherwise the default event loop will be used.
| 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(uv::Loop * loop)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(std::function< void(void *)> callback, void * opaque)Bind the shutdown signal and run the main event loop.
void bindShutdownSignal(std::function< void(void *)> callback, void * opaque)Bind the shutdown signal.
| Return | Name | Description |
|---|---|---|
Application & | getDefault static | Returns the default Application singleton, although Application instances may be initialized individually. |
static
static Application & getDefault()Returns the default Application singleton, although Application instances may be initialized individually.
| Return | Name | Description |
|---|---|---|
Application | Deleted constructor. | |
Application | Deleted constructor. |
Application(const Application &) = deleteDeleted constructor.
Application(Application &&) = deleteDeleted constructor.