NexusForce 1.0.0
A Modern C++ Library with extended functionality, web components, and utility libraries
载入中...
搜索中...
未找到
plugin_deleter结构体 参考

插件自定义删除器 更多...

#include <iplugin.hpp>

Public 类型

using deleter_type = void (*)(iplugin*)
 删除函数类型

Public 成员函数

 plugin_deleter () noexcept=default
 默认构造函数
 ~plugin_deleter ()=default
 析构函数
 plugin_deleter (deleter_type func) noexcept
 构造函数
 plugin_deleter (plugin_deleter &&other) noexcept
 移动构造函数
plugin_deleteroperator= (plugin_deleter &&other) noexcept
 移动赋值运算符
void operator() (iplugin *plugin) const noexcept(is_nothrow_invocable_v< deleter_type, iplugin * >)
 函数调用运算符
plugin_deleter rebind () &&noexcept
 重新绑定删除器

详细描述

插件自定义删除器

用于 unique_ptr 管理插件对象的生命周期。 通过函数指针调用插件库提供的删除函数。

在文件 iplugin.hpp80 行定义.

构造及析构函数说明

◆ plugin_deleter() [1/2]

plugin_deleter::plugin_deleter ( deleter_type func)
inlineexplicitnoexcept

构造函数

参数
func删除函数指针

在文件 iplugin.hpp102 行定义.

引用了 plugin_deleter().

◆ plugin_deleter() [2/2]

plugin_deleter::plugin_deleter ( plugin_deleter && other)
inlinenoexcept

移动构造函数

参数
other被移动的删除器

在文件 iplugin.hpp112 行定义.

引用了 plugin_deleter().

成员函数说明

◆ operator()()

void plugin_deleter::operator() ( iplugin * plugin) const
inlinenoexcept

函数调用运算符

参数
plugin要删除的插件指针

调用实际的删除函数销毁插件对象。

在文件 iplugin.hpp134 行定义.

引用了 is_nothrow_invocable_v.

◆ operator=()

plugin_deleter & plugin_deleter::operator= ( plugin_deleter && other)
inlinenoexcept

移动赋值运算符

参数
other被移动的删除器
返回
自身引用

在文件 iplugin.hpp122 行定义.

引用了 plugin_deleter().

◆ rebind()

plugin_deleter plugin_deleter::rebind ( ) &&
inlinenoexcept

重新绑定删除器

返回
新的删除器

用于在移动语义中获取新的删除器实例。

在文件 iplugin.hpp146 行定义.

引用了 move() , 以及 plugin_deleter().


该结构体的文档由以下文件生成: