I need to mix Objective-C and C++. I would like to hide all the C++ stuff inside one class and keep all the others plain Objective-C. The problem is that I want to have some C++
I also ran into this issue recently. In my case a protocol was overkill. I just needed to keep a pointer to a data access object that happened to be a C++ object.
What I did was declare the class with a void *
instance variable and cast it when I use it in the instance methods.
This is a little bit hack-y, but conceptually, it's very similar to what the Objective-C id
type is.