C++依赖注入库 Wallaroo
- 授权协议: BOOST
- 开发语言: C/C++
- 操作系统: Windows
- 软件首页: https://code.google.com/p/wallaroo/
- 软件文档: https://code.google.com/p/wallaroo/wiki/GettingStarted
软件介绍
Wallaroo 是一个C++的依赖注入库,您可以使用字符串来创建对象,你也可以从配置文件中加载“对象图”。
示例代码:
#include "wallaroo/catalog.h" using namespace wallaroo; ... // load classes in shared libraries: Plugin::Load( "car" + Plugin::Suffix() ); // Plugin::Suffix() expands to .dll or .so according to the OS ... Catalog catalog; // this is the container of your objects // populate the catalog with some objects: catalog.Create( "ferrari_f430", "Car" ); catalog.Create( "maserati_granturismo", "Car" );
