Hi,
(New to Objective-C, but well versed in C/C++).
Presently I have an Objective-C class and a number of its member variables will be function pointers. These function pointers will only be modified by the class itself, but may be used by other classes.
I'm not sure how to set up access to said function pointers.
The solution I currently envision is to declare said function pointers @public, which as I understand it will allow me to call them using the -> operator. This seems fairly unsatisfactory to me, since the function pointers are left open to meddling, and it flies in the face of sound OOP.
My next inclination is toward using @property, and declaring them read only. This seems more sane. I assume I'd call them using the dot operator, as the idea of using to getter to get the function pointer and then call it seems entirely ludicrous.
Can one use function pointers as properties? If so, how would I go about declaring these to be properties:
void (*sort)(SET, int) ;
char *(*toASCII)(CARD) ;
I have a feeling I'm missing a slight nuance to declaring these as properties.