#pragma once #include #include "Thread.h" namespace Framework { class AsynchronCall : private Thread { private: std::function f; bool* finished; void thread() override; void threadEnd() override; public: //! Constructor //! \param f The function to be called asynchronously //! Must be called with new. The object deletes itself DLLEXPORT AsynchronCall(std::function f); //! Constructor //! \param name The name of the thread //! \param f The function to be called asynchronously //! Must be called with new. The object deletes itself DLLEXPORT AsynchronCall(const char* name, std::function f); //! Constructor //! \param f The function to be called asynchronously //! \param finished Will be set to 1 when the call has been processed //! Must be called with new. The object deletes itself DLLEXPORT AsynchronCall(std::function f, bool* finished); //! Constructor //! \param name The name of the thread //! \param f The function to be called asynchronously //! \param finished Will be set to 1 when the call has been processed //! Must be called with new. The object deletes itself DLLEXPORT AsynchronCall( const char* name, std::function f, bool* finished); }; } // namespace Framework