#pragma once #include "GlobalDefine.h" class CPropertie; //所有模块--属性的映射管理 class CPropertieMgr { public: CPropertieMgr(void); ~CPropertieMgr(void); void Insert(CMFCPropertyGridProperty* p1,CPropertie* p2); void OnPropertyChanged(LPARAM lParam); void DelAllPropertie(); void SaveAllPropertie(); void SetSaveAllPropertie(bool b){m_bSaveAllPropertie = b;}; bool ChangePropertieByName(CString name, _variant_t newVal); //根据在属性列表中的名 ,获取属性 bool ChangePropertieByVal(void* pVal, _variant_t newVal); //根据变量地址,修改其数据并刷新到属性表 void UpdateDevicePropertyPage(); private: void DelAllPropertieVec(); private: map m_PropertieValMap;//保存变量和属性映射的容器 bool m_bSaveAllPropertie;//保存所有需要存储的属性 vector m_AllPropertieVec;//保存所有需要存储的属性(用来强制保存属性) }; extern CPropertieMgr gDevicePropertieMgr; extern CPropertieMgr gDrawPropertieMgr;//绘制属性管理