libxr 1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
TypeID Class Reference

类型标识符生成器,替代 typeid More...

#include <libxr_type.hpp>

Public Types

using ID = const void *
 

Static Public Member Functions

template<typename T >
static ID GetID ()
 获取类型的唯一标识符
 

Detailed Description

类型标识符生成器,替代 typeid

Type identifier generator (RTTI-free)

Definition at line 224 of file libxr_type.hpp.

Member Typedef Documentation

◆ ID

using TypeID::ID = const void *

Definition at line 227 of file libxr_type.hpp.

Member Function Documentation

◆ GetID()

template<typename T >
static ID TypeID::GetID ( )
inlinestatic

获取类型的唯一标识符

Get unique identifier for type T

Template Parameters
T目标类型 / Target type
Returns
类型唯一标识符指针 / Unique type identifier pointer

Definition at line 235 of file libxr_type.hpp.

236 {
237 static char id; // NOLINT
238 return &id;
239 }

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