I'm using C++ 11. I have N source files each containing a class that inherits from a common base class. At startup, I want each class to register itself into a collection. The registration is to include 1) data necessary for identifying the purpose of the class, 2) a class factory for creating instances of the class. The number of source files is unknown. What is the pattern for doing this? The solution needs to be cross-platform compatible with Visual Studio 2013, gcc and others.