AutoMapper for .Net lets you map from one type to another. Its most basic function is to create one type of class from another type of class by copying property values from type A that exist in type B (have matching names and types).
Example:
public class ClassA {
public string StringProp { get; set; }
public int IntProp { get;set; }
}
public class ClassB {
public string StringProp { get; set; }
public int SomeIntProp { get; set; }
}
ClassA classAInstance = new ClassA { StringProp = "Test", IntProp = 5 };
ClassB classBInstance = Mapper.Map<ClassA, ClassB>(classAInstance);
// This creates a new instance of ClassB and sets its StringProp property to "Test".
// It does not set the property on ClassB called "SomeIntProp" because there is no
// property on ClassA called "SomeIntProp"
Is there anything like this for Objective-C?