As a logic continuing of the question: Objective-C dynamic_cast?
From there we learned we can do the following:
MyClass *safeObject = objc_dynamic_cast(originalObject, MyClass);
Lets suppose the hierarchy: A -> B, A -> C, A -> D.
The function is
-(void)someStuffWith:(A*)object;
where Object is never A, but always B,C or D.
The question is how to represent in Objective-C (on iOS particularly) the following idea:
Class class = [object class];
class *safeObject = objc_dynamic_cast(object, class);
where "class" is either B,C, or D.