You can achieve something similar to a protocol making a class with pure virtual
methods.
Conforming to that protocol will require to override such methods.
The "protocol" declaration
class ImageDelegate {
public:
virtual void getImage(UIImage *) = 0;
}
Then refer to ImageDelegate*
as you would do with id<ImageDelegate>
class ResInfoCallback : public NSObject {
public:
ImageDelegate *delegate;
}
Finally you need a class implementing the "protocol", which means overriding the pure virtual
methods of the "protocol" class.
class YourClassConformingToTheProtocol : public ImageDelegate {
public:
virtual void getImage(UIImage *image) {
//do stuff
}
}
As a final remark PLEASE use capitalized names for classes.