struct ov::DiscreteTypeInfo¶
Overview¶
Type information for a type system without inheritance; instances have exactly one type not related to any other type. More…
#include <type.hpp>
struct DiscreteTypeInfo
{
// fields
const char \* name;
const char \* version_id;
const DiscreteTypeInfo \* parent;
// construction
DiscreteTypeInfo();
DiscreteTypeInfo();
DiscreteTypeInfo();
DiscreteTypeInfo(, , );
DiscreteTypeInfo(, );
// methods
DiscreteTypeInfo&const DiscreteTypeInfo& operator = ();
boolconst DiscreteTypeInfo& is_castable() const;
std::string get_version() const;
boolconst DiscreteTypeInfo& operator < () const;
boolconst DiscreteTypeInfo& operator <= () const;
boolconst DiscreteTypeInfo& operator > () const;
boolconst DiscreteTypeInfo& operator >= () const;
boolconst DiscreteTypeInfo& operator == () const;
boolconst DiscreteTypeInfo& operator != () const;
operator std::string () const;
size_t hash() const;
size_t hash();
};
Detailed Documentation¶
Type information for a type system without inheritance; instances have exactly one type not related to any other type.
Supports three functions, ov::is_type<Type>, ov::as_type<Type>, and ov::as_type_ptr<Type> for type-safe dynamic conversions via static_cast/static_ptr_cast without using C++ RTTI. Type must have a static type_info member and a virtual get_type_info() member that returns a reference to its type_info member.