I have an NSMutableArray of objects in Objective C. I'm filling this up based on the contents of a data file, which contains the class each element should be and a list of parameters. All of the possible classes inherit from a common parent class.
Is there any way of instantiating each element of the array without hard-coding each of the possible classes inside a massive if-else test?