Skip to content

Instantly share code, notes, and snippets.

@tmyt
Created June 23, 2014 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmyt/fbc98ed9b8e57fff20a2 to your computer and use it in GitHub Desktop.
Save tmyt/fbc98ed9b8e57fff20a2 to your computer and use it in GitHub Desktop.
C++/CXでお手軽にプロパティつくるマクロ
#define prop(__type, __name) \
private: \
__type m_##__name; \
public: \
property __type __name { \
__type get() { return m_##__name; } \
void set(__type value) { m_##__name = value; } \
}
#define propr(__type, __name) \
private: \
__type m_##__name; \
public: \
property __type __name { \
__type get() { return m_##__name; } \
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment