Re:Reflection in C++
by robbbbbbbbb on Monday June 20, 2016 @02:44AM
(#11936454)
Reflection is the concept of having a program have knowledge about it's own structure. Kinda like having your code look into a mirror.
A really basic example of this is having you code get a list of all the names of fields of a class. This would be very useful if you want to create a generic object serializer.
In the past I used this to create a framework that would generate a UI for you based on class definitions.
Reflection can also include being able to modify your own code structure during run time.
A really basic example of this is having you code get a list of all the names of fields of a class. This would be very useful if you want to create a generic object serializer.
In the past I used this to create a framework that would generate a UI for you based on class definitions.
Reflection can also include being able to modify your own code structure during run time.