C.2 XPCE's objects

More concretely, a XPCE object is a set of values of instance variables bundled into a single entity which is referred to by its object reference. An object is an instantiation of a class. A class holds the key to decoding the information of its instances:16We will mix the terms instance and object freely in this document. They are considered synonyms. the instance variables. The class also serves as a placeholder for storing the methods understood by its instances. Figure 41 illustrates this.

Figure 41 : Classes and Objects in XPCE

C.2.1 Classes

As explained above, a XPCE class describes the storage-layout and the methods of its instances. In XPCE a class is a normal object. It is an instance of class class.17Class class is an instance of itself. In other systems (SmallTalk, Goldberg & Robson, 1983), classes are instances of a meta-class. Yet in other systems, classes have a completely different status (for example widgets in the X11 Intrinsics) As in most OO systems XPCE classes may inherit from a super-class. XPCE classes are organised in a single-inheritance hierarchy.18Multiple inheritance introduces various technical and conceptual problems. XPCE uses delegation and templates to achieve similar results. This is explained in section C.4 and section 7.5.2.1. The root of this hierarchy is class object. Class object is the only class without a super-class. Figure 42 gives the complete hierarchy of XPCE built-in classes.

Figure 42 : XPCE's Class hierarchy