Created
June 23, 2014 15:28
-
-
Save tmyt/fbc98ed9b8e57fff20a2 to your computer and use it in GitHub Desktop.
C++/CXでお手軽にプロパティつくるマクロ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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