PageRenderTime 52ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/src/class-structure.scm

http://github.com/pablomarx/Thomas
Scheme | 169 lines | 108 code | 14 blank | 47 comment | 0 complexity | cb5a9eea9f87457657e4df58b5816577 MD5 | raw file
  1. ;* Copyright 1992 Digital Equipment Corporation
  2. ;* All Rights Reserved
  3. ;*
  4. ;* Permission to use, copy, and modify this software and its documentation is
  5. ;* hereby granted only under the following terms and conditions. Both the
  6. ;* above copyright notice and this permission notice must appear in all copies
  7. ;* of the software, derivative works or modified versions, and any portions
  8. ;* thereof, and both notices must appear in supporting documentation.
  9. ;*
  10. ;* Users of this software agree to the terms and conditions set forth herein,
  11. ;* and hereby grant back to Digital a non-exclusive, unrestricted, royalty-free
  12. ;* right and license under any changes, enhancements or extensions made to the
  13. ;* core functions of the software, including but not limited to those affording
  14. ;* compatibility with other hardware or software environments, but excluding
  15. ;* applications which incorporate this software. Users further agree to use
  16. ;* their best efforts to return to Digital any such changes, enhancements or
  17. ;* extensions that they make and inform Digital of noteworthy uses of this
  18. ;* software. Correspondence should be provided to Digital at:
  19. ;*
  20. ;* Director, Cambridge Research Lab
  21. ;* Digital Equipment Corp
  22. ;* One Kendall Square, Bldg 700
  23. ;* Cambridge MA 02139
  24. ;*
  25. ;* This software may be distributed (but not offered for sale or transferred
  26. ;* for compensation) to third parties, provided such third parties agree to
  27. ;* abide by the terms and conditions of this notice.
  28. ;*
  29. ;* THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  30. ;* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF
  31. ;* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
  32. ;* CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  33. ;* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  34. ;* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
  35. ;* ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  36. ;* SOFTWARE.
  37. ; $Id: class-structure.scm,v 1.4 1992/09/20 08:42:02 birkholz Exp $
  38. ;;;; Build the class structure for Dylan runtime environment.
  39. (define <object>
  40. (make-dylan-class '<object> '() '() #T))
  41. ;;;; Number classes
  42. ;;; Abstract
  43. (define <number>
  44. (make-dylan-class '<number> (list <object>) '() #F))
  45. ;;; Sealed
  46. (define <complex>
  47. (make-dylan-class '<complex> (list <number>) '() #F))
  48. (define <real>
  49. (make-dylan-class '<real> (list <complex>) '() #F))
  50. (define <rectangular-complex>
  51. (make-dylan-class '<rectangular-complex> (list <complex>) '() #F))
  52. (define <rational>
  53. (make-dylan-class '<rational> (list <real>) '() #F))
  54. (define <integer>
  55. (make-dylan-class '<integer> (list <rational>) '() #F))
  56. (define <ratio>
  57. (make-dylan-class '<ratio> (list <rational>) '() #F))
  58. (define <float>
  59. (make-dylan-class '<float> (list <real>) '() #F))
  60. (define <single-float>
  61. (make-dylan-class '<single-float> (list <float>) '() #F))
  62. (define <double-float>
  63. (make-dylan-class '<double-float> (list <float>) '() #F))
  64. (define <extended-float>
  65. (make-dylan-class '<extended-float> (list <float>) '() #F))
  66. ;;;; Collections
  67. ;;; Abstract
  68. (define <collection>
  69. (make-dylan-class '<collection> (list <object>) '() #F))
  70. (define <explicit-key-collection>
  71. (make-dylan-class '<explicit-key-collection> (list <collection>) '() #F))
  72. (define <mutable-collection>
  73. (make-dylan-class '<mutable-collection> (list <collection>) '() #F))
  74. (define <sequence>
  75. (make-dylan-class '<sequence> (list <collection>) '() #F))
  76. (define <mutable-explicit-key-collection>
  77. (make-dylan-class '<mutable-explicit-key-collection>
  78. (list <explicit-key-collection>
  79. <mutable-collection>) '() #F))
  80. (define <mutable-sequence>
  81. (make-dylan-class '<mutable-sequence>
  82. (list <mutable-collection> <sequence>) '() #F))
  83. ;;; Instantiable
  84. (define <array>
  85. (make-dylan-class '<array> (list <mutable-explicit-key-collection>) '() #F))
  86. (define <table>
  87. (make-dylan-class '<table> (list <mutable-explicit-key-collection>) '() #F))
  88. (define <vector>
  89. (make-dylan-class '<vector> (list <array> <mutable-sequence>) '() #F))
  90. (define <string>
  91. (make-dylan-class '<string> (list <mutable-sequence>) '() #F))
  92. (define <deque>
  93. (make-dylan-class '<deque> (list <mutable-sequence>) '() #F))
  94. (define <range>
  95. (make-dylan-class '<range> (list <sequence>) '() #F))
  96. (define <stretchy-vector>
  97. (make-dylan-class '<stretchy-vector> (list <vector>) '() #F))
  98. ;;; Sealed
  99. (define <simple-object-vector>
  100. (make-dylan-class '<simple-object-vector> (list <vector>) '() #F))
  101. (define <unicode-string>
  102. (make-dylan-class '<unicode-string> (list <vector> <string>) '() #F))
  103. (define <byte-string>
  104. (make-dylan-class '<byte-string> (list <vector> <string>) '() #F))
  105. (define <list>
  106. (make-dylan-class '<list> (list <mutable-sequence>) '() #F))
  107. (define <pair>
  108. (make-dylan-class '<pair> (list <list>) '() #F))
  109. (define <empty-list>
  110. (make-dylan-class '<empty-list> (list <list>) '() #F))
  111. ;;;; Conditions
  112. (define <condition>
  113. (make-dylan-class '<condition> (list <object>) '() #F))
  114. (define <serious-condition>
  115. (make-dylan-class '<serious-condition> (list <condition>) '() #F))
  116. (define <warning>
  117. (make-dylan-class '<warning> (list <condition>) '() #F))
  118. (define <restart>
  119. (make-dylan-class '<restart> (list <condition>) '() #F))
  120. (define <error>
  121. (make-dylan-class '<error> (list <serious-condition>) '() #F))
  122. (define <simple-error>
  123. (make-dylan-class '<simple-error> (list <error>) '() #F))
  124. (define <type-error>
  125. (make-dylan-class '<type-error> (list <error>) '() #F))
  126. (define <simple-warning>
  127. (make-dylan-class '<simple-warning> (list <warning>) '() #F))
  128. (define <simple-restart>
  129. (make-dylan-class '<simple-restart> (list <restart>) '() #F))
  130. (define <abort>
  131. (make-dylan-class '<abort> (list <restart>) '() #F))
  132. ;;;; Others
  133. (define <function> ; Abstract
  134. (make-dylan-class '<function> (list <object>) '() #F))
  135. (define <generic-function> ; Instantiable
  136. (make-dylan-class '<generic-function> (list <function>) '() #F))
  137. (define <method> ; Abstract
  138. (make-dylan-class '<method> (list <function>) '() #F))
  139. (define <class> ; Abstract
  140. (make-dylan-class '<class> (list <object>) '() #F))
  141. (define <slot-descriptor> ; Abstract
  142. (make-dylan-class '<slot-descriptor> (list <object>) '() #F))
  143. (define <singleton> ; Abstract
  144. (make-dylan-class '<singleton> (list <object>) '() #F))
  145. (define <symbol> ; Instantiable
  146. (make-dylan-class '<symbol> (list <object>) '() #F))
  147. (define <keyword> ; Instantiable
  148. (make-dylan-class '<keyword> (list <object>) '() #F))
  149. (define <character> ; Instantiable
  150. (make-dylan-class '<character> (list <object>) '() #F))