Changeset 7190
- Timestamp:
- Aug 19, 2010, 5:48:01 PM (14 years ago)
- Location:
- code/branches/consolecommands3/src/libraries
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/consolecommands3/src/libraries/core/ConfigFileManager.cc
r7163 r7190 543 543 } 544 544 545 bool SettingsConfigFile::config(const std::string& section, const std::string& entry, const std::string& value) 546 { 547 return this->configImpl(section, entry, value, &ConfigValueContainer::set); 548 } 549 550 bool SettingsConfigFile::tconfig(const std::string& section, const std::string& entry, const std::string& value) 551 { 552 return this->configImpl(section, entry, value, &ConfigValueContainer::tset); 545 void SettingsConfigFile::config(const std::string& section, const std::string& entry, const std::string& value) 546 { 547 if (!this->configImpl(section, entry, value, &ConfigValueContainer::set)) 548 COUT(1) << "Error: Config value \"" << entry << "\" in section \"" << section << "\" doesn't exist." << std::endl; 549 } 550 551 void SettingsConfigFile::tconfig(const std::string& section, const std::string& entry, const std::string& value) 552 { 553 if (!this->configImpl(section, entry, value, &ConfigValueContainer::tset)) 554 COUT(1) << "Error: Config value \"" << entry << "\" in section \"" << section << "\" doesn't exist." << std::endl; 553 555 } 554 556 -
code/branches/consolecommands3/src/libraries/core/ConfigFileManager.h
r7163 r7190 331 331 void clean(bool bCleanComments = false); // tolua_export 332 332 333 boolconfig(const std::string& section, const std::string& entry, const std::string& value); // tolua_export334 booltconfig(const std::string& section, const std::string& entry, const std::string& value); // tolua_export333 void config(const std::string& section, const std::string& entry, const std::string& value); // tolua_export 334 void tconfig(const std::string& section, const std::string& entry, const std::string& value); // tolua_export 335 335 std::string getConfig(const std::string& section, const std::string& entry); // tolua_export 336 336 -
code/branches/consolecommands3/src/libraries/network/ClientConnection.cc
r6417 r7190 149 149 uint32_t ClientConnection::getRTT() 150 150 { 151 assert(server_); 152 return server_->roundTripTime; 151 if (server_) 152 return server_->roundTripTime; 153 else 154 return 0; 153 155 } 154 156 -
code/branches/consolecommands3/src/libraries/network/Host.cc
r7163 r7190 89 89 } 90 90 91 boolHost::Chat(const std::string& message)91 void Host::Chat(const std::string& message) 92 92 { 93 93 if(instances_s.size()==0) … … 95 95 for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it) 96 96 it->incomingChat(message, 0); 97 return true;97 // return true; 98 98 } 99 99 else … … 108 108 } 109 109 } 110 return result;110 // return result; 111 111 } 112 112 } … … 139 139 for (ObjectList<ChatListener>::iterator it = ObjectList<ChatListener>::begin(); it != ObjectList<ChatListener>::end(); ++it) 140 140 it->incomingChat(message, playerID); 141 141 142 142 bool result = true; 143 143 for( std::vector<Host*>::iterator it = instances_s.begin(); it!=instances_s.end(); ++it ) -
code/branches/consolecommands3/src/libraries/network/Host.h
r7163 r7190 79 79 static void setShipID(unsigned int id){ shipID_s = id; } 80 80 static bool isServer(); 81 static boolChat(const std::string& message);81 static void Chat(const std::string& message); 82 82 static bool Broadcast(const std::string& message); 83 83 static bool incomingChat(const std::string& message, unsigned int playerID); -
code/branches/consolecommands3/src/libraries/util/OutputHandler.h
r6105 r7190 104 104 105 105 //! Writes to all output devices 106 static inline const std::string&log(const std::string& text)107 { OutputHandler::getOutStream(0).output(text) << std::endl; return text;}106 static inline void log(const std::string& text) 107 { OutputHandler::getOutStream(0).output(text) << std::endl; } 108 108 109 109 //! Writes an error message to the output 110 static inline const std::string&error(const std::string& text)111 { OutputHandler::getOutStream(1).output(text) << std::endl; return text;}110 static inline void error(const std::string& text) 111 { OutputHandler::getOutStream(1).output(text) << std::endl; } 112 112 113 113 //! Writes a warning message to the output 114 static inline const std::string&warning(const std::string& text)115 { OutputHandler::getOutStream(2).output(text) << std::endl; return text;}114 static inline void warning(const std::string& text) 115 { OutputHandler::getOutStream(2).output(text) << std::endl; } 116 116 117 117 //! Writes an informational message to the output 118 static inline const std::string&info(const std::string& text)119 { OutputHandler::getOutStream(3).output(text) << std::endl; return text;}118 static inline void info(const std::string& text) 119 { OutputHandler::getOutStream(3).output(text) << std::endl; } 120 120 121 121 //! Writes a debug message to the output 122 static inline const std::string&debug(const std::string& text)123 { OutputHandler::getOutStream(4).output(text) << std::endl; return text;}122 static inline void debug(const std::string& text) 123 { OutputHandler::getOutStream(4).output(text) << std::endl; } 124 124 125 125 //! Registers an object that receives output via a provided std::ostream
Note: See TracChangeset
for help on using the changeset viewer.