#include "OwnDiagRuntimeSystemDefs.h"
#include <IDiagRuntimeSystem.h>

class NDIAGRUNTIMESYSTEM_EXPORTS OwnDiagRuntimeSystem : public OpenTestSystem::OtxDiagManager::Common::IDiagRuntimeSystem
{
private:
	std::function<void(const OpenTestSystem::OtxDiagManager::Common::Result&)> _asyncResultHandler;
	std::function<void(const OpenTestSystem::OtxDiagManager::Common::Exception&)> _exceptionHandler;
public:
	OwnDiagRuntimeSystem();
	virtual ~OwnDiagRuntimeSystem();
	virtual OpenTestSystem::OtxDiagManager::Common::Result * Execute(const OpenTestSystem::OtxDiagManager::Common::Command & command) override;
	virtual OpenTestSystem::OtxDiagManager::Common::Result * ExecuteAsync(const OpenTestSystem::OtxDiagManager::Common::Command & command) override;
	virtual void SetAsyncResultHandler(std::function<void(const OpenTestSystem::OtxDiagManager::Common::Result&)> handler) override;
	virtual void SetExceptionHandler(std::function<void(const OpenTestSystem::OtxDiagManager::Common::Exception&)> handler) override;
};