/* Header for the definition of a boolean characteristic */
/*/////////////////////////////////////////////////////////*/
#ifndef _CTL_VECTOR_DATA_
#define _CTL_VECTOR_DATA_
 
#if _MSC_VER >= 1000
#pragma once
#endif /* _MSC_VER >= 1000*/
 
#include "CTL_Dat.hpp"
 
class CPA_EXPORT CTL_Editor_VectorData : public CTL_Editor_Data
{
/*Constructor / Destructor*/
public:
	CTL_Editor_VectorData(char cDataSize, 
												CString,
												CTL_Editor_DataList *_pclParentList,
												CTL_Editor_Data *pclCurrentBaseData = NULL);
 
	~CTL_Editor_VectorData();
 
/*Attributes*/
public:
	long double m_ldCurrentValueX;
	long double m_ldCurrentValueY;
	long double m_ldCurrentValueZ;
	long double m_ldOldValueX;
	long double m_ldOldValueY;
	long double m_ldOldValueZ;
	
	long double m_ldKeepedValueForUndoX;
	long double m_ldKeepedValueForUndoY;
	long double m_ldKeepedValueForUndoZ;
 
	char m_cDataSize;
 
protected:
 
private:
	
/*Member functions*/
public:
	/*Function called to get a string representing the value of the data*/
	CStringList *m_fn_pcslFormatDataValueString();
  
	/*Function called to set the value of the data acoording to a string representing it*/
	void m_fn_vSetValueWithString(CStringList *);
 
	/*Function called to Init the data*/
	void m_fn_vInitData();
 
	/*Function called to read associated motor's data*/
	void m_fn_vGetMotorData();
	
	/*Function called to update associated motor's data*/
	void m_fn_vUpdateMotorData(CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
														 long _lUserDefinedReason = 0);
 
	/*Function called to update data with another one*/
	void m_fn_vUpdateData(CTL_Editor_Data *pclSourceData,
												CTL_tdeUpdateReason eReason = CTL_UPDATE_REASON__NO_REASON_GIVEN,
												long _lUserDefinedReason = 0);
 
	/*Function called to look if data has been modified (by motor for example)*/
	void m_fn_vLookIfDataHasBeenModified();
 
	/*Undo*/
	/*Function called to save the current Value (for Undo)*/
	void m_fn_vKeepCurrentValue();
 
	/*Function called to validate Undo for the current change*/
	void m_fn_vRegisterUndoAction();
	/*CPA2 Stegaru Cristian 98/06/24*/
	virtual BOOL mfn_bEqualsModifiedDataOldValue (CTL_Editor_Data *pModifiedData);
	long double mfn_ldSetCurrentValueX (long double ldValueX)
	{
		if (m_ldCurrentValueX != ldValueX)
		{
			m_ldOldValueX = m_ldCurrentValueX;
			m_ldCurrentValueX = ldValueX;
		}
		return m_ldOldValueX;
	}
	long double mfn_ldGetCurrentValueX () { return m_ldCurrentValueX;}
	long double mfn_ldSetCurrentValueY (long double ldValueY)
	{
		if (m_ldCurrentValueY != ldValueY)
		{
			m_ldOldValueY = m_ldCurrentValueY;
			m_ldCurrentValueY = ldValueY;
		}
		return m_ldOldValueY;
	}
	long double mfn_ldGetCurrentValueY () { return m_ldCurrentValueY;}
	long double mfn_ldSetCurrentValueZ (long double ldValueZ)
	{
		if (m_ldCurrentValueZ != ldValueZ)
		{
			m_ldOldValueZ = m_ldCurrentValueZ;
			m_ldCurrentValueZ = ldValueZ;
		}
		return m_ldOldValueZ;
	}
	long double mfn_ldGetCurrentValueZ () { return m_ldCurrentValueZ;}
	/*End CPA2 Stegaru Cristian 98/06/24*/
 
protected:
 
private:
 
};
 
#endif /*_CTL_VECTOR_DATA_*/
