Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 12, 2013, 11:13:03 PM (11 years ago)
Author:
landauf
Message:

merged testing branch back to trunk. unbelievable it took me 13 months to finish this chore…

Location:
code/trunk
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/CommandLineParser.cc

    r8858 r9550  
    5050    void CommandLineArgument::parse(const std::string& value)
    5151    {
    52         if (value_.getType() == MT_Type::Bool)
     52        if (value_.isType<bool>())
    5353        {
    5454            // simulate command line switch
     
    6969        else
    7070        {
    71             if (!value_.setValue(value))
    72             {
    73                 value_.setValue(defaultValue_);
     71            if (!value_.set(value))
     72            {
     73                value_.set(defaultValue_);
    7474                ThrowException(Argument, "Could not read command line argument '" + getName() + "'.");
    7575            }
     
    298298                infoStr << "      ";
    299299            infoStr << "--" << it->second->getName() << ' ';
    300             if (it->second->getValue().getType() != MT_Type::Bool)
     300            if (it->second->getValue().isType<bool>())
     301                infoStr << "    ";
     302            else
    301303                infoStr << "ARG ";
    302             else
    303                 infoStr << "    ";
    304304            // fill with the necessary amount of blanks
    305305            infoStr << std::string(maxNameSize - it->second->getName().size(), ' ');
  • code/trunk/src/libraries/core/CommandLineParser.h

    r8858 r9550  
    200200    inline void CommandLineParser::getValue<std::string>(const std::string& name, std::string* value)
    201201    {
    202         *value = getArgument(name)->getValue().getString();
     202        *value = getArgument(name)->getValue().get<std::string>();
    203203    }
    204204
     
    217217        OrxAssert(!_getInstance().existsArgument(name),
    218218            "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,
    220220               "Boolean command line arguments with positive default values are not supported." << endl
    221221            << "Please use SetCommandLineSwitch and adjust your argument: " << name);
  • code/trunk/src/libraries/core/ConfigValueContainer.cc

    r8858 r9550  
    7070        this->bIsVector_ = false;
    7171
    72         this->defvalueString_ = this->value_.getString();
     72        this->defvalueString_ = this->value_.get<std::string>();
    7373        this->update();
    7474    }
     
    8383        for (unsigned int i = 0; i < this->valueVector_.size(); i++)
    8484        {
    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>());
    8686            this->defvalueStringVector_.push_back(this->valueVector_[i]);
    8787        }
     
    118118            if (this->tset(input))
    119119            {
    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>());
    121121                return true;
    122122            }
     
    137137            if (this->tset(index, input))
    138138            {
    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>());
    140140                return true;
    141141            }
     
    236236                this->valueVector_.erase(this->valueVector_.begin() + index);
    237237                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>());
    239239                ConfigFileManager::getInstance().getConfigFile(this->type_)->deleteVectorEntries(this->sectionname_, this->varname_, this->valueVector_.size());
    240240
     
    272272    {
    273273        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>());
    275275        else
    276276        {
     
    281281                if (i < this->defvalueStringVector_.size())
    282282                {
    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>());
    284284                }
    285285                else
    286286                {
    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>());
    288288                }
    289289
  • code/trunk/src/libraries/core/Core.cc

    r8858 r9550  
    5555#include "util/Exception.h"
    5656#include "util/output/LogWriter.h"
     57#include "util/output/OutputManager.h"
    5758#include "util/Scope.h"
    5859#include "util/ScopedSingletonManager.h"
     
    167168        this->configFileManager_ = new ConfigFileManager();
    168169        this->configFileManager_->setFilename(ConfigFileType::Settings,
    169             CommandLineParser::getValue("settingsFile").getString());
     170            CommandLineParser::getValue("settingsFile").get<std::string>());
    170171
    171172        // Required as well for the config values
     
    180181
    181182        // 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());
    183184
    184185#if !defined(ORXONOX_PLATFORM_APPLE) && !defined(ORXONOX_USE_WINMAIN)
    185186        // Create persistent IO console
    186         if (CommandLineParser::getValue("noIOConsole").getBool())
     187        if (CommandLineParser::getValue("noIOConsole").get<bool>())
    187188        {
    188189            ModifyConfigValue(bStartIOConsole_, tset, false);
     
    258259    void Core::setConfigValues()
    259260    {
    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_)
    264265            .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_)
    270271            .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_)
    276277            .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);
    278279
    279280        SetConfigValue(bDevMode_, PathConfig::buildDirectoryRun())
     
    337338    {
    338339        orxout(internal_info) << "loading graphics in Core" << endl;
    339        
     340
    340341        // Any exception should trigger this, even in upgradeToGraphics (see its remarks)
    341342        Loki::ScopeGuard unloader = Loki::MakeObjGuard(*this, &Core::unloadGraphics);
  • code/trunk/src/libraries/core/PathConfig.cc

    r8858 r9550  
    188188            // Check for data path override by the command line
    189189            if (!CommandLineParser::getArgument("externalDataPath")->hasDefaultValue())
    190                 externalDataPath_ = CommandLineParser::getValue("externalDataPath").getString();
     190                externalDataPath_ = CommandLineParser::getValue("externalDataPath").get<std::string>();
    191191            else
    192192                externalDataPath_ = specialConfig::externalDataDevDirectory;
     
    227227        if (!CommandLineParser::getArgument("writingPathSuffix")->hasDefaultValue())
    228228        {
    229             const std::string& directory(CommandLineParser::getValue("writingPathSuffix").getString());
     229            const std::string& directory(CommandLineParser::getValue("writingPathSuffix").get<std::string>());
    230230            configPath_ = configPath_ / directory;
    231231            logPath_    = logPath_    / directory;
  • code/trunk/src/libraries/core/command/CommandEvaluation.cc

    r8858 r9550  
    119119        @brief Executes the command which was evaluated by this object and returns its return-value.
    120120        @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 MT_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)
    122122    */
    123123    MultiType CommandEvaluation::query(int* error)
     
    138138
    139139            if (*error != CommandExecutor::Success)
    140                 return MT_Type::Null;
     140                return MultiType::Null;
    141141        }
    142142
     
    170170
    171171        // return a null value in case of an error
    172         return MT_Type::Null;
     172        return MultiType::Null;
    173173    }
    174174
     
    225225            return this->arguments_[index];
    226226
    227         return MT_Type::Null;
     227        return MultiType::Null;
    228228    }
    229229
     
    600600            // print the default value if available
    601601            if (command->getExecutor()->defaultValueSet(i))
    602                 output += '=' + command->getExecutor()->getDefaultValue(i).getString() + ']';
     602                output += '=' + command->getExecutor()->getDefaultValue(i).get<std::string>() + ']';
    603603            else
    604604                output += '}';
  • code/trunk/src/libraries/core/command/CommandExecutor.cc

    r8858 r9550  
    8383        @param error A pointer to a value (or NULL) where the error-code should be written to (see @ref CommandExecutorErrorCodes "error codes")
    8484        @param useTcl If true, the command is passed to tcl (see TclBind)
    85         @return Returns the return-value of the command (if any - MT_Type::Null otherwise)
     85        @return Returns the return-value of the command (if any - MultiType::Null otherwise)
    8686    */
    8787    /* static */ MultiType CommandExecutor::queryMT(const std::string& command, int* error, bool useTcl)
     
    133133    /* static */ std::string CommandExecutor::query(const std::string& command, int* error, bool useTcl)
    134134    {
    135         return CommandExecutor::queryMT(command, error, useTcl).getString();
     135        return CommandExecutor::queryMT(command, error, useTcl).get<std::string>();
    136136    }
    137137
  • code/trunk/src/libraries/core/command/ConsoleCommand.h

    r9348 r9550  
    222222#include <stack>
    223223#include <vector>
    224 #include <boost/preprocessor/cat.hpp>
    225 #include <boost/preprocessor/facilities/expand.hpp>
    226224
    227225#include "util/VA_NARGS.h"
  • code/trunk/src/libraries/core/command/Executor.cc

    r8858 r9550  
    7979        @param delimiter The delimiter that is used to separate the arguments in the string @a arguments
    8080        @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 MT_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)
    8282    */
    8383    MultiType Executor::parse(const std::string& arguments, int* error, const std::string& delimiter, bool bPrintError) const
     
    9292        @param delimiter The delimiter that was used to separate the arguments in the SubString @a arguments (used to join the surplus arguments)
    9393        @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 MT_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)
    9595    */
    9696    MultiType Executor::parse(const SubString& arguments, int* error, const std::string& delimiter, bool bPrintError) const
     
    105105            if (bPrintError)
    106106                orxout(internal_warning) << "Can't call executor " << this->name_ << " through parser: Not enough arguments or default values given (input: " << arguments.join() << ")." << endl;
    107             return MT_Type::Null;
     107            return MultiType::Null;
    108108        }
    109109
  • code/trunk/src/libraries/core/command/Executor.h

    r8858 r9550  
    169169                    return this->defaultValue_[index];
    170170
    171                 return MT_Type::Null;
     171                return MultiType::Null;
    172172            }
    173173
  • code/trunk/src/libraries/core/command/Functor.h

    r8858 r9550  
    189189            virtual ~Functor() {}
    190190
    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; MT_Type::Null otherwise)
    192             virtual MultiType operator()(const MultiType& param1 = MT_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;
    193193
    194194            /// Creates a new instance of Functor with the same values like this (used instead of a copy-constructor)
     
    245245            virtual ~FunctorMember() { if (this->bSafeMode_) { this->unregisterObject(this->object_); } }
    246246
    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; MT_Type::Null otherwise)
    248             virtual MultiType operator()(O* object, const MultiType& param1 = MT_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;
    249249
    250250            // see Functor::operator()()
    251             MultiType operator()(const MultiType& param1 = MT_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)
    252252            {
    253253                // call the function if an object was assigned
     
    257257                {
    258258                    orxout(internal_error) << "Can't execute FunctorMember, no object set." << endl;
    259                     return MT_Type::Null;
     259                    return MultiType::Null;
    260260                }
    261261            }
     
    324324            FunctorMember(void* object = 0) {}
    325325
    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; MT_Type::Null otherwise)
    327             virtual MultiType operator()(void* object, const MultiType& param1 = MT_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;
    328328
    329329            // see Functor::operator()()
    330             MultiType operator()(const MultiType& param1 = MT_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)
    331331            {
    332332                return (*this)((void*)0, param1, param2, param3, param4, param5);
     
    416416        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); } };
    417417        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 MT_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 MT_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 MT_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 MT_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 MT_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 MT_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; } };
    424424        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); } };
    425425        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); } };
     
    428428        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); } };
    429429        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 MT_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 MT_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 MT_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 MT_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 MT_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 MT_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; } };
    436436
    437437        // Helper class, used to identify the header of a function-pointer (independent of its class)
     
    497497
    498498            // see FunctorMember::operator()()
    499             MultiType operator()(O* object, const MultiType& param1 = MT_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)
    500500            {
    501501                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  
    3838#include "util/Math.h"
    3939#include "util/output/ConsoleWriter.h"
     40#include "util/output/OutputManager.h"
    4041#include "core/Game.h"
    4142#include "core/input/InputBuffer.h"
     
    7576
    7677        // Disable standard std::cout logging
    77         ConsoleWriter::getInstance().disable();
     78        OutputManager::getInstance().getConsoleWriter()->disable();
    7879        // Redirect std::cout to an ostringstream
    7980        // (Other part is in the initialiser list)
     
    103104        std::cout.rdbuf(this->cout_.rdbuf());
    104105        // Enable standard std::cout logging again
    105         ConsoleWriter::getInstance().enable();
     106        OutputManager::getInstance().getConsoleWriter()->enable();
    106107    }
    107108
  • code/trunk/src/libraries/core/command/IOConsoleWindows.cc

    r8858 r9550  
    3535#include "util/Math.h"
    3636#include "util/output/ConsoleWriter.h"
     37#include "util/output/OutputManager.h"
    3738#include "core/Game.h"
    3839#include "core/input/InputBuffer.h"
     
    5354    {
    5455        // Disable standard this->cout_ logging
    55         ConsoleWriter::getInstance().disable();
     56        OutputManager::getInstance().getConsoleWriter()->disable();
    5657        // Redirect std::cout to an ostringstream
    5758        // (Other part is in the initialiser list)
     
    109110        std::cout.rdbuf(this->cout_.rdbuf());
    110111        // Enable standard this->cout_ logging again
    111         ConsoleWriter::getInstance().enable();
     112        OutputManager::getInstance().getConsoleWriter()->enable();
    112113
    113114        resetTerminalMode();
  • code/trunk/src/libraries/core/command/Shell.cc

    r8858 r9550  
    8888
    8989        // Get the previous output and add it to the Shell
    90         MemoryWriter::getInstance().resendOutput(this);
     90        OutputManager::getInstance().getMemoryWriter()->resendOutput(this);
    9191    }
    9292
     
    170170        {
    171171            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));
    173173        }
    174174    }
  • code/trunk/src/libraries/core/command/TclBind.cc

    r8858 r9550  
    183183
    184184        if (bQuery)
    185             result = evaluation.query(&error).getString();
     185            result = evaluation.query(&error).get<std::string>();
    186186        else
    187187            error = evaluation.execute();
  • code/trunk/src/libraries/core/input/InputManager.cc

    r8858 r9550  
    176176        if (exclusiveMouse_ || GraphicsManager::getInstance().isFullScreen())
    177177        {
    178             if (CommandLineParser::getValue("keyboard_no_grab").getBool())
     178            if (CommandLineParser::getValue("keyboard_no_grab").get<bool>())
    179179                paramList.insert(StringPair("x11_keyboard_grab", "false"));
    180180            else
Note: See TracChangeset for help on using the changeset viewer.