To create header files that can be shared between obj-c and cpp code, you can use predefined compiler macros to do something like:
Im not 100% sure that its legal to have an ObjectiveCClassRef change type similar to the one that exists between the c / cpp and obj-c lines. But id is an ac / cpp compatible type defined in the C header object files as capable of storing the C class object pointer, and when used in .m or .mm files, it allows you to directly call an object using the target C syntax.
source share