The simplest information is a textual type name associated with each Type_info. In order to implement this, Type_info will internally store a char* which encodes the textual name of the type it represents. The name information is passed to Type_info at construction. When a typeid is asked the type name it will delegate this reauest to its Type_name 'body' (Figure 3). This is, for example, the way the TYPE_NAME macro is implemented.
Figure 3: Implementation of type names in the Type_info class. The
double arrow shows the message passing sense.