Changeset 6698 for code/branches/chat/src/orxonox/ChatHistory.cc
- Timestamp:
- Apr 12, 2010, 5:08:27 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.