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

位引用类 更多...

#include <bitmap.hpp>

类 bit_reference 继承关系图:
[图例]

Public 成员函数

constexpr bit_reference (uint32_t *ptr, const uint32_t mask) noexcept
 构造函数
constexpr bit_reference (const bit_reference &other) noexcept
 拷贝构造函数
constexpr bit_referenceoperator= (const bit_reference &other) noexcept
 拷贝赋值运算符
constexpr bit_reference (bit_reference &&other) noexcept
 移动构造函数
constexpr bit_referenceoperator= (bit_reference &&other) noexcept
 移动赋值运算符
constexpr bit_referenceoperator= (const bool value) noexcept
 赋值布尔值
constexpr operator bool () const noexcept
 转换为布尔值
constexpr void flip () const noexcept
 翻转位值
constexpr void swap (bit_reference &other) noexcept
 交换两个位引用
constexpr bool equal_to (const bit_reference &rhs) const noexcept
 相等比较操作符
constexpr bool less_than (const bit_reference &rhs) const noexcept
 小于比较操作符
constexpr size_t to_hash () const noexcept
 计算哈希值
constexpr string to_string () const
 转换为字符串
Public 成员函数 继承自 icomparable< bit_reference >
constexpr bool operator== (const bit_reference &rhs) const noexcept(noexcept(derived().equal_to(rhs)))
 相等比较运算符
constexpr bool operator!= (const bit_reference &rhs) const noexcept(noexcept(!(derived().equal_to(rhs))))
 不等比较运算符
constexpr bool operator< (const bit_reference &rhs) const noexcept(noexcept(derived().less_than(rhs)))
 小于比较运算符
constexpr bool operator> (const bit_reference &rhs) const noexcept(noexcept(rhs.less_than(derived())))
 大于比较运算符
constexpr bool operator<= (const bit_reference &rhs) const noexcept(noexcept(!(rhs.less_than(derived()))))
 小于等于比较运算符
constexpr bool operator>= (const bit_reference &rhs) const noexcept(noexcept(!(derived().less_than(rhs))))
 大于等于比较运算符
Public 成员函数 继承自 ihashable< bit_reference >
constexpr size_t to_ihash () const noexcept(noexcept(derived().to_hash()))
 获取对象的哈希值
Public 成员函数 继承自 istringify< bit_reference >
constexpr string to_string () const
 转换为字符串

详细描述

位引用类

提供对位图中单个位的引用语义,支持赋值、转换和翻转操作。 模拟布尔引用的行为,允许直接操作位图中的位。

在文件 bitmap.hpp33 行定义.

构造及析构函数说明

◆ bit_reference() [1/3]

bit_reference::bit_reference ( uint32_t * ptr,
const uint32_t mask )
inlineconstexprnoexcept

构造函数

参数
ptr指向字的指针
mask位掩码

在文件 bitmap.hpp47 行定义.

◆ bit_reference() [2/3]

bit_reference::bit_reference ( const bit_reference & other)
inlineconstexprnoexcept

拷贝构造函数

参数
other源位引用

在文件 bitmap.hpp55 行定义.

◆ bit_reference() [3/3]

bit_reference::bit_reference ( bit_reference && other)
inlineconstexprnoexcept

移动构造函数

参数
other源位引用

在文件 bitmap.hpp75 行定义.

成员函数说明

◆ equal_to()

bool bit_reference::equal_to ( const bit_reference & rhs) const
inlinenodiscardconstexprnoexcept

相等比较操作符

参数
rhs右侧位引用
返回
两个位是否相等

在文件 bitmap.hpp149 行定义.

◆ less_than()

bool bit_reference::less_than ( const bit_reference & rhs) const
inlinenodiscardconstexprnoexcept

小于比较操作符

参数
rhs右侧位引用
返回
比较结果(false < true)

在文件 bitmap.hpp158 行定义.

◆ operator bool()

bit_reference::operator bool ( ) const
inlineexplicitconstexprnoexcept

转换为布尔值

返回
位的布尔值

在文件 bitmap.hpp114 行定义.

◆ operator=() [1/3]

bit_reference & bit_reference::operator= ( bit_reference && other)
inlineconstexprnoexcept

移动赋值运算符

参数
other源位引用
返回
自身引用

在文件 bitmap.hpp87 行定义.

引用了 addressof().

◆ operator=() [2/3]

bit_reference & bit_reference::operator= ( const bit_reference & other)
inlineconstexprnoexcept

拷贝赋值运算符

参数
other源位引用
返回
自身引用

在文件 bitmap.hpp64 行定义.

引用了 addressof().

◆ operator=() [3/3]

bit_reference & bit_reference::operator= ( const bool value)
inlineconstexprnoexcept

赋值布尔值

参数
value要赋的值
返回
自身引用

在文件 bitmap.hpp102 行定义.

◆ swap()

void bit_reference::swap ( bit_reference & other)
inlineconstexprnoexcept

交换两个位引用

参数
other要交换的另一个位引用

在文件 bitmap.hpp135 行定义.

引用了 addressof().

◆ to_hash()

size_t bit_reference::to_hash ( ) const
inlinenodiscardconstexprnoexcept

计算哈希值

返回
哈希值

在文件 bitmap.hpp166 行定义.

◆ to_string()

string bit_reference::to_string ( ) const
inlinenodiscardconstexpr

转换为字符串

返回
"1"或"0"的字符串表示

在文件 bitmap.hpp174 行定义.


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