ngl_server 1.0
基于 Actor 模型的 C++ 服务器框架
tools_nhash.h File Reference

类型安全的命名哈希码生成器。 More...

#include "tools/tools/tools_thread.h"
#include "tools/log/nlog.h"
#include "tools/tools.h"
#include <limits>
#include <map>

Classes

struct  ngl::tools::nhashcode
 命名哈希码结构体。 More...
class  ngl::tools::nhash
 命名哈希码生成器。 More...

Namespaces

namespace  ngl::tools
 工具函数命名空间。

Detailed Description

类型安全的命名哈希码生成器。

提供基于类型的唯一哈希码生成机制,解决typeid().hash_code()可能的冲突问题。 通过类型名称和冲突消歧索引确保每个类型获得唯一的哈希码。