title: Can I use a C++ Class Instance as an Objective-C++ id?
body: <p>In connecting my C++ data model to my Cocoa table column UI, I'm wondering if I can provide the a C++ class instance at the id (identifier) to initWithIdentifier</p>
  
  <pre><code>// what magic needs to occur to create an id from a CPP class?
  id someIDMadeFromAClassInstance = a_ptr_to_a_cpp_class_instance;
  
  NSTableColumn *col = [[NSTableColumn alloc] initWithIdentifier:someIDMadeFromAClassInstance"];
  </code></pre>
  
  <p>The whole point of this is so that when the NSTable's datasource method objectValueForTableColumn gets called, I can retrieve the id and somehow convert if back to a valid C++ class instance:</p>
  
  <pre><code>id columnIdentifer = [aTableColumn identifier];
  
  MyCPPClass* pAValidClass = [someMagicOnTheID columnIdentifer];
  
  pAValidClass-&gt;AClassMethod();
  </code></pre>
  
  <p>I'm guessing there's a more traditional method of doing this, but I wanted to simplify the connection between the Cocoa UI and a pure C++ model.</p>