next up previous index
Next: RTTI Operation: Retrieving Up: Implementation of the Previous: Interface and Implementations

The Type_info Class

 

In this section we shall present the structure of the Type_info class and how that information, in conjunction with the virtual functions previously mentioned, can perform the RTTI operations we need.

Section 5.1 described the typeids as being proxies for Type_infos. This implies that the four main RTTI operations we want to support (see 3) must be implemented at Type_info level. As previously said, one Type_info is automatically constructed for each C++ class using RTTI. The access to these Type_infos is done only via Type_info pointers stored in typeids, so Type_infos are never copied or passed by value.

In the following we shall take each RTTI operation and describe in which way it is implemented inside Type_info and gradually build the representation of Type_info.





Alexandru Telea