Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dynamically list all members of a class

Is it possible in C++ to dynamically (during run-time) get a list of all members of the class?

like image 665
name Avatar asked Sep 16 '10 15:09

name


1 Answers

No, not without doing some work at compile time first manually. C++ has no reflection. Qt works around this with its moc system which scans your source files and generates meta data for all Qt (and inherited) classes

like image 130
Evan Teran Avatar answered Sep 29 '22 06:09

Evan Teran