Open GoogleCodeExporter opened 9 years ago
[deleted comment]
[deleted comment]
[deleted comment]
[deleted comment]
[deleted comment]
[deleted comment]
关于1.成员变量的访问,可以做如下处理
#define _WINX_PROPERTY_READ(Type, Var, get)
inline operator Type() const
{
ThisClass* pThis = parent_class_ptr(ThisClass, Var);
return pThis->get();
}
inline const Type * operator ->() const
{
ThisClass* pThis = parent_class_ptr(ThisClass, Var);
return & pThis->get();
}
_WINX_PROPERTY_BOOLOP(Type, Var)
如果这样定义的话,可以通过foo.rect->left
的方式来访问rect结构的成员变量和成员函数
Original comment by Visua...@gmail.com
on 25 Feb 2008 at 6:10
Original issue reported on code.google.com by
xushiweizh
on 25 Feb 2008 at 12:56