首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > C/C++/VC++ > 对于C++的控制反转容器

对于C++的控制反转容器

  • 资源大小:37.98 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: 控制 对于 反转 容器

资 源 简 介

Inversion of control container for C++ (iocc) Easy to use Works with plain C++ objects No extra coding neaded No xml No macro No lib Support built-in (singleton, direct) and custom factories for object creation Support nested modules Typical iocc module Declaration (only Module.h, Module.cpp will generated by iocc): ``` class Module { private: IOC ioc; public: Module(): ioc(this) {} BIND< Log::Logger, SINGLETON< Log::STDLogger > > getLogger(); BIND< Service::GreetingService, SINGLETON< Service::GreetingService > > getGreetingService(); }; ``` Typical usage: ``` Module module; module.getGreetingService()->sayGreeting(); ``` During generation process iocc will resolve dependecies inside module (and it sub modules), and create all ne

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.246332s