C++Now 2014 has ended
Please visit the C++Now website.
Back To Schedule
Wednesday, May 14 • 11:00am - 12:30pm
Practical Type Erasure: A boost::any Based Configuration Framework

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Configuration frameworks have been around a long time, ranging from the classic .INI file to Boost Property Tree and many many others, but one of the problems in C++ implementations has been how to store and return different types while keeping a sane interface.

The configuration framework presented in this talk features a client-facing front end that can return any copyable C++ object based on a string key. The back end stores the data in memory, a file, a database, or any other storage mechanism, of which the client and front end are blissfully unaware. A glue layer connects the front and back ends and remains ignorant of the nature of the data being passed around. The magic is a combination of boost:any and objects and it's all done in C++03. This presentation will show the framework's objectives, design, and usage, emphasizing the practicalities of using type erasure and boost::any. If time permits, a simple back-end storage object will be developed and added to the framework.

The code for this framework was originally developed for a US Government project and is in the public domain courtesy of the US taxpayers.

avatar for Cheinan Marks

Cheinan Marks

Senior Developer
Cheinan Marks is a senior software developer, living in Berlin, where he starting a non-profit to research bioinformatics and bio-computation, specializing in genetics. He got his start in the TUTOR language on the PLATO system at the University of Illinois. Having gotten his doctorate... Read More →

Wednesday May 14, 2014 11:00am - 12:30pm MDT

Attendees (0)