C ++的依赖注入框架 [英] Dependency Injection framework for C++
本文介绍了C ++的依赖注入框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有一个与Google Guice相媲美的DI框架? Google使用什么?
Is there a DI framework comparable to Google Guice? And what does Google use?
推荐答案
在C ++世界中没有什么比Guice成熟或标准的。然而,有些人自己把简单的实现放在一起。这是一对夫妇。
There is nothing as mature or standard as Guice in the C++ world. However, some people have put together simplistic implementations on their own. Here's a couple.
- http://adam.younglogic.com/2008/07/dependency-injection-in-c/ (执行来源位于帖子末尾)
- http://sourceforge.net/projects/qtioccontainer/ (需要Qt)
- http://code.google.com/p/autumnframework/ (自从2007)
- http:// programmaticallyspeaking .blogspot.com / 2010/04 / beautiful-dependency-injection-in-c.html (更多描述,真的)
- http://sourceforge.net/projects/cpp-resolver/ (Alpha质量)
- http://adam.younglogic.com/2008/07/dependency-injection-in-c/ (source for implementation is at the end of the post)
- http://sourceforge.net/projects/qtioccontainer/ (requires Qt)
- http://code.google.com/p/autumnframework/ (hasn't been touched since 2007)
- http://programmaticallyspeaking.blogspot.com/2010/04/beautiful-dependency-injection-in-c.html (more of a description, really)
- http://sourceforge.net/projects/cpp-resolver/ ("Alpha" quality)
你不太可能对这些感到满意。
You're unlikely to be satisfied by any of these.
如果你真的想投入努力,世界围绕着C ++的DI框架,可能的方式是向Boost家伙提出一个建议。
If you really wanted to put in the effort to rally the world around a DI framework for C++, probably the way to go about it would be to make a proposal to the Boost guys.
这篇关于C ++的依赖注入框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文