I am working on a project that has a wide variety of
specialized classes that I want to add and instantiate in a sort of
plug in fashion.
My planned class hierarchy for these consists of a single
parent class called Actor, and many subclasses such as BadActor,
MethodActor, Waiter, and ChildActor.
I have two questions:
1. How best would I add these classes to my project? (as.
files, XML, other?)
2. How would I discern the list of plugin classes available
at runtime without hard coding anything? (No massive precoded
switch statements.) So I could for example populate a list box with
all of the available plugin classes and allow the user to select
and create(instantiate) one of the plugin classes.
See my pseudo code for example of what I am thinking of: