Skip to content
KerwinKoo edited this page Dec 29, 2015 · 1 revision

C++ set get 属性快捷定义宏

#define SG_M(TYPE, M)\
public:\
  void set_##M( const TYPE& in_##M ) {\
    M##_ = in_##M;\
  }\
  TYPE M() {\
    return M##_;\
  }\
private:\
  TYPE M##_;

[[TOC]]

Clone this wiki locally