Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/audio/src/class_hierarchy/test3.cc @ 324

Last change on this file since 324 was 300, checked in by nicolasc, 17 years ago

initial merge of main_reto

File size: 1.8 KB
Line 
1#include "test1.h"
2#include "test2.h"
3#include "test3.h"
4
5namespace orxonox
6{
7    Test3::Test3()
8    {
9        registerObject(Test3);
10    }
11
12    Test3::~Test3()
13    {
14    }
15        #define testandcout(code) \
16          std::cout << #code << " " << code << "\n"
17
18    bool Test3::usefullClassesIsATest(Test1* test1)
19    {
20        std::cout << "\n";
21        std::cout << "Test1:\n";
22        testandcout(test1->usefullClass1isA(Class(Test1)));
23        testandcout(test1->usefullClass1isA(Class(Test2)));
24        testandcout(test1->usefullClass1isA(Class(Test3)));
25        std::cout << "\n";
26        testandcout(test1->usefullClass2isA(Class(Test1)));
27        testandcout(test1->usefullClass2isA(Class(Test2)));
28        testandcout(test1->usefullClass2isA(Class(Test3)));
29        std::cout << "\n";
30        testandcout(test1->usefullClass3isA(Class(Test1)));
31        testandcout(test1->usefullClass3isA(Class(Test2)));
32        testandcout(test1->usefullClass3isA(Class(Test3)));
33        return true;
34    }
35
36    bool Test3::usefullClassesIsATest(Test2* test2)
37    {
38        std::cout << "\n";
39        std::cout << "Test2:\n";
40        testandcout(test2->usefullClass1isA(Class(Test1)));
41        testandcout(test2->usefullClass1isA(Class(Test2)));
42        testandcout(test2->usefullClass1isA(Class(Test3)));
43        std::cout << "\n";
44        testandcout(test2->usefullClass2isA(Class(Test1)));
45        testandcout(test2->usefullClass2isA(Class(Test2)));
46        testandcout(test2->usefullClass2isA(Class(Test3)));
47        std::cout << "\n";
48        testandcout(test2->usefullClass3isA(Class(Test1)));
49        testandcout(test2->usefullClass3isA(Class(Test2)));
50        testandcout(test2->usefullClass3isA(Class(Test3)));
51        return true;
52    }
53}
Note: See TracBrowser for help on using the repository browser.