Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 17, 2008, 11:49:08 PM (16 years ago)
Author:
rgrieder
Message:

changed return type of ConfigFileManager::getInstance() to ConfigFileManager& (from pointer before).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/core/ConfigValueContainer.cc

    r1791 r1795  
    8383        for (unsigned int i = 0; i < this->valueVector_.size(); i++)
    8484        {
    85             ConfigFileManager::getInstance()->getValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_string));
     85            ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_string));
    8686            this->defvalueStringVector_.push_back(this->valueVector_[i]);
    8787        }
     
    114114            if (this->tset(input))
    115115            {
    116                 ConfigFileManager::getInstance()->setValue(this->type_, this->sectionname_, this->varname_, input, this->value_.isType(MT_string));
     116                ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, input, this->value_.isType(MT_string));
    117117                return true;
    118118            }
     
    133133            if (this->tset(index, input))
    134134            {
    135                 ConfigFileManager::getInstance()->setValue(this->type_, this->sectionname_, this->varname_, index, input, this->value_.isType(MT_string));
     135                ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, index, input, this->value_.isType(MT_string));
    136136                return true;
    137137            }
     
    233233                this->valueVector_.erase(this->valueVector_.begin() + index);
    234234                for (unsigned int i = index; i < this->valueVector_.size(); i++)
    235                     ConfigFileManager::getInstance()->setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_string));
    236                 ConfigFileManager::getInstance()->deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->valueVector_.size());
     235                    ConfigFileManager::getInstance().setValue(this->type_, this->sectionname_, this->varname_, i, this->valueVector_[i], this->value_.isType(MT_string));
     236                ConfigFileManager::getInstance().deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->valueVector_.size());
    237237
    238238                return true;
     
    258258                if (!this->set(i, this->defvalueStringVector_[i]))
    259259                    success = false;
    260             ConfigFileManager::getInstance()->deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->defvalueStringVector_.size());
     260            ConfigFileManager::getInstance().deleteVectorEntries(this->type_, this->sectionname_, this->varname_, this->defvalueStringVector_.size());
    261261            return success;
    262262        }
     
    269269    {
    270270        if (!this->bIsVector_)
    271             this->value_ = ConfigFileManager::getInstance()->getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_, this->value_.isType(MT_string));
     271            this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, this->defvalueString_, this->value_.isType(MT_string));
    272272        else
    273273        {
    274274            this->valueVector_.clear();
    275             for (unsigned int i = 0; i < ConfigFileManager::getInstance()->getVectorSize(this->type_, this->sectionname_, this->varname_); i++)
     275            for (unsigned int i = 0; i < ConfigFileManager::getInstance().getVectorSize(this->type_, this->sectionname_, this->varname_); i++)
    276276            {
    277277                if (i < this->defvalueStringVector_.size())
    278278                {
    279                     this->value_ = ConfigFileManager::getInstance()->getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isType(MT_string));
     279                    this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isType(MT_string));
    280280                }
    281281                else
    282282                {
    283                     this->value_ = ConfigFileManager::getInstance()->getValue(this->type_, this->sectionname_, this->varname_, i, MultiType(), this->value_.isType(MT_string));
     283                    this->value_ = ConfigFileManager::getInstance().getValue(this->type_, this->sectionname_, this->varname_, i, MultiType(), this->value_.isType(MT_string));
    284284                }
    285285
Note: See TracChangeset for help on using the changeset viewer.