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++ 的依赖注入框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:C++ 的依赖注入框架
基础教程推荐
- 如何在 C++ 中正确使用命名空间? 2022-01-01
- 提升 ASIO 流缓冲 2021-01-01
- 随机插入/删除的综合向量与链表基准 2022-01-01
- C++:获取传递给函数的多维数组的行大小 2021-01-01
- 为什么我们不能使用“虚拟继承"?在 COM 中? 2022-01-01
- 将不可复制的闭包对象传递给 std::function 参数 2021-01-01
- 与 CAS 的原子交换(使用 gcc 同步内置函数) 2022-01-01
- c++ STL设置差异 2022-01-01
- 如何部分禁用 cmake C/C++ 自定义编译器检查 2021-01-01
- 如何更改 SysDateTimePick32 或 CDateTimeCtrl 的背景颜色? 2022-01-01
