cumbia 1.x
general purpose multi threaded library
|
interface to write cumbia services that can be registered and fetched through the cumbia service provider, CuServiceProvider More...
#include <cuservicei.h>
Public Member Functions | |
virtual | ~CuServiceI () |
virtual std::string | getName () const =0 |
return the name of the service More... | |
virtual CuServices::Type | getType () const =0 |
return the type of the service More... | |
interface to write cumbia services that can be registered and fetched through the cumbia service provider, CuServiceProvider
Cumbia::getServiceProvider returns a reference tu the CuServiceProvider. CuServiceProvider is a place where CuServiceI instances can be registered, unregistered and searched.
Every cumbia service must implement two methods:
CuServices::Type is used to register, unregister and get references to service from CuServiceProvider
If a service is shared across multiple Cumbia instances (for example, CuEventLoop), then it must be registered using the CuServiceProvider::registerService with the shared option set to true. This informs each Cumbia instance not to delete the service. Its disposal is in charge of the client.
|
inlinevirtual |
|
pure virtual |
return the name of the service
Implemented in CuActivityManager, CuLog, CuThreadService, CuTimerService, and CuEventLoopService.
|
pure virtual |
return the type of the service
Implemented in CuActivityManager, CuLog, CuThreadService, CuTimerService, and CuEventLoopService.
Referenced by Cumbia::finish().