zemu 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (285) hide show
  1. checksums.yaml +7 -0
  2. data/lib/zemu/config.rb +312 -0
  3. data/lib/zemu/instance.rb +179 -0
  4. data/lib/zemu.rb +172 -0
  5. data/src/debug.c +118 -0
  6. data/src/debug.h +30 -0
  7. data/src/external/Z/API/Z/ABIs/generic/allocator.h +36 -0
  8. data/src/external/Z/API/Z/ABIs/generic/cipher.h +47 -0
  9. data/src/external/Z/API/Z/ABIs/generic/data codec.h +33 -0
  10. data/src/external/Z/API/Z/ABIs/generic/emulation.h +103 -0
  11. data/src/external/Z/API/Z/ABIs/generic/hash function.h +33 -0
  12. data/src/external/Z/API/Z/ABIs/generic/module.h +33 -0
  13. data/src/external/Z/API/Z/ABIs/generic/wave codec.h +40 -0
  14. data/src/external/Z/API/Z/classes/base/InitializerList.hpp +34 -0
  15. data/src/external/Z/API/Z/classes/base/OpaqueFunctionPointer.hpp +26 -0
  16. data/src/external/Z/API/Z/classes/base/OpaqueMemberFunctionPointer.hpp +26 -0
  17. data/src/external/Z/API/Z/classes/base/Pair.hpp +46 -0
  18. data/src/external/Z/API/Z/classes/base/Range.hpp +111 -0
  19. data/src/external/Z/API/Z/classes/base/SizedString.hpp +66 -0
  20. data/src/external/Z/API/Z/classes/base/Status.hpp +89 -0
  21. data/src/external/Z/API/Z/classes/base/Symbol.hpp +39 -0
  22. data/src/external/Z/API/Z/classes/base/Tuple.hpp +111 -0
  23. data/src/external/Z/API/Z/classes/base/Value2D.hpp +389 -0
  24. data/src/external/Z/API/Z/classes/base/Value3D.hpp +368 -0
  25. data/src/external/Z/API/Z/classes/buffering/RingBuffer.hpp +93 -0
  26. data/src/external/Z/API/Z/classes/buffering/TripleBuffer.hpp +68 -0
  27. data/src/external/Z/API/Z/classes/functional/Functor.hpp +265 -0
  28. data/src/external/Z/API/Z/classes/functional/MemberFunction.hpp +98 -0
  29. data/src/external/Z/API/Z/classes/functional/ObjectMemberFunction.hpp +172 -0
  30. data/src/external/Z/API/Z/classes/functional/ObjectSelector.hpp +219 -0
  31. data/src/external/Z/API/Z/classes/functional/Selector.hpp +146 -0
  32. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABB.hpp +81 -0
  33. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABR.hpp +685 -0
  34. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Box.hpp +219 -0
  35. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Circle.hpp +80 -0
  36. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line2D.hpp +93 -0
  37. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line3D.hpp +80 -0
  38. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Rectangle.hpp +675 -0
  39. data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Sphere.hpp +0 -0
  40. data/src/external/Z/API/Z/classes/memory/Shared.hpp +90 -0
  41. data/src/external/Z/API/Z/constants/base.h +35 -0
  42. data/src/external/Z/API/Z/constants/chemical elements.h +6385 -0
  43. data/src/external/Z/API/Z/constants/numbers.h +963 -0
  44. data/src/external/Z/API/Z/constants/version.h +15 -0
  45. data/src/external/Z/API/Z/formats/character set/ASCII.h +158 -0
  46. data/src/external/Z/API/Z/formats/character set/DOS CP437.h +159 -0
  47. data/src/external/Z/API/Z/formats/character set/DOS CP737.h +159 -0
  48. data/src/external/Z/API/Z/formats/character set/DOS CP775.h +159 -0
  49. data/src/external/Z/API/Z/formats/character set/DOS CP850.h +159 -0
  50. data/src/external/Z/API/Z/formats/character set/DOS CP852.h +159 -0
  51. data/src/external/Z/API/Z/formats/character set/DOS CP855.h +159 -0
  52. data/src/external/Z/API/Z/formats/character set/DOS CP857.h +159 -0
  53. data/src/external/Z/API/Z/formats/character set/DOS CP858.h +159 -0
  54. data/src/external/Z/API/Z/formats/character set/DOS CP860.h +159 -0
  55. data/src/external/Z/API/Z/formats/character set/DOS CP861.h +159 -0
  56. data/src/external/Z/API/Z/formats/character set/DOS CP862.h +159 -0
  57. data/src/external/Z/API/Z/formats/character set/DOS CP863.h +159 -0
  58. data/src/external/Z/API/Z/formats/character set/DOS CP864.h +159 -0
  59. data/src/external/Z/API/Z/formats/character set/DOS CP865.h +159 -0
  60. data/src/external/Z/API/Z/formats/character set/DOS CP866.h +159 -0
  61. data/src/external/Z/API/Z/formats/character set/DOS CP869.h +159 -0
  62. data/src/external/Z/API/Z/formats/character set/DOS CP872.h +159 -0
  63. data/src/external/Z/API/Z/formats/character set/DOS CP874.h +159 -0
  64. data/src/external/Z/API/Z/formats/character set/Unicode.h +30119 -0
  65. data/src/external/Z/API/Z/formats/data model/I16LP32.h +19 -0
  66. data/src/external/Z/API/Z/formats/data model/ILP32.h +19 -0
  67. data/src/external/Z/API/Z/formats/data model/ILP64.h +19 -0
  68. data/src/external/Z/API/Z/formats/data model/IP16L32.h +19 -0
  69. data/src/external/Z/API/Z/formats/data model/LLP64.h +19 -0
  70. data/src/external/Z/API/Z/formats/data model/LP32.h +19 -0
  71. data/src/external/Z/API/Z/formats/data model/LP64.h +19 -0
  72. data/src/external/Z/API/Z/formats/data model/SILP64.h +19 -0
  73. data/src/external/Z/API/Z/formats/file system/FAT12.h +61 -0
  74. data/src/external/Z/API/Z/formats/floating-point/IEEE 754.h +141 -0
  75. data/src/external/Z/API/Z/formats/floating-point/x87.h +74 -0
  76. data/src/external/Z/API/Z/formats/image/ICNS.h +39 -0
  77. data/src/external/Z/API/Z/formats/keymap/Mac OS.h +284 -0
  78. data/src/external/Z/API/Z/formats/keymap/Z.h +141 -0
  79. data/src/external/Z/API/Z/formats/multimedia/Creative Voice.h +106 -0
  80. data/src/external/Z/API/Z/formats/multimedia/Microsoft Wave.h +49 -0
  81. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ACH.h +44 -0
  82. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/FRZ.h +54 -0
  83. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/PRG.h +33 -0
  84. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SEM.h +46 -0
  85. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SIT.h +34 -0
  86. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNA.h +117 -0
  87. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNP.h +37 -0
  88. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SP.h +62 -0
  89. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/Z80.h +117 -0
  90. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX.h +56 -0
  91. data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX82.h +70 -0
  92. data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/UNIF.h +26 -0
  93. data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/iNES.h +76 -0
  94. data/src/external/Z/API/Z/formats/storage medium image/audio/TAP.h +25 -0
  95. data/src/external/Z/API/Z/formats/storage medium image/audio/TZX.h +1185 -0
  96. data/src/external/Z/API/Z/formats/storage medium image/audio/Warajevo TAP.h +32 -0
  97. data/src/external/Z/API/Z/formats/storage medium image/floppy disk/FDI.h +45 -0
  98. data/src/external/Z/API/Z/functions/base/Z2D.h +583 -0
  99. data/src/external/Z/API/Z/functions/base/Z3D.h +712 -0
  100. data/src/external/Z/API/Z/functions/base/ZRange.h +137 -0
  101. data/src/external/Z/API/Z/functions/base/all.h +16 -0
  102. data/src/external/Z/API/Z/functions/base/casting.hpp +37 -0
  103. data/src/external/Z/API/Z/functions/base/character.h +38 -0
  104. data/src/external/Z/API/Z/functions/base/constructors.h +326 -0
  105. data/src/external/Z/API/Z/functions/base/structure.hpp +26 -0
  106. data/src/external/Z/API/Z/functions/base/type.hpp +60 -0
  107. data/src/external/Z/API/Z/functions/base/value.h +1901 -0
  108. data/src/external/Z/API/Z/functions/base/value.hpp +112 -0
  109. data/src/external/Z/API/Z/functions/buffering/ZRingBuffer.h +85 -0
  110. data/src/external/Z/API/Z/functions/buffering/ZTripleBuffer.h +65 -0
  111. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z2DLine.h +179 -0
  112. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z3DLine.h +168 -0
  113. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABB.h +361 -0
  114. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABR.h +1081 -0
  115. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZBox.h +340 -0
  116. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZCircle.h +142 -0
  117. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZRectangle.h +1267 -0
  118. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZSphere.h +156 -0
  119. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/all.h +18 -0
  120. data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/constructors.h +620 -0
  121. data/src/external/Z/API/Z/functions/time/date.h +29 -0
  122. data/src/external/Z/API/Z/hardware/CPU/architecture/6502.h +90 -0
  123. data/src/external/Z/API/Z/hardware/CPU/architecture/Z80.h +245 -0
  124. data/src/external/Z/API/Z/hardware/CPU/architecture/i4004.h +37 -0
  125. data/src/external/Z/API/Z/hardware/PSG/General Instrument/AY-3-891x.h +180 -0
  126. data/src/external/Z/API/Z/hardware/VDC/Ricoh/RP2C0x.h +625 -0
  127. data/src/external/Z/API/Z/hardware/bus/AGP.h +24 -0
  128. data/src/external/Z/API/Z/hardware/bus/USB.h +510 -0
  129. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Inves Spectrum +.h +47 -0
  130. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Pentagon.h +13 -0
  131. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Scorpion.h +13 -0
  132. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum + 128K.h +158 -0
  133. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +.h +82 -0
  134. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2.h +13 -0
  135. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2A.h +13 -0
  136. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +3.h +13 -0
  137. data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum.h +109 -0
  138. data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (NTSC).h +29 -0
  139. data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (PAL).h +29 -0
  140. data/src/external/Z/API/Z/hardware/machine/platform/computer/ZX Spectrum.h +405 -0
  141. data/src/external/Z/API/Z/hardware/machine/platform/console/Game Boy.h +49 -0
  142. data/src/external/Z/API/Z/hardware/machine/platform/console/Nintendo Entertainment System.h +350 -0
  143. data/src/external/Z/API/Z/hardware/storage medium/ROM cartridge/SNES Game Pak.h +238 -0
  144. data/src/external/Z/API/Z/inspection/C/completion.h +178 -0
  145. data/src/external/Z/API/Z/inspection/C/modules/C11.h +41 -0
  146. data/src/external/Z/API/Z/inspection/C/modules/C18.h +13 -0
  147. data/src/external/Z/API/Z/inspection/C/modules/C89.h +19 -0
  148. data/src/external/Z/API/Z/inspection/C/modules/C90.h +13 -0
  149. data/src/external/Z/API/Z/inspection/C/modules/C94.h +15 -0
  150. data/src/external/Z/API/Z/inspection/C/modules/C99.h +29 -0
  151. data/src/external/Z/API/Z/inspection/C/modules/KR C.h +19 -0
  152. data/src/external/Z/API/Z/inspection/C++/completion.h +512 -0
  153. data/src/external/Z/API/Z/inspection/C++/modules/C++03.h +15 -0
  154. data/src/external/Z/API/Z/inspection/C++/modules/C++11.h +80 -0
  155. data/src/external/Z/API/Z/inspection/C++/modules/C++14.h +26 -0
  156. data/src/external/Z/API/Z/inspection/C++/modules/C++17.h +55 -0
  157. data/src/external/Z/API/Z/inspection/C++/modules/C++85.h +11 -0
  158. data/src/external/Z/API/Z/inspection/C++/modules/C++89.h +13 -0
  159. data/src/external/Z/API/Z/inspection/C++/modules/C++98.h +17 -0
  160. data/src/external/Z/API/Z/inspection/C++.h +78 -0
  161. data/src/external/Z/API/Z/inspection/C.h +79 -0
  162. data/src/external/Z/API/Z/inspection/CPU/completion.h +56 -0
  163. data/src/external/Z/API/Z/inspection/CPU/detection.h +714 -0
  164. data/src/external/Z/API/Z/inspection/CPU/modules/6502.h +25 -0
  165. data/src/external/Z/API/Z/inspection/CPU/modules/AArch32.h +32 -0
  166. data/src/external/Z/API/Z/inspection/CPU/modules/AArch64.h +32 -0
  167. data/src/external/Z/API/Z/inspection/CPU/modules/Z80.h +26 -0
  168. data/src/external/Z/API/Z/inspection/CPU/modules/x86-32.h +31 -0
  169. data/src/external/Z/API/Z/inspection/CPU/modules/x86-64.h +312 -0
  170. data/src/external/Z/API/Z/inspection/CPU.h +209 -0
  171. data/src/external/Z/API/Z/inspection/OS/completion.h +36 -0
  172. data/src/external/Z/API/Z/inspection/OS/detection.h +768 -0
  173. data/src/external/Z/API/Z/inspection/OS/modules/Linux.h +22 -0
  174. data/src/external/Z/API/Z/inspection/OS/modules/MS-DOS.h +16 -0
  175. data/src/external/Z/API/Z/inspection/OS/modules/Mac OS X.h +23 -0
  176. data/src/external/Z/API/Z/inspection/OS/modules/Windows.h +19 -0
  177. data/src/external/Z/API/Z/inspection/OS/modules/iPhone OS.h +23 -0
  178. data/src/external/Z/API/Z/inspection/OS.h +236 -0
  179. data/src/external/Z/API/Z/inspection/Objective-C/completion.h +8 -0
  180. data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v1.0.h +11 -0
  181. data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v2.0.h +15 -0
  182. data/src/external/Z/API/Z/inspection/Objective-C.h +51 -0
  183. data/src/external/Z/API/Z/inspection/Z.h +19 -0
  184. data/src/external/Z/API/Z/inspection/build.h +22 -0
  185. data/src/external/Z/API/Z/inspection/character set.h +66 -0
  186. data/src/external/Z/API/Z/inspection/compiler/completion.h +2885 -0
  187. data/src/external/Z/API/Z/inspection/compiler/modules/Apple LLVM.h +26 -0
  188. data/src/external/Z/API/Z/inspection/compiler/modules/Clang.h +1664 -0
  189. data/src/external/Z/API/Z/inspection/compiler/modules/GCC.h +1366 -0
  190. data/src/external/Z/API/Z/inspection/compiler/modules/SCCZ80.h +473 -0
  191. data/src/external/Z/API/Z/inspection/compiler/modules/Visual C++.h +606 -0
  192. data/src/external/Z/API/Z/inspection/compiler/modules/cc65.h +529 -0
  193. data/src/external/Z/API/Z/inspection/compiler/modules/generic.h +13 -0
  194. data/src/external/Z/API/Z/inspection/compiler/modules/template.h +650 -0
  195. data/src/external/Z/API/Z/inspection/compiler.h +299 -0
  196. data/src/external/Z/API/Z/inspection/data model/completion.h +128 -0
  197. data/src/external/Z/API/Z/inspection/data model/deduction.h +9 -0
  198. data/src/external/Z/API/Z/inspection/data model/detection.h +45 -0
  199. data/src/external/Z/API/Z/inspection/data model.h +362 -0
  200. data/src/external/Z/API/Z/inspection/floating-point/completion.h +50 -0
  201. data/src/external/Z/API/Z/inspection/floating-point.h +324 -0
  202. data/src/external/Z/API/Z/inspection/language.h +163 -0
  203. data/src/external/Z/API/Z/inspection/platform/detection.h +9 -0
  204. data/src/external/Z/API/Z/inspection/platform.h +29 -0
  205. data/src/external/Z/API/Z/keys/C++.h +27 -0
  206. data/src/external/Z/API/Z/keys/C.h +29 -0
  207. data/src/external/Z/API/Z/keys/CPU.h +80 -0
  208. data/src/external/Z/API/Z/keys/OS.h +182 -0
  209. data/src/external/Z/API/Z/keys/Objective-C.h +17 -0
  210. data/src/external/Z/API/Z/keys/chemistry.h +26 -0
  211. data/src/external/Z/API/Z/keys/compiler.h +178 -0
  212. data/src/external/Z/API/Z/keys/data model.h +32 -0
  213. data/src/external/Z/API/Z/keys/endianness.h +24 -0
  214. data/src/external/Z/API/Z/keys/language.h +21 -0
  215. data/src/external/Z/API/Z/keys/layout.h +20 -0
  216. data/src/external/Z/API/Z/keys/mathematics/geometry.h +29 -0
  217. data/src/external/Z/API/Z/keys/mathematics/number.h +21 -0
  218. data/src/external/Z/API/Z/keys/order.h +18 -0
  219. data/src/external/Z/API/Z/keys/platform.h +87 -0
  220. data/src/external/Z/API/Z/keys/program.h +39 -0
  221. data/src/external/Z/API/Z/keys/science/chemical elements.h +200 -0
  222. data/src/external/Z/API/Z/keys/science/electricity.h +18 -0
  223. data/src/external/Z/API/Z/keys/science/magnetism.h +19 -0
  224. data/src/external/Z/API/Z/keys/status.h +69 -0
  225. data/src/external/Z/API/Z/keys/text.h +27 -0
  226. data/src/external/Z/API/Z/keys/value.h +88 -0
  227. data/src/external/Z/API/Z/macros/arguments.h +25 -0
  228. data/src/external/Z/API/Z/macros/casting.h +22 -0
  229. data/src/external/Z/API/Z/macros/character.h +159 -0
  230. data/src/external/Z/API/Z/macros/date.h +14 -0
  231. data/src/external/Z/API/Z/macros/key.h +20 -0
  232. data/src/external/Z/API/Z/macros/language.h +126 -0
  233. data/src/external/Z/API/Z/macros/language.hpp +81 -0
  234. data/src/external/Z/API/Z/macros/members.h +86 -0
  235. data/src/external/Z/API/Z/macros/pasting.h +308 -0
  236. data/src/external/Z/API/Z/macros/pointer.h +33 -0
  237. data/src/external/Z/API/Z/macros/repetition.h +283 -0
  238. data/src/external/Z/API/Z/macros/structure.h +104 -0
  239. data/src/external/Z/API/Z/macros/templating.h +407 -0
  240. data/src/external/Z/API/Z/macros/tokens.h +14 -0
  241. data/src/external/Z/API/Z/macros/type enumeration.h +43 -0
  242. data/src/external/Z/API/Z/macros/type selection.hpp +76 -0
  243. data/src/external/Z/API/Z/macros/value.h +489 -0
  244. data/src/external/Z/API/Z/macros/variadic pasting.h +21 -0
  245. data/src/external/Z/API/Z/macros/variadic selection.h +56 -0
  246. data/src/external/Z/API/Z/macros/variadic.h +46 -0
  247. data/src/external/Z/API/Z/macros/version.h +17 -0
  248. data/src/external/Z/API/Z/network/3/IP.h +36 -0
  249. data/src/external/Z/API/Z/network/4/TCP.h +24 -0
  250. data/src/external/Z/API/Z/network/4/UDP.h +26 -0
  251. data/src/external/Z/API/Z/network/7/ED2K.h +104 -0
  252. data/src/external/Z/API/Z/network/7/HTTP.h +100 -0
  253. data/src/external/Z/API/Z/traits/SelectType.hpp +71 -0
  254. data/src/external/Z/API/Z/traits/TernaryType.hpp +20 -0
  255. data/src/external/Z/API/Z/traits/Type.hpp +4516 -0
  256. data/src/external/Z/API/Z/traits/TypeCount.hpp +52 -0
  257. data/src/external/Z/API/Z/traits/TypeList.hpp +376 -0
  258. data/src/external/Z/API/Z/traits/base.hpp +19 -0
  259. data/src/external/Z/API/Z/traits/filtering.hpp +30 -0
  260. data/src/external/Z/API/Z/traits/mathematics.hpp +48 -0
  261. data/src/external/Z/API/Z/types/arguments.h +19 -0
  262. data/src/external/Z/API/Z/types/base.h +1655 -0
  263. data/src/external/Z/API/Z/types/base.hpp +169 -0
  264. data/src/external/Z/API/Z/types/buffering.h +27 -0
  265. data/src/external/Z/API/Z/types/mathematics.h +135 -0
  266. data/src/external/Z/API/Z/types/time.h +23 -0
  267. data/src/external/Z/COPYING.LESSER +165 -0
  268. data/src/external/Z/development/Qt Creator/Z.pro +253 -0
  269. data/src/external/Z/distribution/CocoaPods/Zeta.podspec +18 -0
  270. data/src/external/Z/distribution/Gentoo Linux/Zeta-0.1.ebuild +22 -0
  271. data/src/external/Z/distribution/Gentoo Linux/metadata.xml +8 -0
  272. data/src/external/Z/distribution/Homebrew/Zeta.rb +11 -0
  273. data/src/external/z80/API/emulation/CPU/Z80.h +201 -0
  274. data/src/external/z80/README.md +229 -0
  275. data/src/external/z80/building/premake4.lua +33 -0
  276. data/src/external/z80/development/Xcode/Z80.xcodeproj/project.pbxproj +520 -0
  277. data/src/external/z80/sources/Z80.c +1660 -0
  278. data/src/interrupt.c +6 -0
  279. data/src/interrupt.h +3 -0
  280. data/src/io.c.erb +115 -0
  281. data/src/io.h.erb +18 -0
  282. data/src/main.c +69 -0
  283. data/src/memory.c.erb +43 -0
  284. data/src/memory.h.erb +9 -0
  285. metadata +329 -0
