#ifndef MySerializable_H
#define MySerializable_H

#include <ISerializable.h>

#include <string>
namespace ProtoGenWrapper
{
	class ComChannel;
	class ComInterface;
	class DiagService;
	class DResponse;
	class DResult;
	class DResultState;
	class DParameter;
	class DError;
	class DResponseParameter;
	class DRequest;
	class OnPrimitiveBufferHasResult;

	class ISerializer
	{
	public:
		virtual bool SerializeToString(const ComChannel& comChannel, std::string* output) = 0;
		virtual bool SerializeToString(const DiagService& diagService, std::string* output) = 0;
		virtual bool SerializeToString(const DResponse& response, std::string* output) = 0;
		virtual bool SerializeToString(const DResult& result, std::string* output) = 0;
		virtual bool SerializeToString(const DParameter& parameter, std::string* output) = 0;
		virtual bool SerializeToString(const ComInterface& comInterface, std::string* output) = 0;
		virtual bool SerializeToString(const DResultState& resultState, std::string* output) = 0;
		virtual bool SerializeToString(const DError& error, std::string* output) = 0;
		virtual bool SerializeToString(const DResponseParameter& responseParameter, std::string* output) = 0;
		virtual bool SerializeToString(const DRequest& request, std::string* output) = 0;
		virtual bool SerializeToString(const OnPrimitiveBufferHasResult& onPrimitiveBufferHasResult, std::string* output) = 0;
	};

	class IDeserializer
	{
	public:
		virtual bool DeserializeFromString(ComChannel& comChannel, const std::string& input) = 0;
		virtual bool DeserializeFromString(DiagService& diagService, const std::string& input) = 0;
		virtual bool DeserializeFromString(DResponse& response, const std::string& input) = 0;
		virtual bool DeserializeFromString(DResult& result, const std::string& input) = 0;
		virtual bool DeserializeFromString(DParameter& parameter, const std::string& input) = 0;
		virtual bool DeserializeFromString(ComInterface& comInterface, const std::string& input) = 0;
		virtual bool DeserializeFromString(DResultState& resultState, const std::string& input) = 0;
		virtual bool DeserializeFromString(DError& error, const std::string& input) = 0;
		virtual bool DeserializeFromString(DResponseParameter& parameter, const std::string& input) = 0;
		virtual bool DeserializeFromString(DRequest& request, const std::string& input) = 0;
		virtual bool DeserializeFromString(OnPrimitiveBufferHasResult& onPrimitiveBufferHasResult, const std::string& input) = 0;
	};

	class MySerializable :
		public OpenTestSystem::OtxDiagManager::Common::ISerializable
	{
	public:
		MySerializable();

		ISerializer* Serializer() const;
		IDeserializer* Deserializer() const;
	};
}
#endif // MySerializable_H
