Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2012, 3:03:02 PM (13 years ago)
Author:
landauf
Message:

renamed set and get functions in MultiType:

  • setValue() → set()
  • getXYZ() → get<xyz>()

(e.g. get<int>() instead of getInt() and get<std::string>() instead of getString())

Location:
code/branches/testing/src/libraries/core
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/branches/testing/src/libraries/core/CommandLineParser.cc

    r9222 r9224  
    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            }
  • code/branches/testing/src/libraries/core/CommandLineParser.h

    r9222 r9224  
    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).isType<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/branches/testing/src/libraries/core/ConfigValueContainer.cc

    r9222 r9224  
    7070        this->bIsVector_ = false;
    7171
    72         this->defvalueString_ = this->value_.getString();
     72        this->defvalueString_ = this->value_.get<std::string>();
    7373        this->update();
    7474    }
  • code/branches/testing/src/libraries/core/Core.cc

    r8858 r9224  
    167167        this->configFileManager_ = new ConfigFileManager();
    168168        this->configFileManager_->setFilename(ConfigFileType::Settings,
    169             CommandLineParser::getValue("settingsFile").getString());
     169            CommandLineParser::getValue("settingsFile").get<std::string>());
    170170
    171171        // Required as well for the config values
     
    184184#if !defined(ORXONOX_PLATFORM_APPLE) && !defined(ORXONOX_USE_WINMAIN)
    185185        // Create persistent IO console
    186         if (CommandLineParser::getValue("noIOConsole").getBool())
     186        if (CommandLineParser::getValue("noIOConsole").get<bool>())
    187187        {
    188188            ModifyConfigValue(bStartIOConsole_, tset, false);
     
    337337    {
    338338        orxout(internal_info) << "loading graphics in Core" << endl;
    339        
     339
    340340        // Any exception should trigger this, even in upgradeToGraphics (see its remarks)
    341341        Loki::ScopeGuard unloader = Loki::MakeObjGuard(*this, &Core::unloadGraphics);
  • code/branches/testing/src/libraries/core/PathConfig.cc

    r8858 r9224  
    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/branches/testing/src/libraries/core/command/CommandEvaluation.cc

    r9222 r9224  
    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/branches/testing/src/libraries/core/command/CommandExecutor.cc

    r9222 r9224  
    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/branches/testing/src/libraries/core/command/TclBind.cc

    r8858 r9224  
    183183
    184184        if (bQuery)
    185             result = evaluation.query(&error).getString();
     185            result = evaluation.query(&error).get<std::string>();
    186186        else
    187187            error = evaluation.execute();
Note: See TracChangeset for help on using the changeset viewer.