I may be asking this in a odd way, but I'm not sure how else to ask.
I want to have a list of classes, not objects. This way I can call static functions without have to create the object.
I may be asking this in a odd way, but I'm not sure how else to ask.
I want to have a list of classes, not objects. This way I can call static functions without have to create the object.
I don't think what you are asking is possible, at least not in the way you think. You cannot have a variable, array, container class or any other storage of type names. So you cannot do something like
in C++. It is impossible.
What you are looking for are boost typelists. I would however not recommend diving into the Boost MPL if you are not already very experienced with templates, and know how many of their intricacies work.
Now for a simple home-made implementation:
From there use recursive Templated implementations to call the static methods you want.
If you want more information on these kinds of techniques, you should read Modern C++ Design
I would really prefer function pointers at this point:
Note that a static function is more or less equivalent to a traditional C-function (it just got to access some more scope).
http://www.boost.org/doc/libs/1_45_0/libs/mpl/doc/refmanual/refmanual_toc.html
eg:
As a solution you can create a list of method pointers