algorithms  2.2.0
Framework-independent algorithms for the EIC
Loading...
Searching...
No Matches
algorithms::ServiceSvc Class Reference

#include <algorithms/service.h>

Inheritance diagram for algorithms::ServiceSvc:
[legend]

Public Types

using ServiceMapType = std::map<std::string_view, ServiceBase*>

Public Member Functions

template<class Svc>
void add (ServiceBase *svc, const std::function< void(Svc &)> &init=[](Svc &s) { s.init();})
template<class Svc>
void registerService (ServiceBase *svc, const std::function< void(Svc &)> &init=[](Svc &s) { s.init();})
template<class Svc>
void initStraggler ()
template<class Svc>
bool has () const
template<class Svc>
void setInit (const std::function< void(Svc &)> &init)
void init ()
template<class Svc>
void initSingle ()
template<class Svc = ServiceBase>
Svc * service (std::string_view name) const
void validate () const
const auto & services () const
bool ready () const
 ServiceSvc (const ServiceSvc &)=delete
void operator= (const ServiceSvc &)=delete
Public Member Functions inherited from algorithms::NameMixin
 NameMixin (std::string_view name, std::string_view description)
std::string_view name () const
std::string_view description () const

Static Public Member Functions

static ServiceSvc & instance ()

Detailed Description

Definition at line 59 of file service.h.

Member Typedef Documentation

◆ ServiceMapType

using algorithms::ServiceSvc::ServiceMapType = std::map<std::string_view, ServiceBase*>

Definition at line 61 of file service.h.

Constructor & Destructor Documentation

◆ ServiceSvc()

algorithms::ServiceSvc::ServiceSvc ( const ServiceSvc & )
delete

Member Function Documentation

◆ add()

template<class Svc>
void algorithms::ServiceSvc::add ( ServiceBase * svc,
const std::function< void(Svc &)> & init = [](Svc& s) { s.init(); } )
inline

Definition at line 73 of file service.h.

◆ has()

template<class Svc>
bool algorithms::ServiceSvc::has ( ) const
inline

Definition at line 101 of file service.h.

◆ init()

void algorithms::ServiceSvc::init ( )
inline

Definition at line 114 of file service.h.

◆ initSingle()

template<class Svc>
void algorithms::ServiceSvc::initSingle ( )
inline

Definition at line 144 of file service.h.

◆ initStraggler()

template<class Svc>
void algorithms::ServiceSvc::initStraggler ( )
inline

Definition at line 93 of file service.h.

◆ instance()

ServiceSvc & algorithms::ServiceSvc::instance ( )
inlinestatic

Definition at line 62 of file service.h.

◆ operator=()

void algorithms::ServiceSvc::operator= ( const ServiceSvc & )
delete

◆ ready()

bool algorithms::ServiceSvc::ready ( ) const
inline

Definition at line 195 of file service.h.

◆ registerService()

template<class Svc>
void algorithms::ServiceSvc::registerService ( ServiceBase * svc,
const std::function< void(Svc &)> & init = [](Svc& s) { s.init(); } )
inline

Definition at line 81 of file service.h.

◆ service()

template<class Svc = ServiceBase>
Svc * algorithms::ServiceSvc::service ( std::string_view name) const
inline

Definition at line 162 of file service.h.

◆ services()

const auto & algorithms::ServiceSvc::services ( ) const
inline

Definition at line 194 of file service.h.

◆ setInit()

template<class Svc>
void algorithms::ServiceSvc::setInit ( const std::function< void(Svc &)> & init)
inline

Definition at line 107 of file service.h.

◆ validate()

void algorithms::ServiceSvc::validate ( ) const
inline

Definition at line 168 of file service.h.


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