Sese Framework  x.y.z
A cross-platform framework
载入中...
搜索中...
未找到
sese::plugin::ClassFactory类 参考abstract

类工厂内建接口 更多...

#include <ClassFactory.h>

struct  RegisterInfo
 注册信息 更多...
 

Public 类型

using RegisterInfoMapType = std::map<std::string, RegisterInfo>
 

Public 成员函数

 ClassFactory () noexcept=default
 
 ClassFactory (ClassFactory &&class_factory)=delete
 
 ClassFactory (const ClassFactory &class_factory)=delete
 
virtual ~ClassFactory ()=default
 
virtual void init ()=0
 
BaseClass::Ptr createClassWithName (const std::string &id) noexcept
 
Result< BaseClass::PtrcreateClassWithNameEx (const std::string &id) noexcept
 
const RegisterInfoMapTypegetRegisterClassInfo () noexcept
 

Protected 属性

RegisterInfoMapType infoMap {}
 

详细描述

类工厂内建接口

成员类型定义说明

◆ RegisterInfoMapType

构造及析构函数说明

◆ ClassFactory() [1/3]

sese::plugin::ClassFactory::ClassFactory ( )
defaultnoexcept

◆ ClassFactory() [2/3]

sese::plugin::ClassFactory::ClassFactory ( ClassFactory && class_factory)
delete

◆ ClassFactory() [3/3]

sese::plugin::ClassFactory::ClassFactory ( const ClassFactory & class_factory)
delete

◆ ~ClassFactory()

virtual sese::plugin::ClassFactory::~ClassFactory ( )
virtualdefault

成员函数说明

◆ createClassWithName()

sese::plugin::BaseClass::Ptr sese::plugin::ClassFactory::createClassWithName ( const std::string & id)
noexcept

创建某个已注册类的实例

参数
id类注册名

◆ createClassWithNameEx()

sese::Result< sese::plugin::BaseClass::Ptr > sese::plugin::ClassFactory::createClassWithNameEx ( const std::string & id)
noexcept

◆ getRegisterClassInfo()

const sese::plugin::ClassFactory::RegisterInfoMapType & sese::plugin::ClassFactory::getRegisterClassInfo ( )
noexcept

获取已注册类的类型信息

返回
类信息映射表

引用了 infoMap.

◆ init()

virtual void sese::plugin::ClassFactory::init ( )
pure virtual

类成员变量说明

◆ infoMap

RegisterInfoMapType sese::plugin::ClassFactory::infoMap {}
protected

被这些函数引用 getRegisterClassInfo().


该类的文档由以下文件生成: