class CMyClass : public Dapfor::Common::CDataObject
{
public:
enum
{
FidPrice,
...
};
public:
double GetPrice() const;
...
void SetPrice(double newPrice);
...
private:
double m_Price;
...
DF_DECLARE_FIELD_MAP();
};
DF_BEGIN_FIELD_MAP(CMyClass)
DF_DOUBLE_ID(FidPrice, "Price", &CMyClass::GetPrice, &CMyClass::SetPrice, 0)
...
DF_END_FIELD_MAP()
double CMyClass::GetPrice() const
{
return m_Price;
}
...
void CMyClass::SetPrice(double newPrice)
{
if(m_Price != newPrice)
{
m_Price = newPrice;
NotifyUpdate(FidPrice);
}
}