Ready to make some complaints, everyone is mentally prepared. Also tested.
Class factory {private: static std :: map load_fns; public: faActory (int key, c1 * (* pfn) ()) {loading_fns.insert (std :: make_pair , PFN));} static c1 * make (int key) {return loading_fns [key] ();}}