Advertisement
pushrbx

C++ Properties

Feb 10th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. class Tree
  2. {
  3. private:
  4.     int m_x;
  5. public:
  6.     __declspec(property(put = property__set_x, get = property__get_x)) int X;
  7.  
  8.     int property__get_x()
  9.     {
  10.         return m_x;
  11.     }
  12.     void property__set_y(const int& value)
  13.     {
  14.         m_x = value;
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement