ocean::ArgumentPointer
大约 2 分钟
ocean::ArgumentPointer
通用指针
#include <ArgumentPointer.hpp>
Public Types
Name | |
---|---|
typedef std::function< void(std::shared_ptr< void > &)> | Releaser 释放操作 |
Public Functions
Name | |
---|---|
ArgumentPointer() =delete 删除操作支持 | |
ArgumentPointer(ArgumentPointer & ) =delete 删除操作支持 | |
ArgumentPointer(const ArgumentPointer & ) =delete 删除操作支持 | |
ArgumentPointer(ArgumentPointer && ) =delete 删除操作支持 | |
ArgumentPointer & | operator=(ArgumentPointer & ) =delete 删除操作支持 |
ArgumentPointer & | operator=(const ArgumentPointer & ) =delete 删除操作支持 |
virtual | ~ArgumentPointer() 释放指针 |
const std::shared_ptr< void > & | getPointer() const 获取指针 |
void | setPointer(const std::shared_ptr< void > & pointer_) 设置指针 |
std::shared_ptr< ArgumentPointer > | makeContainer(const std::shared_ptr< void > & pointer_, const Releaser & releaser_) 构建通用指针 |
template <class T > std::shared_ptr< ArgumentPointer > | makeContainer(const std::shared_ptr< T > & pointer_) 构建通用指针模板 |
Protected Functions
Name | |
---|---|
ArgumentPointer(const std::shared_ptr< void > & pointer_, const Releaser & releaser_) 构建通用指针 |
Protected Attributes
Name | |
---|---|
std::shared_ptr< void > | pointer 指针 |
Releaser | releaser 释放操作 |
Public Types Documentation
typedef Releaser
typedef std::function<void(std::shared_ptr<void> &)> ocean::ArgumentPointer::Releaser;
释放操作
Public Functions Documentation
function ArgumentPointer
ArgumentPointer() =delete
删除操作支持
function ArgumentPointer
ArgumentPointer(
ArgumentPointer &
) =delete
删除操作支持
function ArgumentPointer
ArgumentPointer(
const ArgumentPointer &
) =delete
删除操作支持
function ArgumentPointer
ArgumentPointer(
ArgumentPointer &&
) =delete
删除操作支持
function operator=
ArgumentPointer & operator=(
ArgumentPointer &
) =delete
删除操作支持
function operator=
ArgumentPointer & operator=(
const ArgumentPointer &
) =delete
删除操作支持
function ~ArgumentPointer
inline virtual ~ArgumentPointer()
释放指针
function getPointer
inline const std::shared_ptr< void > & getPointer() const
获取指针
Return: 指针
function setPointer
inline void setPointer(
const std::shared_ptr< void > & pointer_
)
设置指针
Parameters:
- pointer_
function makeContainer
static inline std::shared_ptr< ArgumentPointer > makeContainer(
const std::shared_ptr< void > & pointer_,
const Releaser & releaser_
)
构建通用指针
Parameters:
- pointer_ 指针
- releaser_ 释放操作
Return: 通用指针
function makeContainer
template <class T >
static inline std::shared_ptr< ArgumentPointer > makeContainer(
const std::shared_ptr< T > & pointer_
)
构建通用指针模板
Parameters:
- pointer_ 指针
Template Parameters:
- T 数据类型
Return: 通用指针
Protected Functions Documentation
function ArgumentPointer
inline ArgumentPointer(
const std::shared_ptr< void > & pointer_,
const Releaser & releaser_
)
构建通用指针
Parameters:
- pointer_ 指针
- releaser_ 释放操作
Protected Attributes Documentation
variable pointer
std::shared_ptr< void > pointer;
指针
variable releaser
Releaser releaser;
释放操作
Updated on 2022-08-19 at 17:14:26 +0800