annotator/example/include/process/service_wrapper_factory.hpp
Alexander Kobjolke 04b878f078 Initial version
2022-03-01 22:13:15 +01:00

23 lines
758 B
C++

#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