11 Jun
2003
11 Jun
'03
10:32
Hi, On Wednesday 11 June 2003 18:28, Verdi March wrote:
Hi,
how can I perform "reflection" in C++ ? Is it possible?
My situation is as follow: application will consume a string that contains whitespace-separated fields. One of the field describes the class name. Based on this string, I'll create the appropriate objects. So basically it'll looked like this:
T& createObj() { vector<string> argv; //read line and populate argv
//Set T = class to be instantiated.
return T::createObj(argv); }
Forgot the question: how to do "set T = class to be instantiated" ? -- -- Verdi March --