User Tools

Site Tools


pdf:typing

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
pdf:typing [2015/04/02 16:14] – [Specializing] christianpdf:typing [2015/04/02 16:17] (current) – [specializes] christian
Line 65: Line 65:
  
 From the pragmas above types (instances of Type) are created when sending #typesOf: to a Dictionary with the attribute name as argument. Example: From the pragmas above types (instances of Type) are created when sending #typesOf: to a Dictionary with the attribute name as argument. Example:
-  Trailer new typesOf: #Root+<code smalltalk> 
 +Trailer new typesOf: #Root 
 +</code>
 returns returns
-  Array with: (IndirectType on: Catalog)+<code smalltalk> 
 +Array with: (IndirectType on: Catalog) 
 +</code>
  
-=== Extended typing ===+==== Extended typing ====
  
 Typing is extended to be able to group several classes in different implementation hierarchies into an abstract PDF Type. Typing is extended to be able to group several classes in different implementation hierarchies into an abstract PDF Type.
Line 81: Line 85:
 ==== subsumes ==== ==== subsumes ====
  
- PDFObject isType: aType+ 
 +<code smalltalk> 
 +PDFObject isType: aType 
 +</code>
 and and
- PDFObject class subsumes: aPDFObject+<code smalltalk> 
 +PDFObject class subsumes: aPDFObject 
 +</code>
 First, we need to know if an object is already of a specific type. If this is true, we leave it alone, since it is already what we wanted. First, we need to know if an object is already of a specific type. If this is true, we leave it alone, since it is already what we wanted.
  
Line 90: Line 99:
 ==== specializes ==== ==== specializes ====
  
- aPDFObject asType: aType+<code smalltalk> 
 +aPDFObject asType: aType 
 +</code>
 and and
- PDFObject class specializes: aPDFObject+<code smalltalk> 
 +PDFObject class specializes: aPDFObject 
 +</code>
 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.
  
/var/www/virtual/code4hl/html/dokuwiki/data/pages/pdf/typing.txt · Last modified: 2015/04/02 16:17 by christian