#ifndef DParameter_H
#define DParameter_H

#include <string>
#include <list>

#include "MySerializable.h"
#include "DValue.h"
#include "DParameterContainer.h"
#include "TypeDefs.h"
#include <memory>


namespace ProtoGenWrapper
{
	class DParameter : public MySerializable
	{
	public:
		DParameter();
		DParameter(const std::string& path, const std::string& shortName, const std::string& longName, const std::string& longNameID,
			const std::string& semantic, const int32 parameterType, const int32 dataType,  const DValue& value);
		DParameter(const std::string& data);
		DParameter(const DParameter& other);

		DParameter& operator=(const DParameter& other);

		ProtoGenWrapper::DParameterContainer GetOwner() const;
		void SetOwner(const ProtoGenWrapper::DParameterContainer &owner);
		std::string GetPath() const;
		void SetPath(const std::string& path);
		std::string GetShortName() const;
		void SetShortName(const std::string& name);
		std::string GetLongName() const;
		void SetLongName(const std::string& name);
		std::string GetLongNameID() const;
		void SetLongNameID(const std::string& name);
		std::string GetSemantic() const;
		void SetSemantic(const std::string& semantic);
		int32 GetParameterType()const;
		void SetParameterType(const int32 type);
		int32 GetDataType()const;
		void SetDataType(const int32 type);
		DValue GetValue() const;
		void SetValue(const DValue& value);

		void Serialize(std::string* output) const override;
		void Deserialize(const std::string& data) override;

	protected:
		std::unique_ptr<ProtoGenWrapper::DParameterContainer> _owner;
		std::string _path;
		std::string _shortName;
		std::string _longName;
		std::string _longNameID;
		std::string _semantic;
		int32 _parameterType;
		int32 _dataType;
		DValue _value;
	};

	typedef std::list<DParameter> DParameterList;
}
#endif // DParameter_H