]> git.saurik.com Git - apple/dyld.git/blob - testing/kernel-cache-tests/kext-vtable-patching-overrides/foo.cpp
dyld-851.27.tar.gz
[apple/dyld.git] / testing / kernel-cache-tests / kext-vtable-patching-overrides / foo.cpp
1
2 #include "foo.h"
3
4 OSDefineMetaClassAndStructors( Foo, OSObject )
5
6 // Index 0 has been replaced with a method
7 OSMetaClassDefineReservedUsed(Foo, 0)
8 OSMetaClassDefineReservedUnused( Foo, 1 )
9 OSMetaClassDefineReservedUnused( Foo, 2 )
10 OSMetaClassDefineReservedUnused( Foo, 3 )
11
12 int Foo::foo() {
13 return 0;
14 }
15
16 int Foo::fooOverride() {
17 return 0;
18 }
19
20 int Foo::fooUsed0() {
21 return 0;
22 }
23
24 OSDefineMetaClassAndStructors( FooSub, Foo )
25
26 int FooSub::foo() {
27 return 0;
28 }
29
30 int FooSub::fooOverride() {
31 return 0;
32 }
33
34 int foo() {
35 Foo* foo = new Foo();
36 return foo->foo() + foo->fooUsed0();
37 }