Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1023


Ignore:
Timestamp:
Apr 10, 2008, 5:35:20 PM (16 years ago)
Author:
landauf
Message:

fixed bug, removed some debug output

Location:
code/branches/core2/src/orxonox/core
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core2/src/orxonox/core/ConfigFileManager.cc

    r1020 r1023  
    111111    std::list<ConfigFileEntry*>::iterator ConfigFileSection::getEntryIterator(const std::string& name, const std::string& fallback)
    112112    {
    113 std::cout << "a33333333333333333333333333\n";
    114113        for (std::list<ConfigFileEntry*>::iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
    115114            if ((*it)->getName() == name)
     
    123122    std::list<ConfigFileEntry*>::iterator ConfigFileSection::getEntryIterator(const std::string& name, unsigned int index, const std::string& fallback)
    124123    {
    125 std::cout << "b3333333333333333333333333\n";
    126124        for (std::list<ConfigFileEntry*>::iterator it = this->entries_.begin(); it != this->entries_.end(); ++it)
    127125            if (((*it)->getName() == name) && ((*it)->getIndex() == index))
     
    197195                if (isComment(line))
    198196                {
    199 std::cout << "1_7\n";
    200197                    // New comment
    201198                    newsection->getEntries().insert(newsection->getEntries().end(), new ConfigFileEntryComment(removeTrailingWhitespaces(line)));
     
    204201                else
    205202                {
    206 std::cout << "1_8\n";
    207203                    unsigned int pos1 = line.find('=');
    208204
    209205                    if (pos1 != std::string::npos && pos1 > 0)
    210206                    {
    211 std::cout << "1_9\n";
    212207                        // New entry
    213208                        unsigned int pos2 = line.find('[');
     
    220215                        if (value.size() > 0 && value[0] == '"' && betweenQuotes != "" && betweenQuotes.size() > 0)
    221216                        {
    222 std::cout << "1_10\n";
    223217                            value = betweenQuotes;
    224218                            if (line.size() > pos1 + 1 + betweenQuotes.size() + 2)
     
    227221                        else
    228222                        {
    229 std::cout << "1_11\n";
    230223                            unsigned int pos4 = getCommentPosition(line);
    231 std::cout << "a\n";
    232 std::cout << line << std::endl;
    233 std::cout << line.substr(pos1 + 1, pos4 - pos1 - 1) << std::endl;
    234224                            value = removeTrailingWhitespaces(line.substr(pos1 + 1, pos4 - pos1 - 1));
    235 std::cout << value << std::endl;
    236 std::cout << "b\n";
    237225                            if (pos4 != std::string::npos)
    238226                                comment = removeTrailingWhitespaces(line.substr(pos4));
    239 std::cout << comment << std::endl;
    240 std::cout << "c\n";
    241227                        }
    242228
    243 std::cout << "1_12\n";
    244229                        if (pos2 != std::string::npos && pos3 != std::string::npos && pos3 > pos2 + 1)
    245230                        {
    246 std::cout << "1_13\n";
    247231                            // There might be an array index
    248232                            unsigned int index = 0;
     
    251235                                // New array
    252236                                newsection->getEntries().insert(newsection->getEntries().end(), new ConfigFileEntryArrayValue(getStripped(line.substr(0, pos2)), index, value, comment));
    253 std::cout << "1_14\n";
    254237                                continue;
    255238                            }
     
    258241                        // New value
    259242                        newsection->getEntries().insert(newsection->getEntries().end(), new ConfigFileEntryValue(getStripped(line.substr(0, pos1)), value, comment));
    260 std::cout << "1_15\n";
    261243                        continue;
    262244                    }
     
    264246            }
    265247        }
    266 std::cout << "1_16\n";
    267248
    268249        file.close();
     
    272253        // Save the file in case something changed (like stripped whitespaces)
    273254        this->save();
    274 std::cout << "1_17\n";
    275255    }
    276256
     
    312292    ConfigFileSection* ConfigFile::getSection(const std::string& section)
    313293    {
    314 std::cout << "22222222222222222222\n";
    315294        for (std::list<ConfigFileSection*>::iterator it = this->sections_.begin(); it != this->sections_.end(); ++it)
    316295            if ((*it)->getName() == section)
     
    433412    ConfigFile* ConfigFileManager::getFile(ConfigFileType type)
    434413    {
    435 std::cout << "111111111111111111\n";
    436414        std::map<ConfigFileType, ConfigFile*>::iterator it = this->configFiles_.find(type);
    437415        if (it != this->configFiles_.end())
  • code/branches/core2/src/orxonox/core/ConfigFileManager.h

    r1020 r1023  
    7676    {
    7777        public:
    78             inline ConfigFileEntryValue(const std::string& name, const std::string& value = "", const std::string& additionalComment = "") : name_(name), value_(value), additionalComment_(additionalComment), bString_(false) { std::cout << "************* " << value << std::endl; }
     78            inline ConfigFileEntryValue(const std::string& name, const std::string& value = "", const std::string& additionalComment = "") : name_(name), value_(value), additionalComment_(additionalComment), bString_(false) {}
    7979            inline virtual ~ConfigFileEntryValue() {}
    8080
  • code/branches/core2/src/orxonox/core/ConfigValueContainer.cc

    r1020 r1023  
    5353        this->varname_ = varname;
    5454
     55        this->value_ = defvalue;
    5556        this->bAddedDescription_ = false;
    5657
     
    9798    void ConfigValueContainer::update()
    9899    {
    99 std::cout << "AAA1: " << this->value_ << std::endl;
    100 std::cout << "    : " << ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_) << std::endl;
    101100        this->value_.fromString(ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_));
    102 std::cout << "AAA2: " << this->value_ << std::endl;
    103101    }
    104102
  • code/branches/core2/src/orxonox/core/DebugLevel.cc

    r1020 r1023  
    9595
    9696        // Return a constant value while we're creating the object
    97         return 4;
     97        return 2;
    9898    }
    9999}
  • code/branches/core2/src/orxonox/core/Language.cc

    r1020 r1023  
    108108
    109109        // Read the translation file after the language was configured
    110 std::cout << "asdfasdfkjsfkdjaslfkjsaflkjsdfkl\n";
    111110        this->readTranslatedLanguageFile();
    112111    }
Note: See TracChangeset for help on using the changeset viewer.