ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
ngl::tools::nhashcode Struct Reference

命名哈希码结构体。 More...

#include <tools_nhash.h>

Public Member Functions

 nhashcode (int64_t ahashcode, int32_t aindex)
 构造函数。
auto operator<=> (const nhashcode &ar) const
 三路比较运算符。

Public Attributes

int64_t m_hashcode = 0
 原始typeid(T).hash_code()值
int32_t m_index = 0
 相同hash_code值的冲突消歧索引

Detailed Description

命名哈希码结构体。

组合原始hash_code和冲突消歧索引,形成唯一的类型标识。 支持三路比较运算符用于有序容器存储。

Constructor & Destructor Documentation

◆ nhashcode()

ngl::tools::nhashcode::nhashcode ( int64_t ahashcode,
int32_t aindex )
inline

构造函数。

Parameters
ahashcode原始哈希码
aindex冲突消歧索引

Member Function Documentation

◆ operator<=>()

auto ngl::tools::nhashcode::operator<=> ( const nhashcode & ar) const
inline

三路比较运算符。

先比较hash_code,相同则比较index。


The documentation for this struct was generated from the following file: