Skip to content

Class endstone::ClassInfo

ClassList > endstone > ClassInfo

A type identity that stays comparable across shared library boundaries. More...

  • #include <endstone/object.h>

Public Functions

Type Name
ClassInfo (const std::type_info & info) noexcept
const std::type_info & info () noexcept const
The underlying std::type_info .
const char * name () noexcept const
The mangled name of the type.
bool operator== (const ClassInfo & other) noexcept const

Detailed Description

libc++ compares std::type_info by address, and a type named from more than one shared library has one typeinfo per module once those modules are built with hidden visibility, as endstone and its plugins are. Comparing the mangled name instead lets a type named in a plugin match the same type named in the runtime.

Public Functions Documentation

function ClassInfo

inline endstone::ClassInfo::ClassInfo (
    const std::type_info & info
) noexcept

function info

The underlying std::type_info .

inline const std::type_info & endstone::ClassInfo::info () noexcept const


function name

The mangled name of the type.

inline const  char * endstone::ClassInfo::name () noexcept const


function operator==

inline bool endstone::ClassInfo::operator== (
    const  ClassInfo & other
) noexcept const


The documentation for this class was generated from the following file include/endstone/object.h