Peano
Loading...
Searching...
No Matches
ServiceRepository.h
Go to the documentation of this file.
1// This file is part of the Peano project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include <vector>
7#include <string>
8
10
11
12namespace tarch {
13 namespace services {
14 class ServiceRepository;
15 }
16}
17
18
28 private:
29 struct ServiceEntry {
30 std::string _name;
32 };
33
34 typedef std::vector<ServiceEntry> ServiceContainer;
35
37
39
44
46 public:
47 virtual ~ServiceRepository();
48
50
69 void addService( Service* const service, const std::string& name );
70
74 bool hasService( Service* service ) const;
75
81 void removeService( Service* const service );
82
131 virtual void receiveDanglingMessages() override;
132
136 std::string getListOfRegisteredServices() const;
137
141 void init();
142
143 virtual void shutdown() override;
144};
145
146
std::vector< ServiceEntry > ServiceContainer
tarch::multicore::RecursiveSemaphore _receiveDanglingMessagesSemaphore
virtual void receiveDanglingMessages() override
Answer to MPI Messages.
static tarch::services::ServiceRepository _singleton
static ServiceRepository & getInstance()
void init()
Maybe the only service that you don't have to init and shutdown.
void removeService(Service *const service)
This routine is thread-safe, i.e.
bool hasService(Service *service) const
This routine is thread-safe.
void addService(Service *const service, const std::string &name)
Add a new service.
Service Interface.
Definition Service.h:87
Have to include this header, as I need access to the SYCL_EXTERNAL keyword.
Definition accelerator.h:19