#ifndef OpenTestSystem_OtxDiagManager_NoneOtxDiagApi_NoneOtxDiagFactory_H
#define OpenTestSystem_OtxDiagManager_NoneOtxDiagApi_NoneOtxDiagFactory_H

#include "ApiDefs.h"
#include <string>
#include <memory>
namespace OpenTestSystem { namespace OtxDiagManager {  namespace Client {
	class Client;
}}}

namespace OpenTestSystem { namespace OtxDiagManager {  namespace Common {
	class ICommandProcessor;
	class IDiagRuntimeSystem;
}}}

namespace OpenTestSystem { namespace OtxDiagManager {
	/// <summary>
	/// Namespace containing all methods that are not standardized in OTX but are available in a diagnostic runtime system and are required in more than one target environment (e.g. selection of D-PDU API)
	/// </summary>
	namespace NoneOtxDiagApi {
	class INoneOtxDiag;
	/// <summary>
	/// Factory class for creating the NoneOtxDiagApi
	/// </summary>
	class API_EXPORTS NoneOtxDiagFactory
	{
	public:
		NoneOtxDiagFactory();
		virtual ~NoneOtxDiagFactory();
		/// <summary>
		/// Creates a NoneOtxDiagManager instance using an existing client instance
		/// </summary>
		///
		/// <param name="client">Client for which a NoneOtxDiagManager is to be created</param>
		///
		/// <exception cref="std::runtime_error">Thrown if the license is invalid or expired.</exception>
		std::shared_ptr<INoneOtxDiag> CreateNoneOtxDiag(std::shared_ptr<OpenTestSystem::OtxDiagManager::Client::Client> client);

		/// <summary>
		/// Creates a DiagManager instance inside a separate process with inter process communication via Sockets
		/// </summary>
		///
		/// <param name="port">Port number of the DiagManager server e.g. "8888"</param>
		///
		/// <exception cref="std::runtime_error">Thrown if the license is invalid or expired.</exception>
		std::shared_ptr<INoneOtxDiag> CreateSocketNoneOtxDiag(unsigned short port);

		/// <summary>
		/// Creates a DiagManager instance inside a separate process with inter process communication via NamedPipe
		/// </summary>
		///
		/// <exception cref="std::runtime_error">Thrown if the license is invalid or expired.</exception>
		std::shared_ptr<INoneOtxDiag> CreatePipeNoneOtxDiag(const std::string & pipeName);

		/// <summary>
		/// Creates a DiagManager instance inside the same process
		/// </summary>
		///
		/// <exception cref="std::runtime_error">Thrown if the license is invalid or expired.</exception>
		///
		/// **Example**
		/// @snippet CodeSampleSnippets.cpp SampleCode_CreateRawRuntimeManager
		std::shared_ptr<INoneOtxDiag> CreateRawNoneOtxDiag(OpenTestSystem::OtxDiagManager::Common::ICommandProcessor *commandProcessor);
	private:
		class impl;
		std::unique_ptr<impl> pimpl;
	};
}}}
#endif // OpenTestSystem_OtxDiagManager_NoneOtxDiagApi_NoneOtxDiagFactory_H