// Header for the definition of an enum characteristic /////////////////////////////////////////////////////////// #ifndef _OAC_DATA_STATE_ #define _OAC_DATA_STATE_ #if _MSC_VER >= 1000 #pragma once #endif // _MSC_VER >= 1000 //External Modules #include "TAc.h" #include "CTL.h" //End of External Modules class CPA_Editor_StateData : public CTL_Editor_Data { //Constructor / Destructor public: CPA_Editor_StateData(CString, CTL_Editor_DataList *_pclParentList, CTL_Editor_Data *pclCurrentBaseData = NULL); ~CPA_Editor_StateData(); //Attributes public: CTL_Editor_EnumElement *m_pclCurrentValueForStates; CTL_Editor_EnumElement *m_pclOldValueForStates; CTL_Editor_EnumElement *m_pclCurrentValueForActions; CTL_Editor_EnumElement *m_pclOldValueForActions; CTL_Editor_EnumElement *m_pclKeepedValueForUndoForStates; CTL_Editor_EnumElement *m_pclKeepedValueForUndoForActions; protected: private: BOOL m_pri_bIsTheInitialState; CTL_Editor_EnumDescriptor *m_pclEnumDescriptorForStates; CTL_Editor_EnumDescriptor *m_pclEnumDescriptorForActions; //For State, keeps Action CPA_Action *m_pclAction; //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(); //Function called when data has been really modified (i.e. value is different from previous one) void m_fn_vDataHasBeenReallyModified(); //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(); //Specific CTL_Editor_EnumDescriptor *m_fn_pclGetEnumDescriptorForActions(); CTL_Editor_EnumDescriptor *m_fn_pclGetEnumDescriptorForStates(); void m_fn_vConstructEnumDescriptors(); //Called when Action Data has been changed, to update State Data BOOL m_fn_bSetCurrentValueForStateAccordingToAction(); BOOL m_pub_fn_bIsTheInitialState(); protected: private: }; #endif //_OAC_DATA_STATE_