OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
StartupDispatcher.h
Go to the documentation of this file.
1#pragma once
2
4
5#include <list>
6#include <mutex>
7
8class Application;
9namespace std { class thread; }
10
12public:
14 virtual ~StartupDispatcher();
15
16 // ####################################################################################################################
17
18 // Request management
19
20 void addRequest(const ServiceStartupInformation& _info);
21 void addRequest(const std::list<ServiceStartupInformation>& _info);
22
23 // ####################################################################################################################
24
25 void run(void);
26 void stop(void);
27
28 // ####################################################################################################################
29private:
30 void workerFunction(void);
31 void serviceStartRequestFailed(const ServiceStartupInformation& _serviceInfo);
32
33 std::list<ServiceStartupInformation> m_requests;
34 std::mutex m_mutex;
35 std::thread * m_workerThread;
36 bool m_isStopping;
37
39 StartupDispatcher& operator = (StartupDispatcher&) = delete;
40};
Definition Application.h:25
Definition ServiceStartupInformation.h:10
Definition StartupDispatcher.h:11
void stop(void)
Definition StartupDispatcher.cpp:47
virtual ~StartupDispatcher()
Definition StartupDispatcher.cpp:17
void run(void)
Definition StartupDispatcher.cpp:41
StartupDispatcher(void)
Definition StartupDispatcher.cpp:11
void addRequest(const ServiceStartupInformation &_info)
Definition StartupDispatcher.cpp:25
STL namespace.