@@ -0,0 +1,52 @@
1
+ /* Z Kit - traits/TypeCount.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_traits_TypeCount_HPP_
9
+ #define _Z_traits_TypeCount_HPP_
10
+
11
+ #include <Z/inspection/language.h>
12
+
13
+ #if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE) && \
14
+ Z_LANGUAGE_HAS_OPERATOR(CPP, SIZE_OF_PARAMETER_PACK)
15
+
16
+ namespace Zeta {template <class... T> struct TypeCount {
17
+ enum {value = sizeof...(T)};
18
+ };}
19
+
20
+ #else
21
+
22
+ # include <Z/types/base.hpp>
23
+ # include <Z/macros/repetition.h>
24
+ # include <Z/macros/tokens.h>
25
+
26
+ namespace Zeta {
27
+
28
+ template <
29
+ class T00 = NaT, class T01 = NaT, class T02 = NaT, class T03 = NaT,
30
+ class T04 = NaT, class T05 = NaT, class T06 = NaT, class T07 = NaT,
31
+ class T08 = NaT, class T09 = NaT, class T10 = NaT, class T11 = NaT,
32
+ class T12 = NaT, class T13 = NaT, class T14 = NaT, class T15 = NaT,
33
+ class T16 = NaT, class T17 = NaT, class T18 = NaT, class T19 = NaT,
34
+ class T20 = NaT, class T21 = NaT, class T22 = NaT, class T23 = NaT,
35
+ class T24 = NaT, class T25 = NaT, class T26 = NaT, class T27 = NaT,
36
+ class T28 = NaT, class T29 = NaT, class T30 = NaT, class T31 = NaT
37
+ > struct TypeCount {};
38
+
39
+ # define Z_TEMPLATE_SPECIALIZATION(parameter_count) \
40
+ template <Z_FOR_##parameter_count##_APPEND_INDEX(class T, Z_COMMA)> \
41
+ struct TypeCount<Z_FOR_##parameter_count##_APPEND_INDEX(T, Z_COMMA)> { \
42
+ enum {value = parameter_count}; \
43
+ };
44
+
45
+ Z_FOR_32_CALL_WITH_INDEX(Z_TEMPLATE_SPECIALIZATION, Z_EMPTY)
46
+ # undef Z_TEMPLATE_SPECIALIZATION
47
+
48
+ }
49
+
50
+ #endif
51
+
52
+ #endif // _Z_traits_TypeCount_HPP_
@@ -0,0 +1,376 @@
1
+ /* Z Kit - traits/TypeList.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_traits_TypeList_HPP_
9
+ #define _Z_traits_TypeList_HPP_
10
+
11
+ #include <Z/inspection/language.h>
12
+
13
+ #if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE_EXTENDED_PARAMETERS)
14
+ # define Z_HAS_TRAIT_TypeList TRUE
15
+ # define Z_HAS_TRAIT_TypeListSize TRUE
16
+ # define Z_HAS_TRAIT_TypeListAppend TRUE
17
+ # define Z_HAS_TRAIT_TypeListFirst TRUE
18
+ # define Z_HAS_TRAIT_TypeListGet TRUE
19
+ # define Z_HAS_TRAIT_TypeListJoin TRUE
20
+ # define Z_HAS_TRAIT_TypeListLast TRUE
21
+ # define Z_HAS_TRAIT_TypeListPrepend TRUE
22
+ # define Z_HAS_TRAIT_TypeListRename TRUE
23
+ # define Z_HAS_TRAIT_TypeListRemove TRUE
24
+ # define Z_HAS_TRAIT_TypeListRemoveFirst TRUE
25
+ # define Z_HAS_TRAIT_TypeListRemoveHead TRUE
26
+ # define Z_HAS_TRAIT_TypeListRemoveLast TRUE
27
+ # define Z_HAS_TRAIT_TypeListRemoveTail TRUE
28
+ # define Z_HAS_TRAIT_TypeListReverse TRUE
29
+ # define Z_HAS_TRAIT_TypeListRotateLeft TRUE
30
+ # define Z_HAS_TRAIT_TypeListRotateRight TRUE
31
+ # define Z_HAS_TRAIT_TypeListToFunction TRUE
32
+ # define Z_HAS_TRAIT_TypeListTransform TRUE
33
+ #else
34
+ # define Z_HAS_TRAIT_TypeList FALSE
35
+ # define Z_HAS_TRAIT_TypeListSize FALSE
36
+ # define Z_HAS_TRAIT_TypeListAppend FALSE
37
+ # define Z_HAS_TRAIT_TypeListFirst FALSE
38
+ # define Z_HAS_TRAIT_TypeListGet FALSE
39
+ # define Z_HAS_TRAIT_TypeListJoin FALSE
40
+ # define Z_HAS_TRAIT_TypeListLast FALSE
41
+ # define Z_HAS_TRAIT_TypeListPrepend FALSE
42
+ # define Z_HAS_TRAIT_TypeListRename FALSE
43
+ # define Z_HAS_TRAIT_TypeListRemove FALSE
44
+ # define Z_HAS_TRAIT_TypeListRemoveFirst FALSE
45
+ # define Z_HAS_TRAIT_TypeListRemoveHead FALSE
46
+ # define Z_HAS_TRAIT_TypeListRemoveLast FALSE
47
+ # define Z_HAS_TRAIT_TypeListRemoveTail FALSE
48
+ # define Z_HAS_TRAIT_TypeListReverse FALSE
49
+ # define Z_HAS_TRAIT_TypeListRotateLeft FALSE
50
+ # define Z_HAS_TRAIT_TypeListRotateRight FALSE
51
+ # define Z_HAS_TRAIT_TypeListToFunction FALSE
52
+ # define Z_HAS_TRAIT_TypeListTransform FALSE
53
+ #endif
54
+
55
+ #if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE_EXTENDED_PARAMETERS) && \
56
+ Z_LANGUAGE_HAS(CPP, TEMPLATE_ALIAS)
57
+
58
+ # define Z_TRAIT_TypeList_HAS_append TRUE
59
+ # define Z_TRAIT_TypeList_HAS_get TRUE
60
+ # define Z_TRAIT_TypeList_HAS_prepend TRUE
61
+ # define Z_TRAIT_TypeList_HAS_remove TRUE
62
+ # define Z_TRAIT_TypeList_HAS_remove_head TRUE
63
+ # define Z_TRAIT_TypeList_HAS_remove_tail TRUE
64
+ # define Z_TRAIT_TypeList_HAS_rename TRUE
65
+ # define Z_TRAIT_TypeList_HAS_rotate_left TRUE
66
+ # define Z_TRAIT_TypeList_HAS_rotate_right TRUE
67
+ # define Z_TRAIT_TypeList_HAS_to_function TRUE
68
+ # define Z_TRAIT_TypeList_HAS_transform TRUE
69
+ # define Z_HAS_TRAIT_ALIAS_type_list_append TRUE
70
+ # define Z_HAS_TRAIT_ALIAS_type_list_first TRUE
71
+ # define Z_HAS_TRAIT_ALIAS_type_list_get TRUE
72
+ # define Z_HAS_TRAIT_ALIAS_type_list_last TRUE
73
+ # define Z_HAS_TRAIT_ALIAS_type_list_prepend TRUE
74
+ # define Z_HAS_TRAIT_ALIAS_type_list_remove TRUE
75
+ # define Z_HAS_TRAIT_ALIAS_type_list_remove_first TRUE
76
+ # define Z_HAS_TRAIT_ALIAS_type_list_remove_head TRUE
77
+ # define Z_HAS_TRAIT_ALIAS_type_list_remove_last TRUE
78
+ # define Z_HAS_TRAIT_ALIAS_type_list_remove_tail TRUE
79
+ # define Z_HAS_TRAIT_ALIAS_type_list_rename TRUE
80
+ # define Z_HAS_TRAIT_ALIAS_type_list_reverse TRUE
81
+ # define Z_HAS_TRAIT_ALIAS_type_list_rotate_left TRUE
82
+ # define Z_HAS_TRAIT_ALIAS_type_list_rotate_right TRUE
83
+ # define Z_HAS_TRAIT_ALIAS_type_list_to_function TRUE
84
+ # define Z_HAS_TRAIT_ALIAS_type_list_transform TRUE
85
+ #else
86
+ # define Z_TRAIT_TypeList_HAS_append FALSE
87
+ # define Z_TRAIT_TypeList_HAS_get FALSE
88
+ # define Z_TRAIT_TypeList_HAS_prepend FALSE
89
+ # define Z_TRAIT_TypeList_HAS_remove FALSE
90
+ # define Z_TRAIT_TypeList_HAS_remove_head FALSE
91
+ # define Z_TRAIT_TypeList_HAS_remove_tail FALSE
92
+ # define Z_TRAIT_TypeList_HAS_rename FALSE
93
+ # define Z_TRAIT_TypeList_HAS_rotate_left FALSE
94
+ # define Z_TRAIT_TypeList_HAS_rotate_right FALSE
95
+ # define Z_TRAIT_TypeList_HAS_to_function FALSE
96
+ # define Z_TRAIT_TypeList_HAS_transform FALSE
97
+ # define Z_HAS_TRAIT_ALIAS_type_list_append FALSE
98
+ # define Z_HAS_TRAIT_ALIAS_type_list_first FALSE
99
+ # define Z_HAS_TRAIT_ALIAS_type_list_get FALSE
100
+ # define Z_HAS_TRAIT_ALIAS_type_list_last FALSE
101
+ # define Z_HAS_TRAIT_ALIAS_type_list_prepend FALSE
102
+ # define Z_HAS_TRAIT_ALIAS_type_list_remove FALSE
103
+ # define Z_HAS_TRAIT_ALIAS_type_list_remove_first FALSE
104
+ # define Z_HAS_TRAIT_ALIAS_type_list_remove_head FALSE
105
+ # define Z_HAS_TRAIT_ALIAS_type_list_remove_last FALSE
106
+ # define Z_HAS_TRAIT_ALIAS_type_list_remove_tail FALSE
107
+ # define Z_HAS_TRAIT_ALIAS_type_list_rename FALSE
108
+ # define Z_HAS_TRAIT_ALIAS_type_list_reverse FALSE
109
+ # define Z_HAS_TRAIT_ALIAS_type_list_rotate_left FALSE
110
+ # define Z_HAS_TRAIT_ALIAS_type_list_rotate_right FALSE
111
+ # define Z_HAS_TRAIT_ALIAS_type_list_to_function FALSE
112
+ # define Z_HAS_TRAIT_ALIAS_type_list_transform FALSE
113
+ #endif
114
+
115
+ #if Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE_EXTENDED_PARAMETERS)
116
+
117
+ # include <Z/traits/SelectType.hpp>
118
+ # include <Z/traits/TypeCount.hpp>
119
+
120
+ namespace Zeta {
121
+
122
+ template <class L> struct TypeListSize;
123
+
124
+ template <template <class...> class L, class... A> struct TypeListSize<L<A...> > {
125
+ enum {value = TypeCount<A...>::value};
126
+ };
127
+
128
+ template <class L, class... types> struct TypeListAppend;
129
+
130
+ template <template <class...> class L, class... A, class... T>
131
+ struct TypeListAppend<L<A...>, T...> {
132
+ typedef L<A..., T...> type;
133
+ };
134
+
135
+ template <class L> struct TypeListFirst;
136
+
137
+ template <template <class...> class L, class A>
138
+ struct TypeListFirst<L<A> > {
139
+ typedef A type;
140
+ };
141
+
142
+ template <template <class...> class L, class A0, class... A>
143
+ struct TypeListFirst<L<A0, A...> > {
144
+ typedef A0 type;
145
+ };
146
+
147
+ template <class L, UInt index> struct TypeListGet;
148
+
149
+ template <template <class...> class L, class... A, UInt I>
150
+ struct TypeListGet<L<A...>, I> {
151
+ typedef typename SelectType<I, A...>::type type;
152
+ };
153
+
154
+ template <class L0, class... L> struct TypeListJoin;
155
+
156
+ template <class L>
157
+ struct TypeListJoin<L> {
158
+ typedef L type;
159
+ };
160
+
161
+ template <class L0, template <class...> class L1, class... A1, class... L>
162
+ struct TypeListJoin<L0, L1<A1...>, L...> {
163
+ typedef typename TypeListJoin<typename TypeListAppend<L0, A1...>::type, L...>::type type;
164
+ };
165
+
166
+ template <class L> struct TypeListLast;
167
+
168
+ template <template <class...> class L, class A>
169
+ struct TypeListLast<L<A> > {
170
+ typedef A type;
171
+ };
172
+
173
+ template <template <class...> class L, class... A>
174
+ struct TypeListLast<L<A...> > {
175
+ typedef typename SelectType<TypeCount<A...>::value
176
+ ? TypeCount<A...>::value - 1
177
+ : 0, A...
178
+ >::type type;
179
+ };
180
+
181
+ template <class L, class... types> struct TypeListPrepend;
182
+
183
+ template <template <class...> class L, class... A, class... T>
184
+ struct TypeListPrepend<L<A...>, T...> {
185
+ typedef L<T..., A...> type;
186
+ };
187
+
188
+ template <class L, template <class...> class to> struct TypeListRename;
189
+
190
+ template <template <class...> class L, class... A, template <class...> class to>
191
+ struct TypeListRename<L<A...>, to> {
192
+ typedef to<A...> type;
193
+ };
194
+
195
+ template <class L, UInt index> struct TypeListRemove;
196
+
197
+ template <template <class...> class L, class A0, class... A>
198
+ struct TypeListRemove<L<A0, A...>, 0> {
199
+ typedef L<A...> type;
200
+ };
201
+
202
+ template <template <class...> class L, class A0, class... A, UInt I>
203
+ struct TypeListRemove<L<A0, A...>, I> {
204
+ typedef typename TypeListPrepend<typename TypeListRemove<L<A...>, I - 1>::type, A0>::type type;
205
+ };
206
+
207
+ template <class L> struct TypeListRemoveFirst;
208
+
209
+ template <template <class...> class L>
210
+ struct TypeListRemoveFirst<L<> > {
211
+ typedef L<> type;
212
+ };
213
+
214
+ template <template <class...> class L, class A0, class... A>
215
+ struct TypeListRemoveFirst<L<A0, A...> > {
216
+ typedef L<A...> type;
217
+ };
218
+
219
+ template <class L, UInt head_size> struct TypeListRemoveHead;
220
+
221
+ template <template <class...> class L, class... A>
222
+ struct TypeListRemoveHead<L<A...>, 0> {
223
+ typedef L<A...> type;
224
+ };
225
+
226
+ template <template <class...> class L, class... A, UInt S>
227
+ struct TypeListRemoveHead<L<A...>, S> {
228
+ typedef typename TypeListRemoveHead<typename TypeListRemoveFirst<L<A...> >::type, S - 1>::type type;
229
+ };
230
+
231
+ template <class L> struct TypeListRemoveLast;
232
+
233
+ template <template <class...> class L>
234
+ struct TypeListRemoveLast<L<> > {
235
+ typedef L<> type;
236
+ };
237
+
238
+ template <template <class...> class L, class... A>
239
+ struct TypeListRemoveLast<L<A...> > {
240
+ typedef typename TypeListRemove<L<A...>, TypeCount<A...>::value - 1>::type type;
241
+ };
242
+
243
+ template <class L, UInt tail_size> struct TypeListRemoveTail;
244
+
245
+ template <template <class...> class L, class... A>
246
+ struct TypeListRemoveTail<L<A...>, 0> {
247
+ typedef L<A...> type;
248
+ };
249
+
250
+ template <template <class...> class L, class... A, UInt S>
251
+ struct TypeListRemoveTail<L<A...>, S> {
252
+ typedef typename TypeListRemoveTail<typename TypeListRemoveLast<L<A...> >::type, S - 1>::type type;
253
+ };
254
+
255
+ template <class L> struct TypeListReverse;
256
+
257
+ template <template <class...> class L>
258
+ struct TypeListReverse<L<> > {
259
+ typedef L<> type;
260
+ };
261
+
262
+ template <template <class...> class L, class A0, class... A>
263
+ struct TypeListReverse<L<A0, A...> > {
264
+ typedef typename TypeListAppend<typename TypeListReverse<L<A...> >::type, A0>::type type;
265
+ };
266
+
267
+ template <class L, UInt rotation> struct TypeListRotateLeft;
268
+
269
+ template <template <class...> class L, UInt R>
270
+ struct TypeListRotateLeft<L<>, R> {
271
+ typedef L<> type;
272
+ };
273
+
274
+ template <template <class...> class L, class... A, UInt R>
275
+ struct TypeListRotateLeft<L<A...>, R> {
276
+ typedef typename TypeListJoin<
277
+ typename TypeListRemoveHead<L<A...>, R % TypeCount<A...>::value>::type,
278
+ typename TypeListRemoveTail<L<A...>, TypeCount<A...>::value - (R % TypeCount<A...>::value)>::type
279
+ >::type type;
280
+ };
281
+
282
+ template <class L, UInt rotation> struct TypeListRotateRight;
283
+
284
+ template <template <class...> class L, UInt R>
285
+ struct TypeListRotateRight<L<>, R> {
286
+ typedef L<> type;
287
+ };
288
+
289
+ template <template <class...> class L, class... A, UInt R>
290
+ struct TypeListRotateRight<L<A...>, R> {
291
+ typedef typename TypeListJoin<
292
+ typename TypeListRemoveHead<L<A...>, TypeCount<A...>::value - (R % TypeCount<A...>::value)>::type,
293
+ typename TypeListRemoveTail<L<A...>, R % TypeCount<A...>::value>::type
294
+ >::type type;
295
+ };
296
+
297
+ template <class L, class function_model> struct TypeListToFunction;
298
+
299
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) > {typedef R type(A...) ;};
300
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) const > {typedef R type(A...) const ;};
301
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) const volatile> {typedef R type(A...) const volatile;};
302
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) volatile> {typedef R type(A...) volatile;};
303
+
304
+ # if Z_LANGUAGE_HAS(CPP, REFERENCE_QUALIFIED_NON_STATIC_MEMBER_FUNCTION)
305
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) & > {typedef R type(A...) & ;};
306
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) &&> {typedef R type(A...) &&;};
307
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) const & > {typedef R type(A...) const & ;};
308
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) const &&> {typedef R type(A...) const &&;};
309
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) const volatile & > {typedef R type(A...) const volatile & ;};
310
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) const volatile &&> {typedef R type(A...) const volatile &&;};
311
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) volatile & > {typedef R type(A...) volatile & ;};
312
+ template <template <class...> class L, class... A, class R, class... P> struct TypeListToFunction<L<A...>, R(P...) volatile &&> {typedef R type(A...) volatile &&;};
313
+ # endif
314
+
315
+ template <class L, template <class...> class metafunction> struct TypeListTransform;
316
+
317
+ template <template <class...> class L, template <class...> class M>
318
+ struct TypeListTransform<L<>, M> {
319
+ typedef L<> type;
320
+ };
321
+
322
+ template <template <class...> class L, class A0, class... A, template <class...> class M>
323
+ struct TypeListTransform<L<A0, A...>, M> {
324
+ typedef typename TypeListPrepend<
325
+ typename TypeListTransform<L<A...>, M>::type,
326
+ typename M<A0>::type
327
+ >::type type;
328
+ };
329
+
330
+ template <class... A> struct TypeList {
331
+ enum {size = TypeCount<A...>::value};
332
+
333
+ typedef typename TypeListFirst <TypeList>::type first;
334
+ typedef typename TypeListLast <TypeList>::type last;
335
+ typedef typename TypeListRemoveFirst<TypeList>::type remove_first;
336
+ typedef typename TypeListRemoveLast <TypeList>::type remove_last;
337
+ typedef typename TypeListReverse <TypeList>::type reverse;
338
+
339
+ # if Z_LANGUAGE_HAS(CPP, TEMPLATE_ALIAS)
340
+ template <class... types > using append = TypeList<A..., types...>;
341
+ template <UInt index > using get = typename SelectType<index, A...>::type;
342
+ template <class... types > using prepend = TypeList<types..., A...>;
343
+ template <UInt index > using remove = typename TypeListRemove <TypeList, index >::type;
344
+ template <UInt head_size > using remove_head = typename TypeListRemoveHead <TypeList, head_size >::type;
345
+ template <UInt tail_size > using remove_tail = typename TypeListRemoveTail <TypeList, tail_size >::type;
346
+ template <template <class...> class to > using rename = typename TypeListRename <TypeList, to >::type;
347
+ template <UInt rotation > using rotate_left = typename TypeListRotateLeft <TypeList, rotation >::type;
348
+ template <UInt rotation > using rotate_right = typename TypeListRotateRight<TypeList, rotation >::type;
349
+ template <class function_model> using to_function = typename TypeListToFunction <TypeList, function_model>::type;
350
+ template <template <class...> class metafunction > using transform = typename TypeListTransform <TypeList, metafunction >::type;
351
+ # endif
352
+ };
353
+
354
+ # if Z_LANGUAGE_HAS(CPP, TEMPLATE_ALIAS)
355
+ template <class L, class... types > using type_list_append = typename TypeListAppend <L, types... >::type;
356
+ template <class L > using type_list_first = typename TypeListFirst <L >::type;
357
+ template <class L, UInt index > using type_list_get = typename TypeListGet <L, index >::type;
358
+ template <class L > using type_list_last = typename TypeListLast <L >::type;
359
+ template <class L, class... types > using type_list_prepend = typename TypeListPrepend <L, types... >::type;
360
+ template <class L, UInt index > using type_list_remove = typename TypeListRemove <L, index >::type;
361
+ template <class L > using type_list_remove_first = typename TypeListRemoveFirst<L >::type;
362
+ template <class L, UInt head_size > using type_list_remove_head = typename TypeListRemoveHead <L, head_size >::type;
363
+ template <class L > using type_list_remove_last = typename TypeListRemoveLast <L >::type;
364
+ template <class L, UInt head_size > using type_list_remove_tail = typename TypeListRemoveTail <L, head_size >::type;
365
+ template <class L, template <class...> class to > using type_list_rename = typename TypeListRename <L, to >::type;
366
+ template <class L > using type_list_reverse = typename TypeListReverse <L >::type;
367
+ template <class L, UInt rotation > using type_list_rotate_left = typename TypeListRotateLeft <L, rotation >::type;
368
+ template <class L, UInt rotation > using type_list_rotate_right = typename TypeListRotateRight<L, rotation >::type;
369
+ template <class L, class function_model> using type_list_to_function = typename TypeListToFunction <L, function_model>::type;
370
+ template <class L, template <class...> class metafunction > using type_list_transform = typename TypeListTransform <L, metafunction >::type;
371
+ # endif
372
+ }
373
+
374
+ #endif
375
+
376
+ #endif // _Z_traits_TypeList_HPP_
@@ -0,0 +1,19 @@
1
+ /* Z Kit - traits/base.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_traits_base_HPP_
9
+ #define _Z_traits_base_HPP_
10
+
11
+ #include <Z/macros/language.hpp>
12
+
13
+ namespace Zeta {
14
+ struct Empty {};
15
+ struct True {enum {value = true };};
16
+ struct False {enum {value = false};};
17
+ }
18
+
19
+ #endif // _Z_traits_base_HPP_
@@ -0,0 +1,30 @@
1
+ /* Z Kit - traits/filtering.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_traits_filtering_HPP_
9
+ #define _Z_traits_filtering_HPP_
10
+
11
+ #include <Z/types/base.hpp>
12
+
13
+ #if Z_LANGUAGE_HAS(CPP, SFINAE)
14
+
15
+ namespace Zeta {
16
+ template <Boolean B, class T> struct EnableIf {};
17
+ template <Boolean B, class T> struct DisableIf {};
18
+
19
+ template <class T> struct EnableIf <true, T> {typedef T type;};
20
+ template <class T> struct DisableIf<false, T> {typedef T type;};
21
+ }
22
+
23
+ # define Z_HAS_TRAIT_ENABLE_IF TRUE
24
+ # define Z_HAS_TRAIT_DISABLE_IF TRUE
25
+ #else
26
+ # define Z_HAS_TRAIT_ENABLE_IF FALSE
27
+ # define Z_HAS_TRAIT_DISABLE_IF FALSE
28
+ #endif
29
+
30
+ #endif // _Z_traits_filtering_HPP_
@@ -0,0 +1,48 @@
1
+ /* Z Kit - traits/mathematics.hpp
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_traits_mathematics_HPP_
9
+ #define _Z_traits_mathematics_HPP_
10
+
11
+ #include <Z/types/base.hpp>
12
+
13
+ namespace Zeta {
14
+
15
+ template <UIntMax N> struct Factorial {
16
+ enum {value = N * Factorial<N - 1>::value};
17
+ };
18
+
19
+ template <> struct Factorial<0> {enum {value = 1};};
20
+
21
+ template <UIntMax N> struct TriangularNumber {
22
+ enum {value = N + TriangularNumber<N - 1>::value};
23
+ };
24
+
25
+ template <> struct TriangularNumber<0> {enum {value = 0};};
26
+
27
+ template <UIntMax base, UIntMax exponent> struct NaturalPower {
28
+ enum {value = base * NaturalPower<base, exponent - 1>::value};
29
+ };
30
+
31
+ template <UIntMax base> struct NaturalPower<base, 0> {enum {value = 1};};
32
+
33
+ template <SIntMax base, UIntMax exponent> struct IntegerPower {
34
+ enum {value = base * IntegerPower<base, exponent - 1>::value};
35
+ };
36
+
37
+ template <SIntMax base> struct IntegerPower<base, 0> {enum {value = 1};};
38
+
39
+
40
+ template <UIntMax N> struct Logarithm2 {
41
+ enum {value = Logarithm2<N / 2>::value + 1};
42
+ };
43
+
44
+ template <> struct Logarithm2<1> {enum {value = 0};};
45
+ template <> struct Logarithm2<0> {enum {value = 0};};
46
+ }
47
+
48
+ #endif // _Z_traits_mathematics_HPP_
@@ -0,0 +1,19 @@
1
+ /* Z Kit - types/arguments.h
2
+ _____ _______________
3
+ /_ /_/ -_/_ _/ _ |
4
+ /____/\___/ /__//___/_| Kit
5
+ Copyright (C) 2006-2018 Manuel Sainz de Baranda y Goñi.
6
+ Released under the terms of the GNU Lesser General Public License v3. */
7
+
8
+ #ifndef _Z_types_arguments_H_
9
+ #define _Z_types_arguments_H_
10
+
11
+ #include <Z/inspection/compiler.h>
12
+
13
+ #if Z_COMPILER_HAS_TYPE(VAL)
14
+ typedef Z_COMPILER_TYPE(VAL) ZVAL;
15
+ #else
16
+ typedef void* ZVAL;
17
+ #endif
18
+
19
+ #endif /* _Z_types_arguments_H_ */