Wallaroo 介绍
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" );
Wallaroo 官网
https://code.google.com/p/wallaroo/
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。