ZCLibLog
载入中...
搜索中...
未找到
Public 类型 | Public 成员函数 | 静态 Public 成员函数 | 所有成员列表
ZCLibLog::executor类 参考

执行器包装类 更多...

#include <logger_types.hpp>

ZCLibLog::executor 的协作图:
Collaboration graph

Public 类型

using base_ptr_type = std::shared_ptr<executor_api>
 
using inside_type = base_ptr_type::element_type
 

Public 成员函数

 executor ()=default
 
 executor (inside_type *executor_ptr)
 通过裸指针构造
 
ZCLibLog_NODISCARD inside_typeget () const noexcept
 获取内部执行器的指针
 
ZCLibLog_NODISCARD bool unique () const noexcept
 获取执行器是否独占状态
 
ZCLibLog_NODISCARD long use_count () const noexcept
 获取执行器使用计数
 
inside_typeoperator-> () const noexcept
 访问内部执行器内部成员
 
inside_typeoperator* () const noexcept
 获取内部执行器对象
 
 operator bool () const noexcept
 判断执行器是否不为空
 

静态 Public 成员函数

template<typename Executor , typename... Args>
static executor make (Args &&... args)
 通过工厂函数构造
 

详细描述

执行器包装类

成员类型定义说明

◆ base_ptr_type

◆ inside_type

using ZCLibLog::executor::inside_type = base_ptr_type::element_type

构造及析构函数说明

◆ executor() [1/2]

ZCLibLog::executor::executor ( )
default

◆ executor() [2/2]

ZCLibLog::executor::executor ( inside_type * executor_ptr)
inline

通过裸指针构造

参数
executor_ptr执行器指针
警告
裸指针传入后禁止delete!
禁止取右值对象的地址传入

成员函数说明

◆ get()

ZCLibLog_NODISCARD inside_type * ZCLibLog::executor::get ( ) const
inlinenoexcept

获取内部执行器的指针

◆ make()

template<typename Executor , typename... Args>
static executor ZCLibLog::executor::make ( Args &&... args)
inlinestatic

通过工厂函数构造

模板参数
Executor执行器类
Args执行器类构造参数列表(自动推导)
参数
args执行器类构造参数
返回
包装执行器

◆ operator bool()

ZCLibLog::executor::operator bool ( ) const
inlinenoexcept

判断执行器是否不为空

◆ operator*()

inside_type & ZCLibLog::executor::operator* ( ) const
inlinenoexcept

获取内部执行器对象

◆ operator->()

inside_type * ZCLibLog::executor::operator-> ( ) const
inlinenoexcept

访问内部执行器内部成员

◆ unique()

ZCLibLog_NODISCARD bool ZCLibLog::executor::unique ( ) const
inlinenoexcept

获取执行器是否独占状态

◆ use_count()

ZCLibLog_NODISCARD long ZCLibLog::executor::use_count ( ) const
inlinenoexcept

获取执行器使用计数


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