#pragma once

#include "IntPropertyInternal.h"
#include "NDTSEnums.h"

namespace NDTS
{
namespace SCO
{
	// The PropertyInternal etc. classes follow the same inheritance tree as the Property interface classes
	// The interface classes are all inherited using virtual and the Internal classes using Public
	// This tells the compiler that the implementation is in the Internal classes rather than the interface class
	// However, the compiler throws up a warning which is diabled by the pragma below
	// Ignore warning	'NDTS::SCO::EnumPropertyInternal' : inherits 'NDTS::SCO::PropertyInternal::NDTS::SCO::PropertyInternal::getShortName' via dominance		
	#pragma warning (disable :4250)

	class SCO_API EventPropertyInternal :	public  PropertyInternal, public virtual EventProperty
	{
	public:
		EventPropertyInternal(char *pShortName, char *pLongName, int flags, int primaryIndex, NDTS_Boolean (*pSetFunction)(unsigned long));
		EventPropertyInternal(char *pShortName, char *pLongName, int flags, HardwareAccessClass *pHardwareAccessObject);
		virtual ~EventPropertyInternal(void);
		virtual void doEvent();

		// Functions for internal use - not by app.
		virtual void initComplete(void);

		// Only for use by the parent group and postCommit hook
		bool getHaveUncommittedChange();
		HardwareAccessClass *getHardwareAccessObject();

	private:
		int primaryIndex;
		NDTS_Boolean (*pSetFunction)(unsigned long);
		bool haveUncommittedChange;
		// Hardware access objects may be used instead of function pointers
		HardwareAccessClass *pHardwareAccessObject;
	};
}}
