After using this for a while, I've simplified it for ease of use, including removing the clang plugin. Please email me if you're interested in it.


Dependency Injection is a programming technique. Naturally hand written techniques will work like DI-DIY. However I've never been able to find an automated way to do it in C++ like Google Guice or the Spring Framework provide for Java. The main difficulty is that there is no introspection in C++, so this project uses code generation instead, via a clang plugin to get access to the C++ syntax tree, and boilerplate injection code is generated.

This isn't much past the proof of concept phase and certainly is not production ready, but I wanted to share what I have.

inject-0.1.tar.bz2

Home