HLIBpro  2.0
Public Member Functions | List of all members
TTypeInfo Class Referenceabstract

Provides basic interface and methods for RTTI. More...

#include <TTypeInfo.hh>

Inheritance diagram for TTypeInfo:
TCluster TClusterBasis< T > TMatrix TVector TClusterBasis< complex > TClusterBasis< real > TGeomCluster TBlockMatrix TDenseMatrix TGhostMatrix TRkMatrix TSparseMatrix TUniformMatrix TZeroMatrix TBlockVector TDistrScalarVec TScalarVector TUniformVector

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
 

Detailed Description

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).