#pragma once #include #include "DeviceInterface/Device_API.h" class CDeviceData { public: CDeviceData(); CDeviceData(CString strName,CString strGroup,int nType,CString strValue); ~CDeviceData(); int Init(CString strName,CString strGroup,int nValue,pCallbackfun pfun); int Init(CString strName,CString strGroup,float fValue,pCallbackfun pfun); int Init(CString strName,CString strGroup,bool bValue,pCallbackfun pfun); int Init(CString strName,CString strGroup,CString strValue,pCallbackfun pfun); int Init(CString strName,CString strGroup,const wchar_t* strValue,pCallbackfun pfun); int Init(CString strName,CString strGroup,const char* strValue,pCallbackfun pfun); bool operator=(const int nValue); bool operator=(const float fValue); bool operator=(const bool bValue); bool operator=(const wchar_t* strValue); bool operator=(const CString& strValue); bool operator=(const char* strValue); CString Name(); CString Group(); CString Data(); int Type(); CString strType(); int nValue(); float fValue(); bool bValue(); CString strValue(); bool SetValue(CString strValue); private: CString m_strName; CString m_strGroup; CString m_Value; int m_nType; //0:int 1:float 2:bool 3:string pCallbackfun m_pFunc; int m_nValue; float m_fValue; bool m_bValue; CString m_strValue; bool FireCallback(); };