You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
TwoLaserHead-PushJig/LaiPuLaser/PropertieMgr.h

32 lines
1.1 KiB
C++

#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();
public:
map<CMFCPropertyGridProperty*,CPropertie*> m_PropertieValMap;//保存变量和属性映射的容器
bool m_bSaveAllPropertie;//保存所有需要存储的属性
vector<CPropertie*> m_AllPropertieVec;//保存所有需要存储的属性(用来强制保存属性)
};
extern CPropertieMgr gDevicePropertieMgr;
extern CPropertieMgr gDrawPropertieMgr;//绘制属性管理