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,265 @@
|
|
1
|
+
/* Z Kit - classes/functional/Functor.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_Functor_HPP_
|
9
|
+
#define _Z_classes_functional_Functor_HPP_
|
10
|
+
|
11
|
+
#include <Z/classes/functional/ObjectMemberFunction.hpp>
|
12
|
+
|
13
|
+
#if Z_HAS_CLASS(ObjectMemberFunction)
|
14
|
+
|
15
|
+
# ifdef Z_USE_OBJECTIVE_C_RUNTIME
|
16
|
+
# include <Z/classes/functional/ObjectSelector.hpp>
|
17
|
+
# endif
|
18
|
+
|
19
|
+
|
20
|
+
namespace Zeta {
|
21
|
+
|
22
|
+
template <class F> class Functor;
|
23
|
+
|
24
|
+
template <class R, class... P> class Functor<R(P...)> {
|
25
|
+
|
26
|
+
private:
|
27
|
+
typedef R (* Call)(const Functor *, typename Type<P>::to_forwardable...);
|
28
|
+
typedef void (* Destroy)(Functor *);
|
29
|
+
|
30
|
+
Call call;
|
31
|
+
Destroy destroy;
|
32
|
+
|
33
|
+
union { R (* function)(P...);
|
34
|
+
|
35
|
+
struct {R (NaT::* function)(P...);
|
36
|
+
NaT *object;
|
37
|
+
} object_member_function;
|
38
|
+
|
39
|
+
# if Z_HAS_CLASS(ObjectSelector)
|
40
|
+
struct {SEL selector;
|
41
|
+
id object;
|
42
|
+
} object_selector;
|
43
|
+
# endif
|
44
|
+
} target;
|
45
|
+
|
46
|
+
|
47
|
+
struct Callers {
|
48
|
+
|
49
|
+
template <class RR = R>
|
50
|
+
static Z_INLINE typename EnableIf<Type<RR>::is_void, Call>::type function()
|
51
|
+
{
|
52
|
+
return [](const Functor *functor, typename Type<P>::to_forwardable... arguments)
|
53
|
+
{functor->target.function(arguments...);};
|
54
|
+
}
|
55
|
+
|
56
|
+
|
57
|
+
template <class RR = R>
|
58
|
+
static Z_INLINE typename EnableIf<!Type<RR>::is_void, Call>::type function()
|
59
|
+
{
|
60
|
+
return [](const Functor *functor, typename Type<P>::to_forwardable... arguments)
|
61
|
+
{return functor->target.function(arguments...);};
|
62
|
+
}
|
63
|
+
|
64
|
+
|
65
|
+
template <class RR = R>
|
66
|
+
static Z_INLINE typename EnableIf<Type<RR>::is_void, Call>::type object_member_function()
|
67
|
+
{
|
68
|
+
return [](const Functor *functor, typename Type<P>::to_forwardable... arguments)
|
69
|
+
{
|
70
|
+
(functor->target.object_member_function.object->*functor->target.object_member_function.function)
|
71
|
+
(arguments...);
|
72
|
+
};
|
73
|
+
}
|
74
|
+
|
75
|
+
|
76
|
+
template <class RR = R>
|
77
|
+
static Z_INLINE typename EnableIf<!Type<RR>::is_void, Call>::type object_member_function()
|
78
|
+
{
|
79
|
+
return [](const Functor *functor, typename Type<P>::to_forwardable... arguments)
|
80
|
+
{
|
81
|
+
return (functor->target.object_member_function.object->*functor->target.object_member_function.function)
|
82
|
+
(arguments...);
|
83
|
+
};
|
84
|
+
}
|
85
|
+
|
86
|
+
|
87
|
+
# if Z_HAS_CLASS(ObjectSelector)
|
88
|
+
|
89
|
+
typedef R (* CallObjectSelector)(id, SEL, P...);
|
90
|
+
|
91
|
+
|
92
|
+
template <class RR = R>
|
93
|
+
static Z_INLINE typename EnableIf<Type<RR>::is_void, Call>::type object_selector()
|
94
|
+
{
|
95
|
+
return [](const Functor *functor, typename Type<P>::to_forwardable... arguments)
|
96
|
+
{
|
97
|
+
((CallObjectSelector)objc_msgSend)
|
98
|
+
(functor->target.object_selector.object, functor->target.object_selector.selector,
|
99
|
+
arguments...);
|
100
|
+
};
|
101
|
+
}
|
102
|
+
|
103
|
+
|
104
|
+
# if Z_CPU_ARCHITECTURE == Z_CPU_ARCHITECTURE_X86_64 || \
|
105
|
+
Z_CPU_ARCHITECTURE == Z_CPU_ARCHITECTURE_X86_32
|
106
|
+
|
107
|
+
template <class RR = R>
|
108
|
+
static Z_INLINE typename EnableIf<
|
109
|
+
!Type<RR>::is_void &&
|
110
|
+
!Type<RR>::is_real &&
|
111
|
+
!Type<RR>::is_structure_or_union,
|
112
|
+
Call>::type object_selector()
|
113
|
+
{
|
114
|
+
return [](const Functor *functor, typename Type<P>::to_forwardable... arguments)
|
115
|
+
{
|
116
|
+
return ((CallObjectSelector)objc_msgSend)
|
117
|
+
(functor->target.object_selector.object, functor->target.object_selector.selector,
|
118
|
+
arguments...);
|
119
|
+
};
|
120
|
+
}
|
121
|
+
|
122
|
+
|
123
|
+
template <class RR = R>
|
124
|
+
static Z_INLINE typename EnableIf<Type<RR>::is_real, Call>::type object_selector()
|
125
|
+
{
|
126
|
+
return [](const Functor *functor, typename Type<P>::to_forwardable... arguments)
|
127
|
+
{
|
128
|
+
return ((CallObjectSelector)objc_msgSend_fpret)
|
129
|
+
(functor->target.object_selector.object, functor->target.object_selector.selector,
|
130
|
+
arguments...);
|
131
|
+
};
|
132
|
+
}
|
133
|
+
|
134
|
+
# else
|
135
|
+
|
136
|
+
template <class RR = R>
|
137
|
+
static Z_INLINE typename EnableIf<
|
138
|
+
!Type<RR>::is_void &&
|
139
|
+
!Type<RR>::is_structure_or_union,
|
140
|
+
Call>::type object_selector()
|
141
|
+
{
|
142
|
+
return [](const Functor *functor, typename Type<P>::to_forwardable... arguments)
|
143
|
+
{
|
144
|
+
return ((CallObjectSelector)objc_msgSend)
|
145
|
+
(functor->target.object_selector.object, functor->target.object_selector.selector,
|
146
|
+
arguments...);
|
147
|
+
};
|
148
|
+
}
|
149
|
+
|
150
|
+
# endif
|
151
|
+
|
152
|
+
|
153
|
+
template <class RR = R>
|
154
|
+
static Z_INLINE typename EnableIf<Type<RR>::is_structure_or_union, Call>::type object_selector()
|
155
|
+
{
|
156
|
+
return [](const Functor *functor, typename Type<P>::to_forwardable... arguments)
|
157
|
+
{
|
158
|
+
return ((CallObjectSelector)objc_msgSend_stret)
|
159
|
+
(functor->target.object_selector.object, functor->target.object_selector.selector,
|
160
|
+
arguments...);
|
161
|
+
};
|
162
|
+
}
|
163
|
+
|
164
|
+
# endif
|
165
|
+
};
|
166
|
+
|
167
|
+
|
168
|
+
public:
|
169
|
+
|
170
|
+
Z_CT(CPP11) Functor() : call(NULL), destroy(NULL) {}
|
171
|
+
|
172
|
+
|
173
|
+
Z_INLINE Functor(R (* function)(P...))
|
174
|
+
: call(Callers::function()), destroy(NULL)
|
175
|
+
{target.function = function;}
|
176
|
+
|
177
|
+
|
178
|
+
template <class O, class M, class E = typename EnableIf<
|
179
|
+
(Type<O>::is_void_pointer ||
|
180
|
+
(Type<O>::is_pointer &&
|
181
|
+
Type<O>::flow::pointee_type::is_structure_or_union)) &&
|
182
|
+
Type<M>::is_member_function_pointer &&
|
183
|
+
TypeAreEqual<
|
184
|
+
typename Type<M>::flow::to_function::end::to_unqualified,
|
185
|
+
R(P...)
|
186
|
+
>::value,
|
187
|
+
M>::type>
|
188
|
+
Z_INLINE Functor(O object, M function)
|
189
|
+
: call(Callers::object_member_function()), destroy(NULL)
|
190
|
+
{
|
191
|
+
target.object_member_function.function = (R (NaT::*)(P...))function;
|
192
|
+
target.object_member_function.object = (NaT *)object;
|
193
|
+
}
|
194
|
+
|
195
|
+
|
196
|
+
template <class O, class M, class E = typename EnableIf<
|
197
|
+
Type<O>::is_structure_or_union &&
|
198
|
+
Type<M>::is_member_function_pointer &&
|
199
|
+
TypeAreEqual<
|
200
|
+
typename Type<M>::flow::to_function::end::to_unqualified,
|
201
|
+
R(P...)
|
202
|
+
>::value,
|
203
|
+
M>::type>
|
204
|
+
Z_INLINE Functor(const O &object, M function)
|
205
|
+
: call(Callers::object_member_function()), destroy(NULL)
|
206
|
+
{
|
207
|
+
target.object_member_function.function = (R (NaT::*)(P...))function;
|
208
|
+
target.object_member_function.object = (NaT *)&object;
|
209
|
+
}
|
210
|
+
|
211
|
+
|
212
|
+
Z_INLINE Functor(const ObjectMemberFunction<R(P...)> &object_member_function)
|
213
|
+
: call(Callers::object_member_function()), destroy(NULL)
|
214
|
+
{
|
215
|
+
target.object_member_function.function = object_member_function.function;
|
216
|
+
target.object_member_function.object = object_member_function.object;
|
217
|
+
}
|
218
|
+
|
219
|
+
|
220
|
+
# if Z_HAS_CLASS(ObjectSelector)
|
221
|
+
|
222
|
+
Z_INLINE Functor(id object, SEL selector)
|
223
|
+
: call(Callers::object_selector()), destroy(NULL)
|
224
|
+
{
|
225
|
+
target.object_selector.selector = selector;
|
226
|
+
target.object_selector.object = object;
|
227
|
+
}
|
228
|
+
|
229
|
+
|
230
|
+
Z_INLINE Functor(const ObjectSelector<R(P...)> &object_selector)
|
231
|
+
: call(Callers::object_selector()), destroy(NULL)
|
232
|
+
{
|
233
|
+
target.object_selector.selector = object_selector.selector;
|
234
|
+
target.object_selector.object = object_selector.object;
|
235
|
+
}
|
236
|
+
|
237
|
+
# endif
|
238
|
+
|
239
|
+
|
240
|
+
Z_INLINE ~Functor() {if (destroy) destroy(this);}
|
241
|
+
|
242
|
+
|
243
|
+
Z_CT(CPP11) operator Boolean() const {return call != NULL;}
|
244
|
+
|
245
|
+
|
246
|
+
template <class RR = R>
|
247
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
248
|
+
operator ()(typename Type<P>::to_forwardable... arguments) const
|
249
|
+
{call(this, arguments...);}
|
250
|
+
|
251
|
+
|
252
|
+
template <class RR = R>
|
253
|
+
Z_INLINE typename EnableIf<!Type<RR>::is_void, RR>::type
|
254
|
+
operator ()(typename Type<P>::to_forwardable... arguments) const
|
255
|
+
{return call(this, arguments...);}
|
256
|
+
};
|
257
|
+
}
|
258
|
+
|
259
|
+
|
260
|
+
# define Z_HAS_CLASS_Functor TRUE
|
261
|
+
#else
|
262
|
+
# define Z_HAS_CLASS_Functor FALSE
|
263
|
+
#endif
|
264
|
+
|
265
|
+
#endif // _Z_classes_functional_Functor_HPP_
|
@@ -0,0 +1,98 @@
|
|
1
|
+
/* Z Kit - classes/functional/MemberFunction.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_MemberFunction_HPP_
|
9
|
+
#define _Z_classes_functional_MemberFunction_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
|
+
|
20
|
+
|
21
|
+
namespace Zeta {
|
22
|
+
|
23
|
+
template <class F> struct MemberFunction;
|
24
|
+
|
25
|
+
template <class R, class... P> struct MemberFunction<R(P...)> {
|
26
|
+
R (NaT::* function)(P...);
|
27
|
+
|
28
|
+
Z_INLINE MemberFunction() Z_DEFAULTED({})
|
29
|
+
|
30
|
+
|
31
|
+
# if Z_LANGUAGE_HAS_SPECIFIER(CPP, DECLARED_TYPE) && Z_LANGUAGE_HAS_LITERAL(CPP, NULL_POINTER)
|
32
|
+
Z_CT(CPP11) MemberFunction(NullPointer)
|
33
|
+
: function(NULL) {};
|
34
|
+
# endif
|
35
|
+
|
36
|
+
|
37
|
+
template <class M, class E = typename EnableIf<
|
38
|
+
Type<M>::is_member_function_pointer &&
|
39
|
+
TypeAreEqual<typename Type<M>::flow::to_function::end::to_unqualified, R(P...)>::value,
|
40
|
+
M>::type>
|
41
|
+
Z_INLINE MemberFunction(M function)
|
42
|
+
: function((R (NaT::*)(P...))function) {}
|
43
|
+
|
44
|
+
|
45
|
+
Z_CT(CPP11) operator Boolean() const {return function != NULL;}
|
46
|
+
|
47
|
+
|
48
|
+
template <class M, class E = typename EnableIf<
|
49
|
+
Type<M>::is_member_function_pointer &&
|
50
|
+
TypeAreEqual<typename Type<M>::flow::to_function::end::to_unqualified, R(P...)>::value,
|
51
|
+
M>::type>
|
52
|
+
Z_INLINE operator M() const {return (M)function;}
|
53
|
+
|
54
|
+
|
55
|
+
template <class M>
|
56
|
+
Z_INLINE typename EnableIf<
|
57
|
+
Type<M>::is_member_function_pointer &&
|
58
|
+
TypeAreEqual<typename Type<M>::flow::to_function::end::to_unqualified, R(P...)>::value,
|
59
|
+
MemberFunction &>::type
|
60
|
+
operator =(M rhs)
|
61
|
+
{
|
62
|
+
function = (R (NaT::*)(P...))rhs;
|
63
|
+
return *this;
|
64
|
+
}
|
65
|
+
|
66
|
+
|
67
|
+
template <class O, class RR = R>
|
68
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
69
|
+
operator ()(O *object, typename Type<P>::to_forwardable... arguments) const
|
70
|
+
{(((NaT *)object)->*function)(arguments...);}
|
71
|
+
|
72
|
+
|
73
|
+
template <class O, class RR = R>
|
74
|
+
Z_INLINE typename EnableIf<Type<R>::is_void, RR>::type
|
75
|
+
operator ()(const O &object, typename Type<P>::to_forwardable... arguments) const
|
76
|
+
{(((NaT *)&object)->*function)(arguments...);}
|
77
|
+
|
78
|
+
|
79
|
+
template <class O, class RR = R>
|
80
|
+
Z_INLINE typename EnableIf<!Type<R>::is_void, RR>::type
|
81
|
+
operator ()(O *object, typename Type<P>::to_forwardable... arguments) const
|
82
|
+
{return (((NaT *)object)->*function)(arguments...);}
|
83
|
+
|
84
|
+
|
85
|
+
template <class O, class RR = R>
|
86
|
+
Z_INLINE typename EnableIf<!Type<R>::is_void, RR>::type
|
87
|
+
operator ()(const O &object, typename Type<P>::to_forwardable... arguments) const
|
88
|
+
{return (((NaT *)&object)->*function)(arguments...);}
|
89
|
+
};
|
90
|
+
}
|
91
|
+
|
92
|
+
|
93
|
+
# define Z_HAS_CLASS_MemberFunction TRUE
|
94
|
+
#else
|
95
|
+
# define Z_HAS_CLASS_MemberFunction FALSE
|
96
|
+
#endif
|
97
|
+
|
98
|
+
#endif // _Z_classes_functional_MemberFunction_HPP_
|
@@ -0,0 +1,172 @@
|
|
1
|
+
/* Z Kit - classes/functional/ObjectMemberFunction.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_ObjectMemberFunction_HPP_
|
9
|
+
#define _Z_classes_functional_ObjectMemberFunction_HPP_
|
10
|
+
|
11
|
+
#include <Z/inspection/Z.h>
|
12
|
+
#include <Z/classes/functional/MemberFunction.hpp>
|
13
|
+
|
14
|
+
#if Z_HAS_CLASS(MemberFunction)
|
15
|
+
|
16
|
+
|
17
|
+
namespace Zeta {
|
18
|
+
|
19
|
+
template <class F> struct ObjectMemberFunction;
|
20
|
+
|
21
|
+
template <class R, class... P> struct ObjectMemberFunction<R(P...)> : MemberFunction<R(P...)> {
|
22
|
+
NaT *object;
|
23
|
+
|
24
|
+
Z_INLINE ObjectMemberFunction() Z_DEFAULTED({})
|
25
|
+
|
26
|
+
|
27
|
+
# if Z_LANGUAGE_HAS(CPP, INHERITING_CONSTRUCTORS)
|
28
|
+
using MemberFunction<R(P...)>::MemberFunction;
|
29
|
+
# else
|
30
|
+
template <class M, class E = typename EnableIf<
|
31
|
+
Type<M>::is_member_function_pointer &&
|
32
|
+
TypeAreEqual<typename Type<M>::flow::to_function::end::to_unqualified, R(P...)>::value,
|
33
|
+
M>::type>
|
34
|
+
Z_INLINE ObjectMemberFunction(M function)
|
35
|
+
: MemberFunction<R(P...)>(function) {}
|
36
|
+
# endif
|
37
|
+
|
38
|
+
|
39
|
+
# if Z_LANGUAGE_HAS_SPECIFIER(CPP, DECLARED_TYPE) && Z_LANGUAGE_HAS_LITERAL(CPP, NULL_POINTER)
|
40
|
+
Z_CT(CPP11) ObjectMemberFunction(NullPointer)
|
41
|
+
: MemberFunction<R(P...)>(NULL), object(NULL) {};
|
42
|
+
# endif
|
43
|
+
|
44
|
+
|
45
|
+
template <class O, class M, class E = typename EnableIf<
|
46
|
+
(Type<O>::is_void_pointer ||
|
47
|
+
(Type<O>::is_pointer &&
|
48
|
+
Type<O>::flow::pointee_type::is_structure_or_union)) &&
|
49
|
+
Type<M>::is_member_function_pointer &&
|
50
|
+
TypeAreEqual<typename Type<M>::flow::to_function::end::to_unqualified, R(P...)>::value,
|
51
|
+
M>::type>
|
52
|
+
Z_INLINE ObjectMemberFunction(O object, M function)
|
53
|
+
: MemberFunction<R(P...)>(function), object((NaT *)object) {}
|
54
|
+
|
55
|
+
|
56
|
+
template <class O, class M, class E = typename EnableIf<
|
57
|
+
Type<O>::is_structure_or_union &&
|
58
|
+
Type<M>::is_member_function_pointer &&
|
59
|
+
TypeAreEqual<typename Type<M>::flow::to_function::end::to_unqualified, R(P...)>::value,
|
60
|
+
M>::type>
|
61
|
+
Z_INLINE ObjectMemberFunction(const O &object, M function)
|
62
|
+
: MemberFunction<R(P...)>(function), object((NaT *)&object) {}
|
63
|
+
|
64
|
+
|
65
|
+
template <class O, class E = typename EnableIf<Type<O>::is_structure_or_union, O>::type>
|
66
|
+
Z_INLINE operator O *() const {return (O *)object;}
|
67
|
+
|
68
|
+
|
69
|
+
template <class O>
|
70
|
+
Z_INLINE typename EnableIf<Type<O>::is_structure_or_union, ObjectMemberFunction &>::type
|
71
|
+
operator =(O *rhs)
|
72
|
+
{
|
73
|
+
object = (NaT *)rhs;
|
74
|
+
return *this;
|
75
|
+
}
|
76
|
+
|
77
|
+
|
78
|
+
template <class O>
|
79
|
+
Z_INLINE typename EnableIf<Type<O>::is_structure_or_union, ObjectMemberFunction &>::type
|
80
|
+
operator =(const O &rhs)
|
81
|
+
{
|
82
|
+
object = (NaT *)&rhs;
|
83
|
+
return *this;
|
84
|
+
}
|
85
|
+
|
86
|
+
|
87
|
+
template <class M>
|
88
|
+
Z_INLINE typename EnableIf<
|
89
|
+
Type<M>::is_member_function_pointer &&
|
90
|
+
TypeAreEqual<typename Type<M>::flow::to_function::end::to_unqualified, R(P...)>::value,
|
91
|
+
ObjectMemberFunction &>::type
|
92
|
+
operator =(M rhs)
|
93
|
+
{
|
94
|
+
this->function = (R (NaT::*)(P...))rhs;
|
95
|
+
return *this;
|
96
|
+
}
|
97
|
+
|
98
|
+
|
99
|
+
template <class RR = R>
|
100
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
101
|
+
operator ()(typename Type<P>::to_forwardable... arguments) const
|
102
|
+
{(object->*this->function)(arguments...);}
|
103
|
+
|
104
|
+
|
105
|
+
template <class O, class RR = R>
|
106
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
107
|
+
operator ()(O *object, typename Type<P>::to_forwardable... arguments) const
|
108
|
+
{(((NaT *)object)->*this->function)(arguments...);}
|
109
|
+
|
110
|
+
|
111
|
+
template <class O, class RR = R>
|
112
|
+
Z_INLINE typename EnableIf<Type<RR>::is_void, RR>::type
|
113
|
+
operator ()(const O &object, typename Type<P>::to_forwardable... arguments) const
|
114
|
+
{(((NaT *)&object)->*this->function)(arguments...);}
|
115
|
+
|
116
|
+
|
117
|
+
template <class RR = R>
|
118
|
+
Z_INLINE typename EnableIf<!Type<RR>::is_void, RR>::type
|
119
|
+
operator ()(typename Type<P>::to_forwardable... arguments) const
|
120
|
+
{return (object->*this->function)(arguments...);}
|
121
|
+
|
122
|
+
|
123
|
+
template <class O, class RR = R>
|
124
|
+
Z_INLINE typename EnableIf<!Type<RR>::is_void, RR>::type
|
125
|
+
operator ()(O *object, typename Type<P>::to_forwardable... arguments) const
|
126
|
+
{return (((NaT *)object)->*this->function)(arguments...);}
|
127
|
+
|
128
|
+
|
129
|
+
template <class O, class RR = R>
|
130
|
+
Z_INLINE typename EnableIf<!Type<RR>::is_void, RR>::type
|
131
|
+
operator ()(const O &object, typename Type<P>::to_forwardable... arguments) const
|
132
|
+
{return (((NaT *)&object)->*this->function)(arguments...);}
|
133
|
+
|
134
|
+
|
135
|
+
template <class O, class M>
|
136
|
+
Z_INLINE typename EnableIf<
|
137
|
+
(Type<O>::is_void_pointer ||
|
138
|
+
(Type<O>::is_pointer &&
|
139
|
+
Type<O>::flow::pointee_type::is_structure_or_union)) &&
|
140
|
+
Type<M>::is_member_function_pointer &&
|
141
|
+
TypeAreEqual<typename Type<M>::flow::to_function::end::to_unqualified, R(P...)>::value,
|
142
|
+
ObjectMemberFunction &>::type
|
143
|
+
set(O object, M function)
|
144
|
+
{
|
145
|
+
this->function = (R (NaT::*)(P...))function;
|
146
|
+
this->object = (NaT *)&object;
|
147
|
+
return *this;
|
148
|
+
}
|
149
|
+
|
150
|
+
|
151
|
+
template <class O, class M>
|
152
|
+
Z_INLINE typename EnableIf<
|
153
|
+
Type<O>::is_structure_or_union &&
|
154
|
+
Type<M>::is_member_function_pointer &&
|
155
|
+
TypeAreEqual<typename Type<M>::flow::to_function::end::to_unqualified, R(P...)>::value,
|
156
|
+
ObjectMemberFunction &>::type
|
157
|
+
set(const O &object, M function)
|
158
|
+
{
|
159
|
+
this->function = (R (NaT::*)(P...))function;
|
160
|
+
this->object = (NaT *)&object;
|
161
|
+
return *this;
|
162
|
+
}
|
163
|
+
};
|
164
|
+
}
|
165
|
+
|
166
|
+
|
167
|
+
# define Z_HAS_CLASS_ObjectMemberFunction TRUE
|
168
|
+
#else
|
169
|
+
# define Z_HAS_CLASS_ObjectMemberFunction FALSE
|
170
|
+
#endif
|
171
|
+
|
172
|
+
#endif // _Z_classes_functional_ObjectMemberFunction_HPP_
|