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
Next revision Both sides next revision
typing [2016/10/18 12:07]
christian [PDF Object Types]
typing [2017/04/14 09:00]
christian [The implementation]
Line 18: Line 18:
 </code> </code>
  
-  * ''name'' is a symbol used as type for the type declarations of an attribute.+  * ''name'' is a symbol used as type for the type declarations of an attribute. The name should be identical or very similar to the name used in the PDF specification.
   * ''supertype'' denotes the parent type. It is ''nil'' for the top PDF type ''Object''   * ''supertype'' denotes the parent type. It is ''nil'' for the top PDF type ''Object''
-  * ''section'' specifies the section of the PDF specification where the type is defined. This allows the PDF specification to be opened on the documentation of the type. +  * ''section'' specifies the section of the PDF specification where the type is defined. This will allow the PDF specification to be opened on the documentation of the type. 
   * ''documentation'' holds a short description of the type, usually copied (and slightly edited) from the first paragraph in the PDF specification.    * ''documentation'' holds a short description of the type, usually copied (and slightly edited) from the first paragraph in the PDF specification. 
   * ''version'' is optional and holds an integer specifying the minor PDF version (mayor version is 1) where the type was introduced. When omitted the version defaults to ''0'' (corresponding to PDF version 1.0).   * ''version'' is optional and holds an integer specifying the minor PDF version (mayor version is 1) where the type was introduced. When omitted the version defaults to ''0'' (corresponding to PDF version 1.0).
Line 32: Line 32:
 The following pragmas are used for declaring a type: The following pragmas are used for declaring a type:
  
-  * **#type:** *aSymbol* The value (or references) should be of type aSymbol+  * **#type:** *aSymbol* The value (or referenced value) should be of type aSymbol
   * **#typeDirect:** *aSymbol* The value should be of type aSymbol   * **#typeDirect:** *aSymbol* The value should be of type aSymbol
-  * **#typeIndirect:** *aSymbol* The value should be a reference of type aSymbol +  * **#typeIndirect:** *aSymbol* The value should be a reference to an object of type aSymbol 
-  * **#typeArrayOf:** *aSymbol* The value should be an array with values (or references) of type aSymbol +  * **#typeArrayOf:** *aSymbol* The value should be an array with values (or referenced values) of type aSymbol 
-  * **#typeDictionaryOf:** *aSymbol* The value should be a dictionary with values (or references) of type aSymbol+  * **#typeDictionaryOf:** *aSymbol* The value should be a dictionary with values (or referenced values) of type aSymbol
  
 The pragmas can occur several times. One of the given types should apply. The pragmas can occur several times. One of the given types should apply.
Line 84: Line 84:
  
 Rectangle>>ury Rectangle>>ury
-  <attribute: 4 documentation: 'upper right corner x'>+  <attribute: 4 documentation: 'upper right corner y'>
   ^self at: 4   ^self at: 4
 </code> </code>
Line 134: Line 134:
 </code> </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.
 +
 +
  
  • typing.txt
  • Last modified: 2017/09/27 18:45
  • by christian