|
BIMHome v1.0.0
BIMHome接口文档说明
|
工厂类 更多...
#include <Factory.h>
Public 成员函数 | |
| void | AddProducer (const char *sClassName, AbstractProducer *pcProducer) |
| 添加新的生产者实例 | |
| std::list< std::string > | CanProduce () const |
| 获取所有注册的生产者列表 | |
| bool | CanProduce (const char *sClassName) const |
| 检查是否有注册的生产者 | |
Protected 成员函数 | |
| Factory () | |
| void * | Produce (const char *sClassName) const |
| 根据类名生产对象 | |
| virtual | ~Factory () |
Protected 属性 | |
| std::map< const std::string, AbstractProducer * > | _mpcProducers |
| 生产者映射 | |
工厂类
用于在运行时生产编译时未知类的实例。它持有一个生产者映射,这些生产者能够生产特定类的实例。 生产者可以通过应用程序模块等在运行时注册。