Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/src/orxonox/objects/test1.cc @ 617

Last change on this file since 617 was 616, checked in by nicolasc, 17 years ago

changed include names to new file names…<

File size: 2.4 KB
Line 
1#include "test1.h"
2#include "test2.h"
3#include "test3.h"
4#include "../../tinyxml/tinyxml.h"
5#include "../Orxonox.h"
6#include <OgreSceneManager.h>
7
8namespace orxonox
9{
10    CreateFactory(Test1);
11
12    Test1::Test1()
13    {
14        RegisterObject(Test1);
15
16        this->usefullClass1_ = Class(Test1);
17        this->usefullClass2_ = Class(Test2);
18        this->usefullClass3_ = Class(Test3);
19    }
20
21    Test1::~Test1()
22    {
23    }
24
25    void Test1::tick(float dt)
26    {
27        std::cout << "Test1: " << this << "\n";
28    }
29
30    bool Test1::usefullClass1isA(Identifier* identifier)
31    {
32        return this->usefullClass1_->isA(identifier);
33    }
34
35    bool Test1::usefullClass2isA(Identifier* identifier)
36    {
37        return this->usefullClass2_->isA(identifier);
38    }
39
40    bool Test1::usefullClass3isA(Identifier* identifier)
41    {
42        return this->usefullClass3_.isA(identifier);
43    }
44
45    void Test1::setUsefullClass1(Identifier* identifier)
46    {
47        std::cout << "\n";
48        std::cout << "Test1: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
49        std::cout << "Test1: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
50        std::cout << "Test1: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
51        this->usefullClass1_ = identifier;
52    }
53
54    void Test1::setUsefullClass2(Identifier* identifier)
55    {
56        std::cout << "\n";
57        std::cout << "Test1: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
58        std::cout << "Test1: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
59        std::cout << "Test1: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
60        this->usefullClass2_ = identifier;
61    }
62
63    void Test1::setUsefullClassOfTypeTest3(Identifier* identifier)
64    {
65        std::cout << "\n";
66        std::cout << "Test1: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << "\n";
67        std::cout << "Test1: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << "\n";
68        std::cout << "Test1: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << "\n";
69        this->usefullClass3_ = identifier;
70    }
71
72    void Test1::loadParams(TiXmlElement* xmlElem)
73    {
74
75
76
77    }
78}
Note: See TracBrowser for help on using the repository browser.