A C++ Class Factory for JUCE
So, I’m working on a side project (as one does), and reach the point in development where I need to be able to take a tree of objects that all share a common base class and persist them to and from disk.
I prefer using plain text files to binary for a bunch of different reasons, so the problem really boils down to:
At runtime, I need to be able to convert a string containing the name of a class into a pointer to an object of the corresponding C++ class. Sounds simple, right?