Property like features in C++?
<p>My use is pretty complicated. I have a bunch of objs and they are all passed around by ptr (not reference or value unless its an enum which is byval). At a specific point in time i like to call CheckMembers() which will check if each member has been set or is null. By default i cant make it all null because i wouldnt know if i set it to null or if it is still null bc i havent touch it since the ctor.</p>

<p>To assign a variable i still need the syntax to be the normal <code>var = p; var-&gt;member = new Type;</code>. I generate all the classes/members. So my question is how can i implement a property like feature where i can detect if the value has been set or left as the default?</p>

<p>I am thinking maybe i can use C++ with CLR/.NET <a href="http://msdn.microsoft.com/en-us/library/z974bes2.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/z974bes2.aspx</a> but i never used it before and have no idea how well it will work and what might break in my C++ prj (it uses rtti, templates, etc).</p>
