NexusForce 1.0.0
A rigorously engineered full-stack C++ backend library.
载入中...
搜索中...
未找到
neforce::tui::const_ref< T > 模板类 参考

只读引用适配器 更多...

#include <ref.hpp>

Public 成员函数

 const_ref ()
 默认构造
 const_ref (T value)
 从值构造
 const_ref (const T *ptr)
 从常量指针构造
const T & operator* () const
 解引用
const T * operator-> () const
 成员访问
const T & operator() () const
 调用运算符
bool holds_pointer () const noexcept
 检查是否绑定外部指针

详细描述

template<typename T>
class neforce::tui::const_ref< T >

只读引用适配器

模板参数
T值类型

可持有 const T 值或引用外部 const T*。

在文件 ref.hpp122 行定义.

构造及析构函数说明

◆ const_ref() [1/2]

template<typename T>
neforce::tui::const_ref< T >::const_ref ( T value)
inline

从值构造

参数
value

在文件 ref.hpp134 行定义.

引用了 neforce::move().

◆ const_ref() [2/2]

template<typename T>
neforce::tui::const_ref< T >::const_ref ( const T * ptr)
inline

从常量指针构造

参数
ptr外部常量指针

在文件 ref.hpp141 行定义.

成员函数说明

◆ holds_pointer()

template<typename T>
bool neforce::tui::const_ref< T >::holds_pointer ( ) const
inlinenodiscardnoexcept

检查是否绑定外部指针

返回
是否借用外部状态

在文件 ref.hpp171 行定义.

被这些函数引用 operator*().

◆ operator()()

template<typename T>
const T & neforce::tui::const_ref< T >::operator() ( ) const
inline

调用运算符

返回
常量引用

在文件 ref.hpp165 行定义.

引用了 operator*().

◆ operator*()

template<typename T>
const T & neforce::tui::const_ref< T >::operator* ( ) const
inline

解引用

返回
常量引用

在文件 ref.hpp148 行定义.

引用了 neforce::get() , 以及 holds_pointer().

被这些函数引用 operator()() , 以及 operator->().

◆ operator->()

template<typename T>
const T * neforce::tui::const_ref< T >::operator-> ( ) const
inline

成员访问

返回
常量指针

在文件 ref.hpp159 行定义.

引用了 operator*().


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