HLIBpro
2.1
|
Provides basic interface and methods for RTTI. More...
#include <TTypeInfo.hh>
Public Member Functions | |
virtual typeid_t | type () const =0 |
return type ID of object | |
virtual bool | is_type (const typeid_t t) const |
return true if local object is of given type ID t | |
virtual std::string | typestr () const |
return string representation of type | |
In 𝓗𝖫𝖨𝖡𝗉𝗋𝗈 an independent RTTI system is used to simplify type checks and provide readable output, e.g. in error messages.
All classes that should be handled by this RTTI have to be derived from TTypeInfo and must implement the functions "type" and "is_type" (for hierarchical type checks, e.g. test against base classes).