Changeset 790 for code/trunk/src/orxonox/objects/test3.cc
- Timestamp:
- Feb 7, 2008, 5:01:44 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
-
Property
svn:ignore
set to
dependencies
-
Property
svn:ignore
set to
-
code/trunk/src/orxonox/objects/test3.cc
r258 r790 1 /* 2 * ORXONOX - the hottest 3D action shooter ever to exist 3 * 4 * 5 * License notice: 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 * Author: 22 * Fabian 'x3n' Landau 23 * Co-authors: 24 * ... 25 * 26 */ 27 1 28 #include "test1.h" 2 29 #include "test2.h" … … 10 37 { 11 38 RegisterObject(Test3); 39 40 this->setConfigValues(); 41 } 42 43 void Test3::setConfigValues() 44 { 45 SetConfigValue(value_int_, 1); 46 SetConfigValue(value_uint_, 1); 47 SetConfigValue(value_char_, 1); 48 SetConfigValue(value_uchar_, 1); 49 SetConfigValue(value_float_, 1); 50 SetConfigValue(value_double_, 1); 51 SetConfigValue(value_bool_, 1); 52 SetConfigValue(value_string_, "This is a test"); 53 SetConfigValue(value_constchar_, "This is another test"); 54 SetConfigValue(value_vector2_, Vector2(101, 202)); 55 SetConfigValue(value_vector3_, Vector3(13, 26, 39)); 56 SetConfigValue(value_colourvalue_, ColourValue(1.0, 0.5, 0.25, 0.887)); 12 57 } 13 58 … … 15 60 { 16 61 } 17 #define testandcout(code) \18 std::cout << #code << " " << code << "\n"19 62 20 bool Test3::usefullClassesIsATest(Test1* test1)63 void Test3::configOutput() 21 64 { 22 std::cout << "\n"; 23 std::cout << "Test1:\n"; 65 std::cout << this->value_int_ << std::endl; 66 std::cout << this->value_uint_ << std::endl; 67 std::cout << (int)this->value_char_ << std::endl; 68 std::cout << (int)this->value_uchar_ << std::endl; 69 std::cout << this->value_float_ << std::endl; 70 std::cout << this->value_double_ << std::endl; 71 std::cout << this->value_bool_ << std::endl; 72 std::cout << this->value_string_ << std::endl; 73 std::cout << this->value_constchar_ << std::endl; 74 std::cout << this->value_vector2_ << std::endl; 75 std::cout << this->value_vector3_ << std::endl; 76 std::cout << this->value_colourvalue_ << std::endl; 77 } 78 79 #define testandcout(code) \ 80 std::cout << #code << " " << code << std::endl 81 82 void Test3::usefullClassesIsATest(Test1* test1) 83 { 84 std::cout << std::endl; 85 std::cout << "Test1:" << std::endl; 24 86 testandcout(test1->usefullClass1isA(Class(Test1))); 25 87 testandcout(test1->usefullClass1isA(Class(Test2))); 26 88 testandcout(test1->usefullClass1isA(Class(Test3))); 27 std::cout << "\n";89 std::cout << std::endl; 28 90 testandcout(test1->usefullClass2isA(Class(Test1))); 29 91 testandcout(test1->usefullClass2isA(Class(Test2))); 30 92 testandcout(test1->usefullClass2isA(Class(Test3))); 31 std::cout << "\n";93 std::cout << std::endl; 32 94 testandcout(test1->usefullClass3isA(Class(Test1))); 33 95 testandcout(test1->usefullClass3isA(Class(Test2))); … … 35 97 } 36 98 37 boolTest3::usefullClassesIsATest(Test2* test2)99 void Test3::usefullClassesIsATest(Test2* test2) 38 100 { 39 std::cout << "\n";40 std::cout << "Test2: \n";101 std::cout << std::endl; 102 std::cout << "Test2:" << std::endl; 41 103 testandcout(test2->usefullClass1isA(Class(Test1))); 42 104 testandcout(test2->usefullClass1isA(Class(Test2))); 43 105 testandcout(test2->usefullClass1isA(Class(Test3))); 44 std::cout << "\n";106 std::cout << std::endl; 45 107 testandcout(test2->usefullClass2isA(Class(Test1))); 46 108 testandcout(test2->usefullClass2isA(Class(Test2))); 47 109 testandcout(test2->usefullClass2isA(Class(Test3))); 48 std::cout << "\n";110 std::cout << std::endl; 49 111 testandcout(test2->usefullClass3isA(Class(Test1))); 50 112 testandcout(test2->usefullClass3isA(Class(Test2)));
Note: See TracChangeset
for help on using the changeset viewer.