cumbia 1.x
general purpose multi threaded library
Loading...
Searching...
No Matches
CuServiceI Class Referenceabstract

interface to write cumbia services that can be registered and fetched through the cumbia service provider, CuServiceProvider More...

#include <cuservicei.h>

Inheritance diagram for CuServiceI:

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

Detailed Description

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:

  • getName, returns a string with the name of the service
  • getType, returns a value from CuServices::Type to identify the service.

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.

Constructor & Destructor Documentation

◆ ~CuServiceI()

virtual CuServiceI::~CuServiceI ( )
inlinevirtual

Member Function Documentation

◆ getName()

virtual std::string CuServiceI::getName ( ) const
pure virtual

return the name of the service

Returns
a std::string with the name of the service

Implemented in CuActivityManager, CuLog, CuThreadService, CuTimerService, and CuEventLoopService.

◆ getType()

virtual CuServices::Type CuServiceI::getType ( ) const
pure virtual

return the type of the service

Returns
a CuServices::Type defining the type of service

Implemented in CuActivityManager, CuLog, CuThreadService, CuTimerService, and CuEventLoopService.

Referenced by Cumbia::finish().


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