|
QuasarAppLib 1.0.530.c9fba11
|
The Service class is a template class for creating a singleton services objects. This is manual control wrapper. You should be manually initializing your service object and manually deinitializing. If you don't destroy your service, then service object will be automatically destroyed when application will be closed. More...
#include <qaservice.h>

Public Member Functions | |
| Service () | |
| Service This is the default constructor of the Service template class. It does nothing and is used only to allow the inheritance from the Service class. | |
Static Public Member Functions | |
| static std::unique_ptr< Base > & | initService () |
| initService This method initialize the Base object as a service using the default constructor. If the service is already initialized then the current service object will be returned. | |
| static bool | initService (std::unique_ptr< Base > obj) |
| initService This is overridden static method of initialization cross libraries object. | |
| static Base * | instance () |
| instance This method return pointerer to current service object. | |
| static Base * | autoInstance () |
| autoInstance This method return pointerer to current service object and if it is not inited try to initialize it use default constructor. | |
| static void | deinitService () |
| deinitService This is destructor method for the service. | |
The Service class is a template class for creating a singleton services objects. This is manual control wrapper. You should be manually initializing your service object and manually deinitializing. If you don't destroy your service, then service object will be automatically destroyed when application will be closed.
Examples
Create a service class
Initialise a service object
Or you can use the autoInstance method for initialize instance object if not exists.
Definition at line 67 of file qaservice.h.
|
inline |
Service This is the default constructor of the Service template class. It does nothing and is used only to allow the inheritance from the Service class.
Definition at line 75 of file qaservice.h.
|
inlinestatic |
autoInstance This method return pointerer to current service object and if it is not inited try to initialize it use default constructor.
Definition at line 128 of file qaservice.h.

|
inlinestatic |
deinitService This is destructor method for the service.
Definition at line 145 of file qaservice.h.
|
inlinestatic |
initService This method initialize the Base object as a service using the default constructor. If the service is already initialized then the current service object will be returned.
Definition at line 85 of file qaservice.h.

|
inlinestatic |
initService This is overridden static method of initialization cross libraries object.
| obj | This is inited settings object. |
Definition at line 102 of file qaservice.h.
|
inlinestatic |
instance This method return pointerer to current service object.
Definition at line 119 of file qaservice.h.
