#pragma once

#include "PropertyInternal.h"
#include "PropertiesInterface.h"

namespace NDTS
{
	namespace SCO
	{
	class SIUnitInternal;
	
	// See explanation in IntPropertyInernal.h
	#pragma warning (disable :4250)

	class SCO_API SIPropertyInternal :	public PropertyInternal, public virtual SIProperty
	{
	public:
		// SIPropertyInternal is a base class concerned mainly with unit conversion 
		SIPropertyInternal(char *pShortName, char *pLongName, int flags, 
			SI::BaseUnit baseUnit,	// The SI Unit to use, e.g. Metres, Hz, ...
			SI::Prefix prefix);		// The SI Prefix to apply , e.g. Kilo, Micro.  The SI prefix is applied to set / gets unless setBaseUnitOnly() has been called
		virtual ~SIPropertyInternal(void);
		virtual double getValue();
		virtual void setValue(double value);
		virtual double getMin();
		virtual double getMax();
		virtual SIUnit *getSIUnit();
		virtual void setBaseUnitOnly(); 

		// The implementation and storage of the value / min / max is left to the child class
		// The child class always works in SI Base Units
		virtual double getSIValue()=0;
		virtual void setSIValue(double value)=0;
		virtual double getSIMin()=0;
		virtual double getSIMax()=0;
	protected:
		SIUnitInternal *pSIUnitInternal;
	};
}}
