Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 30, 2009, 4:53:06 PM (15 years ago)
Author:
rgrieder
Message:

#299: Fixed a bug in ConfigValueIncludes.h and exported command history to a separate file.

Location:
code/branches/core4/src/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core4/src/core/ConfigValueIncludes.h

    r2171 r3260  
    5252    if (!container##varname) \
    5353    { \
    54         container##varname = new orxonox::ConfigValueContainer(ConfigFileType::Settings, identifier##varname, identifier##varname->getName(), #varname, defvalue, varname); \
     54        container##varname = new orxonox::ConfigValueContainer(type, identifier##varname, identifier##varname->getName(), #varname, defvalue, varname); \
    5555        identifier##varname->addConfigValueContainer(#varname, container##varname); \
    5656    } \
     
    7070    if (!container##varname) \
    7171    { \
    72         container##varname = new orxonox::ConfigValueContainer(ConfigFileType::Settings, identifier##varname, identifier##varname->getName(), #varname, defvalue); \
     72        container##varname = new orxonox::ConfigValueContainer(type, identifier##varname, identifier##varname->getName(), #varname, defvalue); \
    7373        identifier##varname->addConfigValueContainer(#varname, container##varname); \
    7474    } \
  • code/branches/core4/src/core/Shell.cc

    r3196 r3260  
    7878        OutputHandler::getOutStream().setOutputBuffer(&this->outputBuffer_);
    7979
     80        // Get a config file for the command history
     81        this->commandHistoryConfigFileType_ = ConfigFileManager::getInstance().getNewConfigFileType();
     82        ConfigFileManager::getInstance().setFilename(this->commandHistoryConfigFileType_, "commandHistory.ini");
     83
    8084        this->setConfigValues();
    8185
     
    9397    void Shell::setConfigValues()
    9498    {
    95         SetConfigValue(maxHistoryLength_, 100).callback(this, &Shell::commandHistoryLengthChanged);
    96         SetConfigValue(historyOffset_, 0).callback(this, &Shell::commandHistoryOffsetChanged);
    97         SetConfigValueVector(commandHistory_, std::vector<std::string>());
     99        SetConfigValueGeneric(commandHistoryConfigFileType_, maxHistoryLength_, 100)
     100            .callback(this, &Shell::commandHistoryLengthChanged);
     101        SetConfigValueGeneric(commandHistoryConfigFileType_, historyOffset_, 0)
     102            .callback(this, &Shell::commandHistoryOffsetChanged);
     103        SetConfigValueVectorGeneric(commandHistoryConfigFileType_, commandHistory_, std::vector<std::string>());
    98104    }
    99105
  • code/branches/core4/src/core/Shell.h

    r3196 r3260  
    3737#include <vector>
    3838
     39#include "util/OutputBuffer.h"
     40#include "input/InputBuffer.h"
    3941#include "OrxonoxClass.h"
    40 #include "input/InputBuffer.h"
    41 #include "util/OutputBuffer.h"
     42#include "ConfigFileManager.h"
    4243
    4344namespace orxonox
     
    145146            bool bAddOutputLevel_;
    146147
     148            ConfigFileType commandHistoryConfigFileType_;
     149
    147150            static Shell* singletonRef_s;
    148151    };
Note: See TracChangeset for help on using the changeset viewer.