Classe type_index
A classe type_index
encapsula um ponteiro para a Classe type_info para auxiliar na indexação por esses objetos.
class type_index { public: type_index(const type_info& tinfo); const char *name() const; size_t hash_code() const; bool operator==(const type_info& right) const; bool operator!=(const type_info& right) const; bool operator<(const type_info& right) const; bool operator<=(const type_info& right) const; bool operator>(const type_info& right) const; bool operator>=(const type_info& right) const; };
O construtor inicializa ptr
para &tinfo
.
name
retorna ptr->name()
.
hash_code
retorna ptr->hash_code()
.
operator==
retorna *ptr == right.ptr
.
operator!=
retorna !(*this == right)
.
operator<
retorna *ptr->before(*right.ptr)
.
operator<=
retorna !(right < *this)
.
operator>
retorna right < *this
.
operator>=
retorna !(*this < right)
.