Initial version

This commit is contained in:
Alexander Kobjolke 2022-02-26 00:23:43 +01:00
commit 04b878f078
28 changed files with 1771 additions and 0 deletions

View file

@ -0,0 +1,23 @@
#ifndef PROCESS_SERVICE_WRAPPER_FACTORY_HPP
#define PROCESS_SERVICE_WRAPPER_FACTORY_HPP
#include <memory>
#include <process/service_wrapper.hpp>
#include <process/service_wrapper_listener.hpp>
namespace process::servicewrapper {
/**
@briefFactory method that creates a service wrapper for a ServicewrapperListener.
@note THIS METHOD CAN BE USED ONCE AND ONLY ONCE PER EXECUTABLE
@param listener the actual service implementation. Since this might do other stuff in other threads, we use a shared_ptr
@returns the service wrapper ready to run the service. Call ServiceWrapper::run() to actually execute
*/
std::unique_ptr<ServiceWrapper> make_wrapper(std::shared_ptr<ServiceWrapperListener> listener);
}
#endif // !PROCESS_SERVICE_WRAPPER_FACTORY_HPP