Changeset 6698
- Timestamp:
- Apr 12, 2010, 5:08:27 PM (15 years ago)
- Location:
- code/branches/chat/src/orxonox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/chat/src/orxonox/CMakeLists.txt
r6524 r6698 32 32 PlayerManager.cc 33 33 Radar.cc 34 ChatHistory.cc 34 35 COMPILATION_BEGIN SceneCompilation.cc 35 36 CameraManager.cc -
code/branches/chat/src/orxonox/ChatHistory.cc
r6693 r6698 28 28 29 29 #include "ChatHistory.h" 30 #include "core/ScopedSingletonManager.h" 30 31 31 #ifndef TEST32 #ifndef CHATTEST 32 33 namespace orxonox 33 34 { 35 /* singleton */ 36 ManageScopedSingleton( ChatHistory, ScopeID::Root, false ); 34 37 #endif 35 38 36 39 /* constructor */ 37 #ifndef TEST40 #ifndef CHATTEST 38 41 ChatHistory(BaseObject* creator) : BaseObject(creator) 39 42 #else … … 42 45 { 43 46 /* register the object */ 44 #ifndef TEST47 #ifndef CHATTEST 45 48 RegisterObject(ChatHistory); 46 49 #endif … … 55 58 this->chat_hist_logline( "--- Logfile opened ---" ); 56 59 } 60 61 assert(0); 57 62 58 63 /* Read setting for maximum number of lines and set limit */ … … 76 81 std::string text; 77 82 78 #ifndef TEST 83 COUT(0) << "Meow.\n"; 84 85 #ifndef CHATTEST 79 86 if (senderID != CLIENTID_UNKNOWN) 80 87 { … … 104 111 //if( this->hist_logfile ) 105 112 //this->hist_logfile.sync(); 113 return 0; 106 114 } 107 115 … … 115 123 /* push to the front of the history */ 116 124 this->hist_buffer.push_back( toadd ); 125 return 0; 117 126 } 118 127 … … 123 132 if( this->hist_log_enabled ) 124 133 this->hist_logfile << toadd << std::endl; 134 return 0; 125 135 } 126 136 … … 131 141 * and set the this->hist_logfile_path variable to it 132 142 */ 133 #ifndef TEST143 #ifndef CHATTEST 134 144 this->hist_logfile.open( PathConfig::getInstance().getLogPathString() + 135 145 "chatlog.log", … … 143 153 if( !this->hist_logfile ) 144 154 { this->hist_log_enabled = false; 145 #ifndef TEST155 #ifndef CHATTEST 146 156 COUT(2) << "Warning: Could not open logfile." << std::endl; 147 157 #endif … … 176 186 } 177 187 178 #ifndef TEST188 #ifndef CHATTEST 179 189 } 180 190 #endif -
code/branches/chat/src/orxonox/ChatHistory.h
r6693 r6698 31 31 #include <fstream> 32 32 #include <iostream> 33 #include <cassert> 33 34 34 35 /* define this if you're unit testing */ 35 #define TEST 136 #define CHATTEST 0 36 37 37 #ifndef TEST38 #ifndef CHATTEST 38 39 #include <core/BaseObject.h> 39 40 #include <core/PathConfig.h> 41 #include <Singleton.h> 40 42 #endif 41 43 … … 45 47 46 48 /* Class to implement chat history */ 47 #ifndef TEST49 #ifndef CHATTEST 48 50 namespace orxonox 49 51 { … … 51 53 52 54 /* constructor */ 53 #ifndef TEST 54 class _OrxonoxExport ChatHistory : public BaseObject, public ChatListener 55 #ifndef CHATTEST 56 class _OrxonoxExport ChatHistory : public BaseObject, public ChatListener, 57 public Singleton<ChatHistory> 58 55 59 #else 56 60 class ChatHistory … … 59 63 public: 60 64 /* constructors, destructors */ 61 #ifndef TEST65 #ifndef CHATTEST 62 66 ChatHistory(BaseObject* creator); 67 friend class Singleton<ChatHistory>; 63 68 #else 64 69 ChatHistory(); … … 102 107 std::ofstream hist_logfile; 103 108 109 #ifndef CHATTEST 110 static ChatHistory* singletonPtr_s; 111 #endif 104 112 105 113 … … 131 139 }; 132 140 133 #ifndef TEST141 #ifndef CHATTEST 134 142 } 135 143 #endif -
code/branches/chat/src/orxonox/graphics/CMakeLists.txt
r6637 r6698 2 2 Billboard.cc 3 3 BlinkingBillboard.cc 4 ChatBox.cc5 4 FadingBillboard.cc 6 5 GlobalShader.cc
Note: See TracChangeset
for help on using the changeset viewer.