Changeset 9550 for code/trunk/src/libraries/core
- Timestamp:
- Mar 12, 2013, 11:13:03 PM (12 years ago)
- Location:
- code/trunk
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/testing (added) merged: 9015,9017,9020-9022,9025-9026,9047,9076-9078,9114-9115,9221-9226,9356,9473-9480,9524,9529-9531,9533-9545,9547-9549
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/CommandLineParser.cc
r8858 r9550 50 50 void CommandLineArgument::parse(const std::string& value) 51 51 { 52 if (value_. getType() == MT_Type::Bool)52 if (value_.isType<bool>()) 53 53 { 54 54 // simulate command line switch … … 69 69 else 70 70 { 71 if (!value_.set Value(value))72 { 73 value_.set Value(defaultValue_);71 if (!value_.set(value)) 72 { 73 value_.set(defaultValue_); 74 74 ThrowException(Argument, "Could not read command line argument '" + getName() + "'."); 75 75 } … … 298 298 infoStr << " "; 299 299 infoStr << "--" << it->second->getName() << ' '; 300 if (it->second->getValue().getType() != MT_Type::Bool) 300 if (it->second->getValue().isType<bool>()) 301 infoStr << " "; 302 else 301 303 infoStr << "ARG "; 302 else303 infoStr << " ";304 304 // fill with the necessary amount of blanks 305 305 infoStr << std::string(maxNameSize - it->second->getName().size(), ' '); -
code/trunk/src/libraries/core/CommandLineParser.h
r8858 r9550 200 200 inline void CommandLineParser::getValue<std::string>(const std::string& name, std::string* value) 201 201 { 202 *value = getArgument(name)->getValue().get String();202 *value = getArgument(name)->getValue().get<std::string>(); 203 203 } 204 204 … … 217 217 OrxAssert(!_getInstance().existsArgument(name), 218 218 "Cannot add a command line argument with name '" + name + "' twice."); 219 OrxAssert( MultiType(defaultValue).getType() != MT_Type::Bool || MultiType(defaultValue).getBool() != true,219 OrxAssert(!MultiType(defaultValue).isType<bool>() || MultiType(defaultValue).get<bool>() != true, 220 220 "Boolean command line arguments with positive default values are not supported." << endl 221 221 << "Please use SetCommandLineSwitch and adjust your argument: " << name); -
code/trunk/src/libraries/core/ConfigValueContainer.cc
r8858 r9550 70 70 this->bIsVector_ = false; 71 71 72 this->defvalueString_ = this->value_.get String();72 this->defvalueString_ = this->value_.get<std::string>(); 73 73 this->update(); 74 74 } … … 83 83 for (unsigned int i = 0; i < this->valueVector_.size(); i++) 84 84 { 85 ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType (MT_Type::String));85 ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType<std::string>()); 86 86 this->defvalueStringVector_.push_back(this->valueVector_[i]); 87 87 } … … 118 118 if (this->tset(input)) 119 119 { 120 ConfigFileManager::getInstance().getConfigFile(this->type_)->setValue(this->sectionname_, this->varname_, input, this->value_.isType (MT_Type::String));120 ConfigFileManager::getInstance().getConfigFile(this->type_)->setValue(this->sectionname_, this->varname_, input, this->value_.isType<std::string>()); 121 121 return true; 122 122 } … … 137 137 if (this->tset(index, input)) 138 138 { 139 ConfigFileManager::getInstance().getConfigFile(this->type_)->setValue(this->sectionname_, this->varname_, index, input, this->value_.isType (MT_Type::String));139 ConfigFileManager::getInstance().getConfigFile(this->type_)->setValue(this->sectionname_, this->varname_, index, input, this->value_.isType<std::string>()); 140 140 return true; 141 141 } … … 236 236 this->valueVector_.erase(this->valueVector_.begin() + index); 237 237 for (unsigned int i = index; i < this->valueVector_.size(); i++) 238 ConfigFileManager::getInstance().getConfigFile(this->type_)->setValue(this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType (MT_Type::String));238 ConfigFileManager::getInstance().getConfigFile(this->type_)->setValue(this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType<std::string>()); 239 239 ConfigFileManager::getInstance().getConfigFile(this->type_)->deleteVectorEntries(this->sectionname_, this->varname_, this->valueVector_.size()); 240 240 … … 272 272 { 273 273 if (!this->bIsVector_) 274 this->value_ = ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, this->defvalueString_, this->value_.isType (MT_Type::String));274 this->value_ = ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, this->defvalueString_, this->value_.isType<std::string>()); 275 275 else 276 276 { … … 281 281 if (i < this->defvalueStringVector_.size()) 282 282 { 283 this->value_ = ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isType (MT_Type::String));283 this->value_ = ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isType<std::string>()); 284 284 } 285 285 else 286 286 { 287 this->value_ = ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, i, MultiType(), this->value_.isType (MT_Type::String));287 this->value_ = ConfigFileManager::getInstance().getConfigFile(this->type_)->getOrCreateValue(this->sectionname_, this->varname_, i, MultiType(), this->value_.isType<std::string>()); 288 288 } 289 289 -
code/trunk/src/libraries/core/Core.cc
r8858 r9550 55 55 #include "util/Exception.h" 56 56 #include "util/output/LogWriter.h" 57 #include "util/output/OutputManager.h" 57 58 #include "util/Scope.h" 58 59 #include "util/ScopedSingletonManager.h" … … 167 168 this->configFileManager_ = new ConfigFileManager(); 168 169 this->configFileManager_->setFilename(ConfigFileType::Settings, 169 CommandLineParser::getValue("settingsFile").get String());170 CommandLineParser::getValue("settingsFile").get<std::string>()); 170 171 171 172 // Required as well for the config values … … 180 181 181 182 // Set the correct log path and rewrite the log file with the correct log levels 182 LogWriter::getInstance().setLogPath(PathConfig::getLogPathString());183 OutputManager::getInstance().getLogWriter()->setLogDirectory(PathConfig::getLogPathString()); 183 184 184 185 #if !defined(ORXONOX_PLATFORM_APPLE) && !defined(ORXONOX_USE_WINMAIN) 185 186 // Create persistent IO console 186 if (CommandLineParser::getValue("noIOConsole").get Bool())187 if (CommandLineParser::getValue("noIOConsole").get<bool>()) 187 188 { 188 189 ModifyConfigValue(bStartIOConsole_, tset, false); … … 258 259 void Core::setConfigValues() 259 260 { 260 SetConfigValueExternal( LogWriter::getInstance().configurableMaxLevel_,261 LogWriter::getInstance().getConfigurableSectionName(),262 LogWriter::getInstance().getConfigurableMaxLevelName(),263 LogWriter::getInstance().configurableMaxLevel_)261 SetConfigValueExternal(OutputManager::getInstance().getLogWriter()->configurableMaxLevel_, 262 OutputManager::getInstance().getLogWriter()->getConfigurableSectionName(), 263 OutputManager::getInstance().getLogWriter()->getConfigurableMaxLevelName(), 264 OutputManager::getInstance().getLogWriter()->configurableMaxLevel_) 264 265 .description("The maximum level of output shown in the log file") 265 .callback(static_cast<BaseWriter*>( &LogWriter::getInstance()), &BaseWriter::changedConfigurableLevel);266 SetConfigValueExternal( LogWriter::getInstance().configurableAdditionalContextsMaxLevel_,267 LogWriter::getInstance().getConfigurableSectionName(),268 LogWriter::getInstance().getConfigurableAdditionalContextsMaxLevelName(),269 LogWriter::getInstance().configurableAdditionalContextsMaxLevel_)266 .callback(static_cast<BaseWriter*>(OutputManager::getInstance().getLogWriter()), &BaseWriter::changedConfigurableLevel); 267 SetConfigValueExternal(OutputManager::getInstance().getLogWriter()->configurableAdditionalContextsMaxLevel_, 268 OutputManager::getInstance().getLogWriter()->getConfigurableSectionName(), 269 OutputManager::getInstance().getLogWriter()->getConfigurableAdditionalContextsMaxLevelName(), 270 OutputManager::getInstance().getLogWriter()->configurableAdditionalContextsMaxLevel_) 270 271 .description("The maximum level of output shown in the log file for additional contexts") 271 .callback(static_cast<BaseWriter*>( &LogWriter::getInstance()), &BaseWriter::changedConfigurableAdditionalContextsLevel);272 SetConfigValueExternal( LogWriter::getInstance().configurableAdditionalContexts_,273 LogWriter::getInstance().getConfigurableSectionName(),274 LogWriter::getInstance().getConfigurableAdditionalContextsName(),275 LogWriter::getInstance().configurableAdditionalContexts_)272 .callback(static_cast<BaseWriter*>(OutputManager::getInstance().getLogWriter()), &BaseWriter::changedConfigurableAdditionalContextsLevel); 273 SetConfigValueExternal(OutputManager::getInstance().getLogWriter()->configurableAdditionalContexts_, 274 OutputManager::getInstance().getLogWriter()->getConfigurableSectionName(), 275 OutputManager::getInstance().getLogWriter()->getConfigurableAdditionalContextsName(), 276 OutputManager::getInstance().getLogWriter()->configurableAdditionalContexts_) 276 277 .description("Additional output contexts shown in the log file") 277 .callback(static_cast<BaseWriter*>( &LogWriter::getInstance()), &BaseWriter::changedConfigurableAdditionalContexts);278 .callback(static_cast<BaseWriter*>(OutputManager::getInstance().getLogWriter()), &BaseWriter::changedConfigurableAdditionalContexts); 278 279 279 280 SetConfigValue(bDevMode_, PathConfig::buildDirectoryRun()) … … 337 338 { 338 339 orxout(internal_info) << "loading graphics in Core" << endl; 339 340 340 341 // Any exception should trigger this, even in upgradeToGraphics (see its remarks) 341 342 Loki::ScopeGuard unloader = Loki::MakeObjGuard(*this, &Core::unloadGraphics); -
code/trunk/src/libraries/core/PathConfig.cc
r8858 r9550 188 188 // Check for data path override by the command line 189 189 if (!CommandLineParser::getArgument("externalDataPath")->hasDefaultValue()) 190 externalDataPath_ = CommandLineParser::getValue("externalDataPath").get String();190 externalDataPath_ = CommandLineParser::getValue("externalDataPath").get<std::string>(); 191 191 else 192 192 externalDataPath_ = specialConfig::externalDataDevDirectory; … … 227 227 if (!CommandLineParser::getArgument("writingPathSuffix")->hasDefaultValue()) 228 228 { 229 const std::string& directory(CommandLineParser::getValue("writingPathSuffix").get String());229 const std::string& directory(CommandLineParser::getValue("writingPathSuffix").get<std::string>()); 230 230 configPath_ = configPath_ / directory; 231 231 logPath_ = logPath_ / directory; -
code/trunk/src/libraries/core/command/CommandEvaluation.cc
r8858 r9550 119 119 @brief Executes the command which was evaluated by this object and returns its return-value. 120 120 @param error A pointer to an integer (or NULL) which will be used to write error codes to (see @ref CommandExecutorErrorCodes "CommandExecutor error codes") 121 @return Returns the result of the command (or M T_Type::Null if there is no return value)121 @return Returns the result of the command (or MultiType::Null if there is no return value) 122 122 */ 123 123 MultiType CommandEvaluation::query(int* error) … … 138 138 139 139 if (*error != CommandExecutor::Success) 140 return M T_Type::Null;140 return MultiType::Null; 141 141 } 142 142 … … 170 170 171 171 // return a null value in case of an error 172 return M T_Type::Null;172 return MultiType::Null; 173 173 } 174 174 … … 225 225 return this->arguments_[index]; 226 226 227 return M T_Type::Null;227 return MultiType::Null; 228 228 } 229 229 … … 600 600 // print the default value if available 601 601 if (command->getExecutor()->defaultValueSet(i)) 602 output += '=' + command->getExecutor()->getDefaultValue(i).get String() + ']';602 output += '=' + command->getExecutor()->getDefaultValue(i).get<std::string>() + ']'; 603 603 else 604 604 output += '}'; -
code/trunk/src/libraries/core/command/CommandExecutor.cc
r8858 r9550 83 83 @param error A pointer to a value (or NULL) where the error-code should be written to (see @ref CommandExecutorErrorCodes "error codes") 84 84 @param useTcl If true, the command is passed to tcl (see TclBind) 85 @return Returns the return-value of the command (if any - M T_Type::Null otherwise)85 @return Returns the return-value of the command (if any - MultiType::Null otherwise) 86 86 */ 87 87 /* static */ MultiType CommandExecutor::queryMT(const std::string& command, int* error, bool useTcl) … … 133 133 /* static */ std::string CommandExecutor::query(const std::string& command, int* error, bool useTcl) 134 134 { 135 return CommandExecutor::queryMT(command, error, useTcl).get String();135 return CommandExecutor::queryMT(command, error, useTcl).get<std::string>(); 136 136 } 137 137 -
code/trunk/src/libraries/core/command/ConsoleCommand.h
r9348 r9550 222 222 #include <stack> 223 223 #include <vector> 224 #include <boost/preprocessor/cat.hpp>225 #include <boost/preprocessor/facilities/expand.hpp>226 224 227 225 #include "util/VA_NARGS.h" -
code/trunk/src/libraries/core/command/Executor.cc
r8858 r9550 79 79 @param delimiter The delimiter that is used to separate the arguments in the string @a arguments 80 80 @param bPrintError If true, errors are printed to the console if the function couldn't be executed with the given arguments 81 @return Returns the return value of the function (or M T_Type::Null if there is no return value)81 @return Returns the return value of the function (or MultiType::Null if there is no return value) 82 82 */ 83 83 MultiType Executor::parse(const std::string& arguments, int* error, const std::string& delimiter, bool bPrintError) const … … 92 92 @param delimiter The delimiter that was used to separate the arguments in the SubString @a arguments (used to join the surplus arguments) 93 93 @param bPrintError If true, errors are printed to the console if the function couldn't be executed with the given arguments 94 @return Returns the return value of the function (or M T_Type::Null if there is no return value)94 @return Returns the return value of the function (or MultiType::Null if there is no return value) 95 95 */ 96 96 MultiType Executor::parse(const SubString& arguments, int* error, const std::string& delimiter, bool bPrintError) const … … 105 105 if (bPrintError) 106 106 orxout(internal_warning) << "Can't call executor " << this->name_ << " through parser: Not enough arguments or default values given (input: " << arguments.join() << ")." << endl; 107 return M T_Type::Null;107 return MultiType::Null; 108 108 } 109 109 -
code/trunk/src/libraries/core/command/Executor.h
r8858 r9550 169 169 return this->defaultValue_[index]; 170 170 171 return M T_Type::Null;171 return MultiType::Null; 172 172 } 173 173 -
code/trunk/src/libraries/core/command/Functor.h
r8858 r9550 189 189 virtual ~Functor() {} 190 190 191 /// Calls the function-pointer with up to five arguments. In case of a member-function, the assigned object-pointer is used to call the function. @return Returns the return-value of the function (if any; M T_Type::Null otherwise)192 virtual MultiType operator()(const MultiType& param1 = M T_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;191 /// Calls the function-pointer with up to five arguments. In case of a member-function, the assigned object-pointer is used to call the function. @return Returns the return-value of the function (if any; MultiType::Null otherwise) 192 virtual MultiType operator()(const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) = 0; 193 193 194 194 /// Creates a new instance of Functor with the same values like this (used instead of a copy-constructor) … … 245 245 virtual ~FunctorMember() { if (this->bSafeMode_) { this->unregisterObject(this->object_); } } 246 246 247 /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be NULL. @return Returns the return-value of the function (if any; M T_Type::Null otherwise)248 virtual MultiType operator()(O* object, const MultiType& param1 = M T_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;247 /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be NULL. @return Returns the return-value of the function (if any; MultiType::Null otherwise) 248 virtual MultiType operator()(O* object, const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) = 0; 249 249 250 250 // see Functor::operator()() 251 MultiType operator()(const MultiType& param1 = M T_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null)251 MultiType operator()(const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) 252 252 { 253 253 // call the function if an object was assigned … … 257 257 { 258 258 orxout(internal_error) << "Can't execute FunctorMember, no object set." << endl; 259 return M T_Type::Null;259 return MultiType::Null; 260 260 } 261 261 } … … 324 324 FunctorMember(void* object = 0) {} 325 325 326 /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be NULL. @return Returns the return-value of the function (if any; M T_Type::Null otherwise)327 virtual MultiType operator()(void* object, const MultiType& param1 = M T_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null) = 0;326 /// Calls the function-pointer with up to five arguments and an object. In case of a static-function, the object can be NULL. @return Returns the return-value of the function (if any; MultiType::Null otherwise) 327 virtual MultiType operator()(void* object, const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) = 0; 328 328 329 329 // see Functor::operator()() 330 MultiType operator()(const MultiType& param1 = M T_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null)330 MultiType operator()(const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) 331 331 { 332 332 return (*this)((void*)0, param1, param2, param3, param4, param5); … … 416 416 template <class R, class O, bool isconst, class P1> struct FunctorCaller<R, O, isconst, P1, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, P1, void, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { return (object->*functionPointer)(param1); } }; 417 417 template <class R, class O, bool isconst> struct FunctorCaller<R, O, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<R, O, isconst, void, void, void, void, void>::Type functionPointer, O* object, const MultiType&, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { return (object->*functionPointer)(); } }; 418 template <class O, bool isconst, class P1, class P2, class P3, class P4, class P5> struct FunctorCaller<void, O, isconst, P1, P2, P3, P4, P5> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, P4, P5>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (object->*functionPointer)(param1, param2, param3, param4, param5); return M T_Type::Null; } };419 template <class O, bool isconst, class P1, class P2, class P3, class P4> struct FunctorCaller<void, O, isconst, P1, P2, P3, P4, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, P4, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType&) { (object->*functionPointer)(param1, param2, param3, param4); return M T_Type::Null; } };420 template <class O, bool isconst, class P1, class P2, class P3> struct FunctorCaller<void, O, isconst, P1, P2, P3, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType&, const MultiType&) { (object->*functionPointer)(param1, param2, param3); return M T_Type::Null; } };421 template <class O, bool isconst, class P1, class P2> struct FunctorCaller<void, O, isconst, P1, P2, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType&, const MultiType&, const MultiType&) { (object->*functionPointer)(param1, param2); return M T_Type::Null; } };422 template <class O, bool isconst, class P1> struct FunctorCaller<void, O, isconst, P1, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, void, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (object->*functionPointer)(param1); return M T_Type::Null; } };423 template <class O, bool isconst> struct FunctorCaller<void, O, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, void, void, void, void, void>::Type functionPointer, O* object, const MultiType&, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (object->*functionPointer)(); return M T_Type::Null; } };418 template <class O, bool isconst, class P1, class P2, class P3, class P4, class P5> struct FunctorCaller<void, O, isconst, P1, P2, P3, P4, P5> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, P4, P5>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (object->*functionPointer)(param1, param2, param3, param4, param5); return MultiType::Null; } }; 419 template <class O, bool isconst, class P1, class P2, class P3, class P4> struct FunctorCaller<void, O, isconst, P1, P2, P3, P4, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, P4, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType&) { (object->*functionPointer)(param1, param2, param3, param4); return MultiType::Null; } }; 420 template <class O, bool isconst, class P1, class P2, class P3> struct FunctorCaller<void, O, isconst, P1, P2, P3, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, P3, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType&, const MultiType&) { (object->*functionPointer)(param1, param2, param3); return MultiType::Null; } }; 421 template <class O, bool isconst, class P1, class P2> struct FunctorCaller<void, O, isconst, P1, P2, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, P2, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType& param2, const MultiType&, const MultiType&, const MultiType&) { (object->*functionPointer)(param1, param2); return MultiType::Null; } }; 422 template <class O, bool isconst, class P1> struct FunctorCaller<void, O, isconst, P1, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, P1, void, void, void, void>::Type functionPointer, O* object, const MultiType& param1, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (object->*functionPointer)(param1); return MultiType::Null; } }; 423 template <class O, bool isconst> struct FunctorCaller<void, O, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, O, isconst, void, void, void, void, void>::Type functionPointer, O* object, const MultiType&, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (object->*functionPointer)(); return MultiType::Null; } }; 424 424 template <class R, bool isconst, class P1, class P2, class P3, class P4, class P5> struct FunctorCaller<R, void, isconst, P1, P2, P3, P4, P5> { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, P2, P3, P4, P5>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { return (*functionPointer)(param1, param2, param3, param4, param5); } }; 425 425 template <class R, bool isconst, class P1, class P2, class P3, class P4> struct FunctorCaller<R, void, isconst, P1, P2, P3, P4, void> { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, P2, P3, P4, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType&) { return (*functionPointer)(param1, param2, param3, param4); } }; … … 428 428 template <class R, bool isconst, class P1> struct FunctorCaller<R, void, isconst, P1, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, P1, void, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { return (*functionPointer)(param1); } }; 429 429 template <class R, bool isconst> struct FunctorCaller<R, void, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<R, void, isconst, void, void, void, void, void>::Type functionPointer, void*, const MultiType&, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { return (*functionPointer)(); } }; 430 template <bool isconst, class P1, class P2, class P3, class P4, class P5> struct FunctorCaller<void, void, isconst, P1, P2, P3, P4, P5> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, P4, P5>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (*functionPointer)(param1, param2, param3, param4, param5); return M T_Type::Null; } };431 template <bool isconst, class P1, class P2, class P3, class P4> struct FunctorCaller<void, void, isconst, P1, P2, P3, P4, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, P4, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType&) { (*functionPointer)(param1, param2, param3, param4); return M T_Type::Null; } };432 template <bool isconst, class P1, class P2, class P3> struct FunctorCaller<void, void, isconst, P1, P2, P3, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType&, const MultiType&) { (*functionPointer)(param1, param2, param3); return M T_Type::Null; } };433 template <bool isconst, class P1, class P2> struct FunctorCaller<void, void, isconst, P1, P2, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType&, const MultiType&, const MultiType&) { (*functionPointer)(param1, param2); return M T_Type::Null; } };434 template <bool isconst, class P1> struct FunctorCaller<void, void, isconst, P1, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, void, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (*functionPointer)(param1); return M T_Type::Null; } };435 template <bool isconst> struct FunctorCaller<void, void, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, void, void, void, void, void>::Type functionPointer, void*, const MultiType&, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (*functionPointer)(); return M T_Type::Null; } };430 template <bool isconst, class P1, class P2, class P3, class P4, class P5> struct FunctorCaller<void, void, isconst, P1, P2, P3, P4, P5> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, P4, P5>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType& param5) { (*functionPointer)(param1, param2, param3, param4, param5); return MultiType::Null; } }; 431 template <bool isconst, class P1, class P2, class P3, class P4> struct FunctorCaller<void, void, isconst, P1, P2, P3, P4, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, P4, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType& param4, const MultiType&) { (*functionPointer)(param1, param2, param3, param4); return MultiType::Null; } }; 432 template <bool isconst, class P1, class P2, class P3> struct FunctorCaller<void, void, isconst, P1, P2, P3, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, P3, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType& param3, const MultiType&, const MultiType&) { (*functionPointer)(param1, param2, param3); return MultiType::Null; } }; 433 template <bool isconst, class P1, class P2> struct FunctorCaller<void, void, isconst, P1, P2, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, P2, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType& param2, const MultiType&, const MultiType&, const MultiType&) { (*functionPointer)(param1, param2); return MultiType::Null; } }; 434 template <bool isconst, class P1> struct FunctorCaller<void, void, isconst, P1, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, P1, void, void, void, void>::Type functionPointer, void*, const MultiType& param1, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (*functionPointer)(param1); return MultiType::Null; } }; 435 template <bool isconst> struct FunctorCaller<void, void, isconst, void, void, void, void, void> { static inline MultiType call(typename detail::FunctionPointer<void, void, isconst, void, void, void, void, void>::Type functionPointer, void*, const MultiType&, const MultiType&, const MultiType&, const MultiType&, const MultiType&) { (*functionPointer)(); return MultiType::Null; } }; 436 436 437 437 // Helper class, used to identify the header of a function-pointer (independent of its class) … … 497 497 498 498 // see FunctorMember::operator()() 499 MultiType operator()(O* object, const MultiType& param1 = M T_Type::Null, const MultiType& param2 = MT_Type::Null, const MultiType& param3 = MT_Type::Null, const MultiType& param4 = MT_Type::Null, const MultiType& param5 = MT_Type::Null)499 MultiType operator()(O* object, const MultiType& param1 = MultiType::Null, const MultiType& param2 = MultiType::Null, const MultiType& param3 = MultiType::Null, const MultiType& param4 = MultiType::Null, const MultiType& param5 = MultiType::Null) 500 500 { 501 501 return detail::FunctorCaller<R, O, isconst, P1, P2, P3, P4, P5>::call(this->functionPointer_, object, param1, param2, param3, param4, param5); -
code/trunk/src/libraries/core/command/IOConsolePOSIX.cc
r8858 r9550 38 38 #include "util/Math.h" 39 39 #include "util/output/ConsoleWriter.h" 40 #include "util/output/OutputManager.h" 40 41 #include "core/Game.h" 41 42 #include "core/input/InputBuffer.h" … … 75 76 76 77 // Disable standard std::cout logging 77 ConsoleWriter::getInstance().disable();78 OutputManager::getInstance().getConsoleWriter()->disable(); 78 79 // Redirect std::cout to an ostringstream 79 80 // (Other part is in the initialiser list) … … 103 104 std::cout.rdbuf(this->cout_.rdbuf()); 104 105 // Enable standard std::cout logging again 105 ConsoleWriter::getInstance().enable();106 OutputManager::getInstance().getConsoleWriter()->enable(); 106 107 } 107 108 -
code/trunk/src/libraries/core/command/IOConsoleWindows.cc
r8858 r9550 35 35 #include "util/Math.h" 36 36 #include "util/output/ConsoleWriter.h" 37 #include "util/output/OutputManager.h" 37 38 #include "core/Game.h" 38 39 #include "core/input/InputBuffer.h" … … 53 54 { 54 55 // Disable standard this->cout_ logging 55 ConsoleWriter::getInstance().disable();56 OutputManager::getInstance().getConsoleWriter()->disable(); 56 57 // Redirect std::cout to an ostringstream 57 58 // (Other part is in the initialiser list) … … 109 110 std::cout.rdbuf(this->cout_.rdbuf()); 110 111 // Enable standard this->cout_ logging again 111 ConsoleWriter::getInstance().enable();112 OutputManager::getInstance().getConsoleWriter()->enable(); 112 113 113 114 resetTerminalMode(); -
code/trunk/src/libraries/core/command/Shell.cc
r8858 r9550 88 88 89 89 // Get the previous output and add it to the Shell 90 MemoryWriter::getInstance().resendOutput(this);90 OutputManager::getInstance().getMemoryWriter()->resendOutput(this); 91 91 } 92 92 … … 170 170 { 171 171 OutputLevel level = (value ? DefaultLogLevel::Dev : DefaultLogLevel::User); 172 ModifyConfigValueExternal(this->configurableMaxLevel_, this->getConfigurableMaxLevelName(), tset, level);172 ModifyConfigValueExternal(this->configurableMaxLevel_, this->getConfigurableMaxLevelName(), tset, static_cast<int>(level)); 173 173 } 174 174 } -
code/trunk/src/libraries/core/command/TclBind.cc
r8858 r9550 183 183 184 184 if (bQuery) 185 result = evaluation.query(&error).get String();185 result = evaluation.query(&error).get<std::string>(); 186 186 else 187 187 error = evaluation.execute(); -
code/trunk/src/libraries/core/input/InputManager.cc
r8858 r9550 176 176 if (exclusiveMouse_ || GraphicsManager::getInstance().isFullScreen()) 177 177 { 178 if (CommandLineParser::getValue("keyboard_no_grab").get Bool())178 if (CommandLineParser::getValue("keyboard_no_grab").get<bool>()) 179 179 paramList.insert(StringPair("x11_keyboard_grab", "false")); 180 180 else
Note: See TracChangeset
for help on using the changeset viewer.