Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
typing [2017/04/13 18:32]
christian [PDF type hierarchy]
typing [2017/09/27 18:45] (current)
christian [Typed Attributes]
Line 44: Line 44:
   <typeArrayOf: #Contents>   <typeArrayOf: #Contents>
 </code> </code>
-The symbol is the type name of the PDF object. So far, the type name corresponds to the class name in the Smalltalk implementation hierarchy.+This declares that the attribute #Contents of a Page can hold either  
 +  * a Contents object or  
 +  * an array of Contents objects.
  
 A type of an object is used when it gets assigned to an attribute. With the type requirement of the attribute, the object is specialized to the attribute type if possible. If this is not possible, a TypeError is raised.  A type of an object is used when it gets assigned to an attribute. With the type requirement of the attribute, the object is specialized to the attribute type if possible. If this is not possible, a TypeError is raised. 
Line 135: Line 137:
 When an object is not a subclass of a type, it can be specialized if the objects class subsumes the type. When an object is not a subclass of a type, it can be specialized if the objects class subsumes the type.
  
-==== PDF type hierarchy ==== 
  
-The type hierarchy of PDF objects is shallow and oriented by the use of types in attributes, not by class membership. For example, there are no subtypes of Dictionary or Stream. 
- 
-===== The implementation ===== 
- 
-{{:2017-04-13_typing_sequence_diagram.jpg?200|}} 
  
  • typing.1492101125.txt.gz
  • Last modified: 2017/04/13 18:32
  • by christian