Last change
on this file since 318 was
258,
checked in by landauf, 17 years ago
|
merged object-hierarchy back to trunk
|
File size:
1.7 KB
|
Line | |
---|
1 | #include "test1.h" |
---|
2 | #include "test2.h" |
---|
3 | #include "test3.h" |
---|
4 | |
---|
5 | namespace orxonox |
---|
6 | { |
---|
7 | CreateFactory(Test3); |
---|
8 | |
---|
9 | Test3::Test3() |
---|
10 | { |
---|
11 | RegisterObject(Test3); |
---|
12 | } |
---|
13 | |
---|
14 | Test3::~Test3() |
---|
15 | { |
---|
16 | } |
---|
17 | #define testandcout(code) \ |
---|
18 | std::cout << #code << " " << code << "\n" |
---|
19 | |
---|
20 | bool Test3::usefullClassesIsATest(Test1* test1) |
---|
21 | { |
---|
22 | std::cout << "\n"; |
---|
23 | std::cout << "Test1:\n"; |
---|
24 | testandcout(test1->usefullClass1isA(Class(Test1))); |
---|
25 | testandcout(test1->usefullClass1isA(Class(Test2))); |
---|
26 | testandcout(test1->usefullClass1isA(Class(Test3))); |
---|
27 | std::cout << "\n"; |
---|
28 | testandcout(test1->usefullClass2isA(Class(Test1))); |
---|
29 | testandcout(test1->usefullClass2isA(Class(Test2))); |
---|
30 | testandcout(test1->usefullClass2isA(Class(Test3))); |
---|
31 | std::cout << "\n"; |
---|
32 | testandcout(test1->usefullClass3isA(Class(Test1))); |
---|
33 | testandcout(test1->usefullClass3isA(Class(Test2))); |
---|
34 | testandcout(test1->usefullClass3isA(Class(Test3))); |
---|
35 | } |
---|
36 | |
---|
37 | bool Test3::usefullClassesIsATest(Test2* test2) |
---|
38 | { |
---|
39 | std::cout << "\n"; |
---|
40 | std::cout << "Test2:\n"; |
---|
41 | testandcout(test2->usefullClass1isA(Class(Test1))); |
---|
42 | testandcout(test2->usefullClass1isA(Class(Test2))); |
---|
43 | testandcout(test2->usefullClass1isA(Class(Test3))); |
---|
44 | std::cout << "\n"; |
---|
45 | testandcout(test2->usefullClass2isA(Class(Test1))); |
---|
46 | testandcout(test2->usefullClass2isA(Class(Test2))); |
---|
47 | testandcout(test2->usefullClass2isA(Class(Test3))); |
---|
48 | std::cout << "\n"; |
---|
49 | testandcout(test2->usefullClass3isA(Class(Test1))); |
---|
50 | testandcout(test2->usefullClass3isA(Class(Test2))); |
---|
51 | testandcout(test2->usefullClass3isA(Class(Test3))); |
---|
52 | } |
---|
53 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.