Writing a reflection engine from scratch

Type introspection and reflection are powerful features that help developers to automate the manipulation of user defined types, such as when doing serialization of an object or binding class methods to external scripts. The C++ language always lacked this features, while most modern languages benefit from their capabilities, showing a lack of potential productivity in the C++ language. With the current interest of the C++ standardization committee in a static reflection API for the language, reflection is a hot topic in the C++ circles these days. But reflection implementation is still considered black magic by most C++ developers, only mastered by wizards working in the gaming industry. This talk will present the internals of a C++ dynamic reflection system by looking at the implementation of the siplasplas reflection engine, a simple reflection tool based on C++14 and libclang written as part of an advanced C++ course of the Complutense University of Madrid. Also the talk will show different examples of the potential applications of reflection, using the siplasplas reflection API.

Speaker: Manuel Sánchez


Go back