Is there a way to get the class of the current region in the preprocessor?
I am currently doing the following:
I have a macro:
CLASS *source = [[[CLASS alloc] init] autorelease]; \
return source; \
}
and then I use this macro in many classes, for example:
DATA_SOURCE_DEF_CONSTR(SpecialDataSource)
I would like something like:
__CLASS__ *source = [[[__CLASS__ alloc] init] autorelease]; \
return source; \
}
And call it that:
@implementation ...
DATA_SOURCE_DEF_CONSTR
...
@end
Is this possible in Objective-C with a preprocessor?
source
share