Added abstract factory class template.