zemu 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/zemu/config.rb +312 -0
- data/lib/zemu/instance.rb +179 -0
- data/lib/zemu.rb +172 -0
- data/src/debug.c +118 -0
- data/src/debug.h +30 -0
- data/src/external/Z/API/Z/ABIs/generic/allocator.h +36 -0
- data/src/external/Z/API/Z/ABIs/generic/cipher.h +47 -0
- data/src/external/Z/API/Z/ABIs/generic/data codec.h +33 -0
- data/src/external/Z/API/Z/ABIs/generic/emulation.h +103 -0
- data/src/external/Z/API/Z/ABIs/generic/hash function.h +33 -0
- data/src/external/Z/API/Z/ABIs/generic/module.h +33 -0
- data/src/external/Z/API/Z/ABIs/generic/wave codec.h +40 -0
- data/src/external/Z/API/Z/classes/base/InitializerList.hpp +34 -0
- data/src/external/Z/API/Z/classes/base/OpaqueFunctionPointer.hpp +26 -0
- data/src/external/Z/API/Z/classes/base/OpaqueMemberFunctionPointer.hpp +26 -0
- data/src/external/Z/API/Z/classes/base/Pair.hpp +46 -0
- data/src/external/Z/API/Z/classes/base/Range.hpp +111 -0
- data/src/external/Z/API/Z/classes/base/SizedString.hpp +66 -0
- data/src/external/Z/API/Z/classes/base/Status.hpp +89 -0
- data/src/external/Z/API/Z/classes/base/Symbol.hpp +39 -0
- data/src/external/Z/API/Z/classes/base/Tuple.hpp +111 -0
- data/src/external/Z/API/Z/classes/base/Value2D.hpp +389 -0
- data/src/external/Z/API/Z/classes/base/Value3D.hpp +368 -0
- data/src/external/Z/API/Z/classes/buffering/RingBuffer.hpp +93 -0
- data/src/external/Z/API/Z/classes/buffering/TripleBuffer.hpp +68 -0
- data/src/external/Z/API/Z/classes/functional/Functor.hpp +265 -0
- data/src/external/Z/API/Z/classes/functional/MemberFunction.hpp +98 -0
- data/src/external/Z/API/Z/classes/functional/ObjectMemberFunction.hpp +172 -0
- data/src/external/Z/API/Z/classes/functional/ObjectSelector.hpp +219 -0
- data/src/external/Z/API/Z/classes/functional/Selector.hpp +146 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABB.hpp +81 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/AABR.hpp +685 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Box.hpp +219 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Circle.hpp +80 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line2D.hpp +93 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Line3D.hpp +80 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Rectangle.hpp +675 -0
- data/src/external/Z/API/Z/classes/mathematics/geometry/euclidean/Sphere.hpp +0 -0
- data/src/external/Z/API/Z/classes/memory/Shared.hpp +90 -0
- data/src/external/Z/API/Z/constants/base.h +35 -0
- data/src/external/Z/API/Z/constants/chemical elements.h +6385 -0
- data/src/external/Z/API/Z/constants/numbers.h +963 -0
- data/src/external/Z/API/Z/constants/version.h +15 -0
- data/src/external/Z/API/Z/formats/character set/ASCII.h +158 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP437.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP737.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP775.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP850.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP852.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP855.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP857.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP858.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP860.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP861.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP862.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP863.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP864.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP865.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP866.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP869.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP872.h +159 -0
- data/src/external/Z/API/Z/formats/character set/DOS CP874.h +159 -0
- data/src/external/Z/API/Z/formats/character set/Unicode.h +30119 -0
- data/src/external/Z/API/Z/formats/data model/I16LP32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/ILP32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/ILP64.h +19 -0
- data/src/external/Z/API/Z/formats/data model/IP16L32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/LLP64.h +19 -0
- data/src/external/Z/API/Z/formats/data model/LP32.h +19 -0
- data/src/external/Z/API/Z/formats/data model/LP64.h +19 -0
- data/src/external/Z/API/Z/formats/data model/SILP64.h +19 -0
- data/src/external/Z/API/Z/formats/file system/FAT12.h +61 -0
- data/src/external/Z/API/Z/formats/floating-point/IEEE 754.h +141 -0
- data/src/external/Z/API/Z/formats/floating-point/x87.h +74 -0
- data/src/external/Z/API/Z/formats/image/ICNS.h +39 -0
- data/src/external/Z/API/Z/formats/keymap/Mac OS.h +284 -0
- data/src/external/Z/API/Z/formats/keymap/Z.h +141 -0
- data/src/external/Z/API/Z/formats/multimedia/Creative Voice.h +106 -0
- data/src/external/Z/API/Z/formats/multimedia/Microsoft Wave.h +49 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ACH.h +44 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/FRZ.h +54 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/PRG.h +33 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SEM.h +46 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SIT.h +34 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNA.h +117 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SNP.h +37 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/SP.h +62 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/Z80.h +117 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX.h +56 -0
- data/src/external/Z/API/Z/formats/snapshot/machine/computer/ZX Spectrum/ZX82.h +70 -0
- data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/UNIF.h +26 -0
- data/src/external/Z/API/Z/formats/storage medium image/NES Game Pak/iNES.h +76 -0
- data/src/external/Z/API/Z/formats/storage medium image/audio/TAP.h +25 -0
- data/src/external/Z/API/Z/formats/storage medium image/audio/TZX.h +1185 -0
- data/src/external/Z/API/Z/formats/storage medium image/audio/Warajevo TAP.h +32 -0
- data/src/external/Z/API/Z/formats/storage medium image/floppy disk/FDI.h +45 -0
- data/src/external/Z/API/Z/functions/base/Z2D.h +583 -0
- data/src/external/Z/API/Z/functions/base/Z3D.h +712 -0
- data/src/external/Z/API/Z/functions/base/ZRange.h +137 -0
- data/src/external/Z/API/Z/functions/base/all.h +16 -0
- data/src/external/Z/API/Z/functions/base/casting.hpp +37 -0
- data/src/external/Z/API/Z/functions/base/character.h +38 -0
- data/src/external/Z/API/Z/functions/base/constructors.h +326 -0
- data/src/external/Z/API/Z/functions/base/structure.hpp +26 -0
- data/src/external/Z/API/Z/functions/base/type.hpp +60 -0
- data/src/external/Z/API/Z/functions/base/value.h +1901 -0
- data/src/external/Z/API/Z/functions/base/value.hpp +112 -0
- data/src/external/Z/API/Z/functions/buffering/ZRingBuffer.h +85 -0
- data/src/external/Z/API/Z/functions/buffering/ZTripleBuffer.h +65 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z2DLine.h +179 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/Z3DLine.h +168 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABB.h +361 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZAABR.h +1081 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZBox.h +340 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZCircle.h +142 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZRectangle.h +1267 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/ZSphere.h +156 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/all.h +18 -0
- data/src/external/Z/API/Z/functions/mathematics/geometry/euclidean/constructors.h +620 -0
- data/src/external/Z/API/Z/functions/time/date.h +29 -0
- data/src/external/Z/API/Z/hardware/CPU/architecture/6502.h +90 -0
- data/src/external/Z/API/Z/hardware/CPU/architecture/Z80.h +245 -0
- data/src/external/Z/API/Z/hardware/CPU/architecture/i4004.h +37 -0
- data/src/external/Z/API/Z/hardware/PSG/General Instrument/AY-3-891x.h +180 -0
- data/src/external/Z/API/Z/hardware/VDC/Ricoh/RP2C0x.h +625 -0
- data/src/external/Z/API/Z/hardware/bus/AGP.h +24 -0
- data/src/external/Z/API/Z/hardware/bus/USB.h +510 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Inves Spectrum +.h +47 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Pentagon.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/Scorpion.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum + 128K.h +158 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +.h +82 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +2A.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum +3.h +13 -0
- data/src/external/Z/API/Z/hardware/machine/model/computer/ZX Spectrum/ZX Spectrum.h +109 -0
- data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (NTSC).h +29 -0
- data/src/external/Z/API/Z/hardware/machine/model/console/Nintendo Entertainment System/NES-001 (PAL).h +29 -0
- data/src/external/Z/API/Z/hardware/machine/platform/computer/ZX Spectrum.h +405 -0
- data/src/external/Z/API/Z/hardware/machine/platform/console/Game Boy.h +49 -0
- data/src/external/Z/API/Z/hardware/machine/platform/console/Nintendo Entertainment System.h +350 -0
- data/src/external/Z/API/Z/hardware/storage medium/ROM cartridge/SNES Game Pak.h +238 -0
- data/src/external/Z/API/Z/inspection/C/completion.h +178 -0
- data/src/external/Z/API/Z/inspection/C/modules/C11.h +41 -0
- data/src/external/Z/API/Z/inspection/C/modules/C18.h +13 -0
- data/src/external/Z/API/Z/inspection/C/modules/C89.h +19 -0
- data/src/external/Z/API/Z/inspection/C/modules/C90.h +13 -0
- data/src/external/Z/API/Z/inspection/C/modules/C94.h +15 -0
- data/src/external/Z/API/Z/inspection/C/modules/C99.h +29 -0
- data/src/external/Z/API/Z/inspection/C/modules/KR C.h +19 -0
- data/src/external/Z/API/Z/inspection/C++/completion.h +512 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++03.h +15 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++11.h +80 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++14.h +26 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++17.h +55 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++85.h +11 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++89.h +13 -0
- data/src/external/Z/API/Z/inspection/C++/modules/C++98.h +17 -0
- data/src/external/Z/API/Z/inspection/C++.h +78 -0
- data/src/external/Z/API/Z/inspection/C.h +79 -0
- data/src/external/Z/API/Z/inspection/CPU/completion.h +56 -0
- data/src/external/Z/API/Z/inspection/CPU/detection.h +714 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/6502.h +25 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/AArch32.h +32 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/AArch64.h +32 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/Z80.h +26 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/x86-32.h +31 -0
- data/src/external/Z/API/Z/inspection/CPU/modules/x86-64.h +312 -0
- data/src/external/Z/API/Z/inspection/CPU.h +209 -0
- data/src/external/Z/API/Z/inspection/OS/completion.h +36 -0
- data/src/external/Z/API/Z/inspection/OS/detection.h +768 -0
- data/src/external/Z/API/Z/inspection/OS/modules/Linux.h +22 -0
- data/src/external/Z/API/Z/inspection/OS/modules/MS-DOS.h +16 -0
- data/src/external/Z/API/Z/inspection/OS/modules/Mac OS X.h +23 -0
- data/src/external/Z/API/Z/inspection/OS/modules/Windows.h +19 -0
- data/src/external/Z/API/Z/inspection/OS/modules/iPhone OS.h +23 -0
- data/src/external/Z/API/Z/inspection/OS.h +236 -0
- data/src/external/Z/API/Z/inspection/Objective-C/completion.h +8 -0
- data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v1.0.h +11 -0
- data/src/external/Z/API/Z/inspection/Objective-C/modules/Objective-C v2.0.h +15 -0
- data/src/external/Z/API/Z/inspection/Objective-C.h +51 -0
- data/src/external/Z/API/Z/inspection/Z.h +19 -0
- data/src/external/Z/API/Z/inspection/build.h +22 -0
- data/src/external/Z/API/Z/inspection/character set.h +66 -0
- data/src/external/Z/API/Z/inspection/compiler/completion.h +2885 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/Apple LLVM.h +26 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/Clang.h +1664 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/GCC.h +1366 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/SCCZ80.h +473 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/Visual C++.h +606 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/cc65.h +529 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/generic.h +13 -0
- data/src/external/Z/API/Z/inspection/compiler/modules/template.h +650 -0
- data/src/external/Z/API/Z/inspection/compiler.h +299 -0
- data/src/external/Z/API/Z/inspection/data model/completion.h +128 -0
- data/src/external/Z/API/Z/inspection/data model/deduction.h +9 -0
- data/src/external/Z/API/Z/inspection/data model/detection.h +45 -0
- data/src/external/Z/API/Z/inspection/data model.h +362 -0
- data/src/external/Z/API/Z/inspection/floating-point/completion.h +50 -0
- data/src/external/Z/API/Z/inspection/floating-point.h +324 -0
- data/src/external/Z/API/Z/inspection/language.h +163 -0
- data/src/external/Z/API/Z/inspection/platform/detection.h +9 -0
- data/src/external/Z/API/Z/inspection/platform.h +29 -0
- data/src/external/Z/API/Z/keys/C++.h +27 -0
- data/src/external/Z/API/Z/keys/C.h +29 -0
- data/src/external/Z/API/Z/keys/CPU.h +80 -0
- data/src/external/Z/API/Z/keys/OS.h +182 -0
- data/src/external/Z/API/Z/keys/Objective-C.h +17 -0
- data/src/external/Z/API/Z/keys/chemistry.h +26 -0
- data/src/external/Z/API/Z/keys/compiler.h +178 -0
- data/src/external/Z/API/Z/keys/data model.h +32 -0
- data/src/external/Z/API/Z/keys/endianness.h +24 -0
- data/src/external/Z/API/Z/keys/language.h +21 -0
- data/src/external/Z/API/Z/keys/layout.h +20 -0
- data/src/external/Z/API/Z/keys/mathematics/geometry.h +29 -0
- data/src/external/Z/API/Z/keys/mathematics/number.h +21 -0
- data/src/external/Z/API/Z/keys/order.h +18 -0
- data/src/external/Z/API/Z/keys/platform.h +87 -0
- data/src/external/Z/API/Z/keys/program.h +39 -0
- data/src/external/Z/API/Z/keys/science/chemical elements.h +200 -0
- data/src/external/Z/API/Z/keys/science/electricity.h +18 -0
- data/src/external/Z/API/Z/keys/science/magnetism.h +19 -0
- data/src/external/Z/API/Z/keys/status.h +69 -0
- data/src/external/Z/API/Z/keys/text.h +27 -0
- data/src/external/Z/API/Z/keys/value.h +88 -0
- data/src/external/Z/API/Z/macros/arguments.h +25 -0
- data/src/external/Z/API/Z/macros/casting.h +22 -0
- data/src/external/Z/API/Z/macros/character.h +159 -0
- data/src/external/Z/API/Z/macros/date.h +14 -0
- data/src/external/Z/API/Z/macros/key.h +20 -0
- data/src/external/Z/API/Z/macros/language.h +126 -0
- data/src/external/Z/API/Z/macros/language.hpp +81 -0
- data/src/external/Z/API/Z/macros/members.h +86 -0
- data/src/external/Z/API/Z/macros/pasting.h +308 -0
- data/src/external/Z/API/Z/macros/pointer.h +33 -0
- data/src/external/Z/API/Z/macros/repetition.h +283 -0
- data/src/external/Z/API/Z/macros/structure.h +104 -0
- data/src/external/Z/API/Z/macros/templating.h +407 -0
- data/src/external/Z/API/Z/macros/tokens.h +14 -0
- data/src/external/Z/API/Z/macros/type enumeration.h +43 -0
- data/src/external/Z/API/Z/macros/type selection.hpp +76 -0
- data/src/external/Z/API/Z/macros/value.h +489 -0
- data/src/external/Z/API/Z/macros/variadic pasting.h +21 -0
- data/src/external/Z/API/Z/macros/variadic selection.h +56 -0
- data/src/external/Z/API/Z/macros/variadic.h +46 -0
- data/src/external/Z/API/Z/macros/version.h +17 -0
- data/src/external/Z/API/Z/network/3/IP.h +36 -0
- data/src/external/Z/API/Z/network/4/TCP.h +24 -0
- data/src/external/Z/API/Z/network/4/UDP.h +26 -0
- data/src/external/Z/API/Z/network/7/ED2K.h +104 -0
- data/src/external/Z/API/Z/network/7/HTTP.h +100 -0
- data/src/external/Z/API/Z/traits/SelectType.hpp +71 -0
- data/src/external/Z/API/Z/traits/TernaryType.hpp +20 -0
- data/src/external/Z/API/Z/traits/Type.hpp +4516 -0
- data/src/external/Z/API/Z/traits/TypeCount.hpp +52 -0
- data/src/external/Z/API/Z/traits/TypeList.hpp +376 -0
- data/src/external/Z/API/Z/traits/base.hpp +19 -0
- data/src/external/Z/API/Z/traits/filtering.hpp +30 -0
- data/src/external/Z/API/Z/traits/mathematics.hpp +48 -0
- data/src/external/Z/API/Z/types/arguments.h +19 -0
- data/src/external/Z/API/Z/types/base.h +1655 -0
- data/src/external/Z/API/Z/types/base.hpp +169 -0
- data/src/external/Z/API/Z/types/buffering.h +27 -0
- data/src/external/Z/API/Z/types/mathematics.h +135 -0
- data/src/external/Z/API/Z/types/time.h +23 -0
- data/src/external/Z/COPYING.LESSER +165 -0
- data/src/external/Z/development/Qt Creator/Z.pro +253 -0
- data/src/external/Z/distribution/CocoaPods/Zeta.podspec +18 -0
- data/src/external/Z/distribution/Gentoo Linux/Zeta-0.1.ebuild +22 -0
- data/src/external/Z/distribution/Gentoo Linux/metadata.xml +8 -0
- data/src/external/Z/distribution/Homebrew/Zeta.rb +11 -0
- data/src/external/z80/API/emulation/CPU/Z80.h +201 -0
- data/src/external/z80/README.md +229 -0
- data/src/external/z80/building/premake4.lua +33 -0
- data/src/external/z80/development/Xcode/Z80.xcodeproj/project.pbxproj +520 -0
- data/src/external/z80/sources/Z80.c +1660 -0
- data/src/interrupt.c +6 -0
- data/src/interrupt.h +3 -0
- data/src/io.c.erb +115 -0
- data/src/io.h.erb +18 -0
- data/src/main.c +69 -0
- data/src/memory.c.erb +43 -0
- data/src/memory.h.erb +9 -0
- metadata +329 -0
@@ -0,0 +1,219 @@
|
|
1
|
+
/* Z Kit - classes/functional/ObjectSelector.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_classes_functional_ObjectSelector_HPP_
|
9
|
+
#define _Z_classes_functional_ObjectSelector_HPP_
|
10
|
+
|
11
|
+
#include <Z/inspection/Z.h>
|
12
|
+
#include <Z/classes/functional/Selector.hpp>
|
13
|
+
|
14
|
+
#if Z_HAS_CLASS(Selector)
|
15
|
+
|
16
|
+
|
17
|
+
namespace Zeta {
|
18
|
+
|
19
|
+
template <class F> struct ObjectSelector;
|
20
|
+
|
21
|
+
template <class R, class... P> struct ObjectSelector<R(P...)> : Selector<R(P...)> {
|
22
|
+
typedef typename Selector<R(P...)>::Call Call;
|
23
|
+
typedef typename Selector<R(P...)>::CallSuper CallSuper;
|
24
|
+
|
25
|
+
id object;
|
26
|
+
|
27
|
+
Z_INLINE ObjectSelector() Z_DEFAULTED({})
|
28
|
+
|
29
|
+
|
30
|
+
Z_INLINE ObjectSelector(id object, SEL selector)
|
31
|
+
: Selector<R(P...)>(selector), object(object) {}
|
32
|
+
|
33
|
+
|
34
|
+
Z_INLINE operator id() const {return object;}
|
35
|
+
|
36
|
+
Z_INLINE ObjectSelector &operator =(SEL rhs) {this->selector = rhs; return *this;}
|
37
|
+
Z_INLINE ObjectSelector &operator =(id rhs) {object = rhs; return *this;}
|
38
|
+
|
39
|
+
|
40
|
+
template <class RR = R>
|
41
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
42
|
+
operator ()(typename Type<P>::to_forwardable... arguments) const
|
43
|
+
{((Call)objc_msgSend)(object, this->selector, arguments...);}
|
44
|
+
|
45
|
+
|
46
|
+
template <class RR = R>
|
47
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
48
|
+
operator ()(id object, typename Type<P>::to_forwardable... arguments) const
|
49
|
+
{((Call)objc_msgSend)(object, this->selector, arguments...);}
|
50
|
+
|
51
|
+
|
52
|
+
# if Z_CPU_ARCHITECTURE == Z_CPU_ARCHITECTURE_X86_64 || Z_CPU_ARCHITECTURE == Z_CPU_ARCHITECTURE_X86_32
|
53
|
+
|
54
|
+
template <class RR = R>
|
55
|
+
Z_INLINE typename EnableIf<
|
56
|
+
!Type<RR>::is_void &&
|
57
|
+
!Type<RR>::is_real &&
|
58
|
+
!Type<RR>::is_structure_or_union,
|
59
|
+
RR>::type
|
60
|
+
operator ()(typename Type<P>::to_forwardable... arguments) const
|
61
|
+
{return ((Call)objc_msgSend)(object, this->selector, arguments...);}
|
62
|
+
|
63
|
+
|
64
|
+
template <class RR = R>
|
65
|
+
Z_INLINE typename EnableIf<
|
66
|
+
!Type<RR>::is_void &&
|
67
|
+
!Type<RR>::is_real &&
|
68
|
+
!Type<RR>::is_structure_or_union,
|
69
|
+
RR>::type
|
70
|
+
operator ()(id object, typename Type<P>::to_forwardable... arguments) const
|
71
|
+
{return ((Call)objc_msgSend)(object, this->selector, arguments...);}
|
72
|
+
|
73
|
+
|
74
|
+
template <class RR = R>
|
75
|
+
Z_INLINE typename EnableIf<Type<RR>::is_real, RR>::type
|
76
|
+
operator ()(typename Type<P>::to_forwardable... arguments) const
|
77
|
+
{return ((Call)objc_msgSend_fpret)(object, this->selector, arguments...);}
|
78
|
+
|
79
|
+
|
80
|
+
template <class RR = R>
|
81
|
+
Z_INLINE typename EnableIf<Type<RR>::is_real, RR>::type
|
82
|
+
operator ()(id object, typename Type<P>::to_forwardable... arguments) const
|
83
|
+
{return ((Call)objc_msgSend_fpret)(object, this->selector, arguments...);}
|
84
|
+
|
85
|
+
# else
|
86
|
+
|
87
|
+
template <class RR = R>
|
88
|
+
Z_INLINE typename EnableIf<
|
89
|
+
!Type<RR>::is_void &&
|
90
|
+
!Type<RR>::is_structure_or_union,
|
91
|
+
RR>::type
|
92
|
+
operator ()(typename Type<P>::to_forwardable... arguments) const
|
93
|
+
{return ((Call)objc_msgSend)(object, this->selector, arguments...);}
|
94
|
+
|
95
|
+
|
96
|
+
template <class RR = R>
|
97
|
+
Z_INLINE typename EnableIf<
|
98
|
+
!Type<RR>::is_void &&
|
99
|
+
!Type<RR>::is_structure_or_union,
|
100
|
+
RR>::type
|
101
|
+
operator ()(id object, typename Type<P>::to_forwardable... arguments) const
|
102
|
+
{return ((Call)objc_msgSend)(object, this->selector, arguments...);}
|
103
|
+
|
104
|
+
# endif
|
105
|
+
|
106
|
+
|
107
|
+
template <class RR = R>
|
108
|
+
Z_INLINE typename EnableIf<Type<RR>::is_structure_or_union, RR>::type
|
109
|
+
operator ()(typename Type<P>::to_forwardable... arguments) const
|
110
|
+
{return ((Call)objc_msgSend_stret)(object, this->selector, arguments...);}
|
111
|
+
|
112
|
+
|
113
|
+
template <class RR = R>
|
114
|
+
Z_INLINE typename EnableIf<Type<RR>::is_structure_or_union, RR>::type
|
115
|
+
operator ()(id object, typename Type<P>::to_forwardable... arguments) const
|
116
|
+
{return ((Call)objc_msgSend_stret)(object, this->selector, arguments...);}
|
117
|
+
|
118
|
+
|
119
|
+
template <class RR = R>
|
120
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
121
|
+
super(const struct objc_super &object_super, typename Type<P>::to_forwardable... arguments) const
|
122
|
+
{((CallSuper)objc_msgSendSuper)((struct objc_super *)&object_super, this->selector, arguments...);}
|
123
|
+
|
124
|
+
|
125
|
+
template <class RR = R>
|
126
|
+
Z_INLINE typename EnableIf<
|
127
|
+
!Type<RR>::is_void &&
|
128
|
+
!Type<RR>::is_structure_or_union,
|
129
|
+
RR>::type
|
130
|
+
super(const struct objc_super &object_super, typename Type<P>::to_forwardable... arguments) const
|
131
|
+
{return ((CallSuper)objc_msgSendSuper)((struct objc_super *)&object_super, this->selector, arguments...);}
|
132
|
+
|
133
|
+
|
134
|
+
template <class RR = R>
|
135
|
+
Z_INLINE typename EnableIf<Type<RR>::is_structure_or_union, RR>::type
|
136
|
+
super(const struct objc_super &object_super, typename Type<P>::to_forwardable... arguments) const
|
137
|
+
{return ((CallSuper)objc_msgSendSuper_stret)((struct objc_super *)&object_super, this->selector, arguments...);}
|
138
|
+
|
139
|
+
|
140
|
+
Z_INLINE ObjectSelector &set(id object, SEL selector)
|
141
|
+
{
|
142
|
+
this->selector = selector;
|
143
|
+
this->object = object;
|
144
|
+
return *this;
|
145
|
+
}
|
146
|
+
|
147
|
+
|
148
|
+
# if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
|
149
|
+
|
150
|
+
template <class RR = R>
|
151
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
152
|
+
super(typename Type<P>::to_forwardable... arguments) const
|
153
|
+
{
|
154
|
+
struct objc_super object_super {object, [[object class] superclass]};
|
155
|
+
((CallSuper)objc_msgSendSuper)(&object_super, this->selector, arguments...);
|
156
|
+
}
|
157
|
+
|
158
|
+
|
159
|
+
template <class RR = R>
|
160
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
161
|
+
super(id object, typename Type<P>::to_forwardable... arguments) const
|
162
|
+
{
|
163
|
+
struct objc_super object_super {object, [[object class] superclass]};
|
164
|
+
((CallSuper)objc_msgSendSuper)(&object_super, this->selector, arguments...);
|
165
|
+
}
|
166
|
+
|
167
|
+
|
168
|
+
template <class RR = R>
|
169
|
+
Z_INLINE typename EnableIf<
|
170
|
+
!Type<RR>::is_void &&
|
171
|
+
!Type<RR>::is_structure_or_union,
|
172
|
+
RR>::type
|
173
|
+
super(typename Type<P>::to_forwardable... arguments) const
|
174
|
+
{
|
175
|
+
struct objc_super object_super {object, [[object class] superclass]};
|
176
|
+
return ((CallSuper)objc_msgSendSuper)(&object_super, this->selector, arguments...);
|
177
|
+
}
|
178
|
+
|
179
|
+
|
180
|
+
template <class RR = R>
|
181
|
+
Z_INLINE typename EnableIf<
|
182
|
+
!Type<RR>::is_void &&
|
183
|
+
!Type<RR>::is_structure_or_union,
|
184
|
+
RR>::type
|
185
|
+
super(id object, typename Type<P>::to_forwardable... arguments) const
|
186
|
+
{
|
187
|
+
struct objc_super object_super {object, [[object class] superclass]};
|
188
|
+
return ((CallSuper)objc_msgSendSuper)(&object_super, this->selector, arguments...);
|
189
|
+
}
|
190
|
+
|
191
|
+
|
192
|
+
template <class RR = R>
|
193
|
+
Z_INLINE typename EnableIf<Type<RR>::is_structure_or_union, RR>::type
|
194
|
+
super(typename Type<P>::to_forwardable... arguments) const
|
195
|
+
{
|
196
|
+
struct objc_super object_super {object, [[object class] superclass]};
|
197
|
+
return ((CallSuper)objc_msgSendSuper_stret)(&object_super, this->selector, arguments...);
|
198
|
+
}
|
199
|
+
|
200
|
+
|
201
|
+
template <class RR = R>
|
202
|
+
Z_INLINE typename EnableIf<Type<RR>::is_structure_or_union, RR>::type
|
203
|
+
super(id object, typename Type<P>::to_forwardable... arguments) const
|
204
|
+
{
|
205
|
+
struct objc_super object_super {object, [[object class] superclass]};
|
206
|
+
return ((CallSuper)objc_msgSendSuper_stret)(&object_super, this->selector, arguments...);
|
207
|
+
}
|
208
|
+
|
209
|
+
# endif
|
210
|
+
};
|
211
|
+
}
|
212
|
+
|
213
|
+
|
214
|
+
# define Z_HAS_CLASS_ObjectSelector TRUE
|
215
|
+
#else
|
216
|
+
# define Z_HAS_CLASS_ObjectSelector FALSE
|
217
|
+
#endif
|
218
|
+
|
219
|
+
#endif // _Z_classes_functional_Selector_HPP_
|
@@ -0,0 +1,146 @@
|
|
1
|
+
/* Z Kit - classes/functional/Selector.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_classes_functional_Selector_HPP_
|
9
|
+
#define _Z_classes_functional_Selector_HPP_
|
10
|
+
|
11
|
+
#include <Z/inspection/language.h>
|
12
|
+
|
13
|
+
#if Z_LANGUAGE_HAS(CPP, SFINAE) && \
|
14
|
+
Z_LANGUAGE_HAS(CPP, VARIADIC_TEMPLATE) && \
|
15
|
+
Z_LANGUAGE_HAS(CPP, DEFAULT_TEMPLATE_ARGUMENTS_FOR_FUNCTION_TEMPLATE)
|
16
|
+
|
17
|
+
# include <Z/traits/filtering.hpp>
|
18
|
+
# include <Z/traits/Type.hpp>
|
19
|
+
# include <objc/message.h>
|
20
|
+
|
21
|
+
|
22
|
+
namespace Zeta {
|
23
|
+
|
24
|
+
template <class F> struct Selector;
|
25
|
+
|
26
|
+
template <class R, class... P> struct Selector<R(P...)> {
|
27
|
+
typedef R (* Call )(id, SEL, P...);
|
28
|
+
typedef R (* CallSuper)(struct objc_super*, SEL, P...);
|
29
|
+
|
30
|
+
SEL selector;
|
31
|
+
|
32
|
+
Z_INLINE Selector() Z_DEFAULTED({})
|
33
|
+
|
34
|
+
Z_INLINE Selector(SEL selector)
|
35
|
+
: selector(selector) {}
|
36
|
+
|
37
|
+
|
38
|
+
Z_INLINE operator SEL() const {return selector;}
|
39
|
+
|
40
|
+
|
41
|
+
template <class RR = R>
|
42
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
43
|
+
operator ()(id object, typename Type<P>::to_forwardable... arguments) const
|
44
|
+
{((Call)objc_msgSend)(object, selector, arguments...);}
|
45
|
+
|
46
|
+
|
47
|
+
# if Z_CPU_ARCHITECTURE == Z_CPU_ARCHITECTURE_X86_64 || \
|
48
|
+
Z_CPU_ARCHITECTURE == Z_CPU_ARCHITECTURE_X86_32
|
49
|
+
|
50
|
+
template <class RR = R>
|
51
|
+
Z_INLINE typename EnableIf<
|
52
|
+
!Type<RR>::is_void &&
|
53
|
+
!Type<RR>::is_real &&
|
54
|
+
!Type<RR>::is_structure_or_union,
|
55
|
+
RR>::type
|
56
|
+
operator ()(id object, typename Type<P>::to_forwardable... arguments) const
|
57
|
+
{return ((Call)objc_msgSend)(object, selector, arguments...);}
|
58
|
+
|
59
|
+
|
60
|
+
template <class RR = R>
|
61
|
+
Z_INLINE typename EnableIf<Type<RR>::is_real, RR>::type
|
62
|
+
operator ()(id object, typename Type<P>::to_forwardable... arguments) const
|
63
|
+
{return ((Call)objc_msgSend_fpret)(object, selector, arguments...);}
|
64
|
+
|
65
|
+
# else
|
66
|
+
|
67
|
+
template <class RR = R>
|
68
|
+
Z_INLINE typename EnableIf<
|
69
|
+
!Type<RR>::is_void &&
|
70
|
+
!Type<RR>::is_structure_or_union,
|
71
|
+
RR>::type
|
72
|
+
operator ()(id object, typename Type<P>::to_forwardable... arguments) const
|
73
|
+
{return ((Call)objc_msgSend)(object, selector, arguments...);}
|
74
|
+
|
75
|
+
# endif
|
76
|
+
|
77
|
+
|
78
|
+
template <class RR = R>
|
79
|
+
Z_INLINE typename EnableIf<Type<RR>::is_structure_or_union, RR>::type
|
80
|
+
operator ()(id object, typename Type<P>::to_forwardable... arguments) const
|
81
|
+
{return ((Call)objc_msgSend_stret)(object, selector, arguments...);}
|
82
|
+
|
83
|
+
|
84
|
+
template <class RR = R>
|
85
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
86
|
+
super(const struct objc_super &object_super, typename Type<P>::to_forwardable... arguments) const
|
87
|
+
{((CallSuper)objc_msgSendSuper)((struct objc_super *)&object_super, selector, arguments...);}
|
88
|
+
|
89
|
+
|
90
|
+
template <class RR = R>
|
91
|
+
Z_INLINE typename EnableIf<
|
92
|
+
!Type<RR>::is_void &&
|
93
|
+
!Type<RR>::is_structure_or_union,
|
94
|
+
RR>::type
|
95
|
+
super(const struct objc_super &object_super, typename Type<P>::to_forwardable... arguments) const
|
96
|
+
{return ((CallSuper)objc_msgSendSuper)((struct objc_super *)&object_super, selector, arguments...);}
|
97
|
+
|
98
|
+
|
99
|
+
template <class RR = R>
|
100
|
+
Z_INLINE typename EnableIf<Type<RR>::is_structure_or_union, RR>::type
|
101
|
+
super(const struct objc_super &object_super, typename Type<P>::to_forwardable... arguments) const
|
102
|
+
{return ((CallSuper)objc_msgSendSuper_stret)((struct objc_super *)&object_super, selector, arguments...);}
|
103
|
+
|
104
|
+
|
105
|
+
# if Z_LANGUAGE_INCLUDES(OBJECTIVE_CPP)
|
106
|
+
|
107
|
+
template <class RR = R>
|
108
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
109
|
+
super(id object, typename Type<P>::to_forwardable... arguments) const
|
110
|
+
{
|
111
|
+
struct objc_super object_super {object, [[object class] superclass]};
|
112
|
+
((CallSuper)objc_msgSendSuper)(&object_super, selector, arguments...);
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
template <class RR = R>
|
117
|
+
Z_INLINE typename EnableIf<
|
118
|
+
!Type<RR>::is_void &&
|
119
|
+
!Type<RR>::is_structure_or_union,
|
120
|
+
RR>::type
|
121
|
+
super(id object, typename Type<P>::to_forwardable... arguments) const
|
122
|
+
{
|
123
|
+
struct objc_super object_super {object, [[object class] superclass]};
|
124
|
+
return ((CallSuper)objc_msgSendSuper)(&object_super, selector, arguments...);
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
template <class RR = R>
|
129
|
+
Z_INLINE typename EnableIf<Type<RR>::is_structure_or_union, RR>::type
|
130
|
+
super(id object, typename Type<P>::to_forwardable... arguments) const
|
131
|
+
{
|
132
|
+
struct objc_super object_super {object, [[object class] superclass]};
|
133
|
+
return ((CallSuper)objc_msgSendSuper_stret)(&object_super, selector, arguments...);
|
134
|
+
}
|
135
|
+
|
136
|
+
# endif
|
137
|
+
};
|
138
|
+
}
|
139
|
+
|
140
|
+
|
141
|
+
# define Z_HAS_CLASS_Selector TRUE
|
142
|
+
#else
|
143
|
+
# define z_has_class_Selector FALSE
|
144
|
+
#endif
|
145
|
+
|
146
|
+
#endif // _Z_classes_functional_Selector_HPP_
|
@@ -0,0 +1,81 @@
|
|
1
|
+
/* Z Kit - classes/mathematics/geometry/euclidean/AABB.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_classes_mathematics_geometry_euclidean_AABB_HPP_
|
9
|
+
#define _Z_classes_mathematics_geometry_euclidean_AABB_HPP_
|
10
|
+
|
11
|
+
#include <Z/classes/mathematics/geometry/euclidean/Line3D.hpp>
|
12
|
+
|
13
|
+
|
14
|
+
namespace Zeta {namespace Partials {namespace AABB {
|
15
|
+
|
16
|
+
# define Z_THIS ((AABB *)this)
|
17
|
+
|
18
|
+
template <class AABB, class T, UInt T_number_set> struct Part;
|
19
|
+
|
20
|
+
|
21
|
+
// MARK: - Partial implementation for integer types
|
22
|
+
|
23
|
+
|
24
|
+
template <class AABB, class T>
|
25
|
+
struct Part<AABB, T, Z_NUMBER_SET_Z> {
|
26
|
+
};
|
27
|
+
|
28
|
+
|
29
|
+
// MARK: - Partial implementation for real types
|
30
|
+
|
31
|
+
|
32
|
+
template <class AABB, class T>
|
33
|
+
struct Part<AABB, T, Z_NUMBER_SET_R> {
|
34
|
+
|
35
|
+
Z_CT(CPP11) Zeta::Value3D<T> absolute_point_to_unit(const Zeta::Value3D<T> &point)
|
36
|
+
{return (point - Z_THIS->a) / (Z_THIS->b - Z_THIS->a);}
|
37
|
+
|
38
|
+
|
39
|
+
/*Z_CT(CPP11) Boolean contains(const Circle<T> circle)
|
40
|
+
{
|
41
|
+
return circle.point - circle.radius >= Z_THIS->a &&
|
42
|
+
circle.point + circle.radius <= Z_THIS->b;
|
43
|
+
}*/
|
44
|
+
|
45
|
+
|
46
|
+
/*Z_CT(CPP11) Circle<T> inner_circle()
|
47
|
+
{return Circle<T>(Z_THIS->center(), (b - a).inner_minimum() / T(2));}*/
|
48
|
+
|
49
|
+
|
50
|
+
Z_CT(CPP11) Zeta::Value3D<T> unit_point_to_absolute(Zeta::Value3D<T> point)
|
51
|
+
{return point * (object.b - object.a) + object.a;}
|
52
|
+
};
|
53
|
+
|
54
|
+
|
55
|
+
# undef Z_THIS
|
56
|
+
|
57
|
+
}}}
|
58
|
+
|
59
|
+
|
60
|
+
namespace Zeta {template <class T> struct AABB : Line3D<T>, Partials::Rectangle::Part<AABB<T>, T, Type<T>::number_set> {
|
61
|
+
|
62
|
+
typedef typename ZTypeFixedSigned(ZAABR, T) Base;
|
63
|
+
|
64
|
+
|
65
|
+
Z_INLINE AABR() {}
|
66
|
+
|
67
|
+
Z_CT(CPP11) AABR(const Value2D<T> &a, const Value2D<T> &b) : Line2D<T>(a, b) {}
|
68
|
+
Z_CT(CPP11) AABR(const Value2D<T> &a, T b_x, T b_y) : Line2D<T>(a, b_x, b_y) {}
|
69
|
+
Z_CT(CPP11) AABR(const Value2D<T> &a, T b_xy) : Line2D<T>(a, b_xy) {}
|
70
|
+
Z_CT(CPP11) AABR(T a_x, T a_y, const Value2D<T> &b) : Line2D<T>(a_x, a_y, b) {}
|
71
|
+
Z_CT(CPP11) AABR(T a_x, T a_y, T b_x, T b_y) : Line2D<T>(a_x, a_y, b_x, b_y) {}
|
72
|
+
Z_CT(CPP11) AABR(T a_xy, T b_x, T b_y) : Line2D<T>(a_xy, b_x, b_y) {}
|
73
|
+
Z_CT(CPP11) AABR(T a_xy, const Value2D<T> &b) : Line2D<T>(a_xy, b) {}
|
74
|
+
Z_CT(CPP11) AABR(T b_x, T b_y) : Line2D<T>(b_x, b_y) {}
|
75
|
+
Z_CT(CPP11) AABR(T b_xy) : Line2D<T>(b_xy) {}
|
76
|
+
|
77
|
+
Z_INLINE AABR(const Base &aabr) {(*(Base *)this) = aabr;}
|
78
|
+
};}
|
79
|
+
|
80
|
+
|
81
|
+
#endif // _Z_classes_mathematics_geometry_euclidean_AABR_HPP_
|