Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 1, 2008, 8:32:10 PM (16 years ago)
Author:
landauf
Message:
  • adopted quest classes to the new hierarchy (with a creator pointer)
  • added "RegisterObject(…)" in all constructors and "virtual" to all destructors
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/quest/QuestManager.cc

    r2091 r2092  
    3737    std::map<std::string, QuestHint*> QuestManager::hintMap_;
    3838
    39     QuestManager::QuestManager() : BaseObject()
     39    QuestManager::QuestManager(BaseObject* creator) : BaseObject(creator)
    4040    {
    4141        RegisterObject(QuestManager);
    4242    }
    43    
    44    
     43
     44
    4545    QuestManager::~QuestManager()
    4646    {
    47        
     47
    4848    }
    4949
     
    6363            return false;
    6464        }
    65        
     65
    6666        std::pair<std::map<std::string, Quest*>::iterator,bool> ret;
    6767        ret = questMap_.insert( std::pair<std::string,Quest*>(quest->getId(),quest) );
    68        
     68
    6969        if(ret.second)
    7070        {
     
    7878        }
    7979    }
    80    
     80
    8181    /**
    8282    @brief
     
    9494            return false;
    9595        }
    96        
     96
    9797        std::pair<std::map<std::string, QuestHint*>::iterator,bool> ret;
    9898        ret = hintMap_.insert ( std::pair<std::string,QuestHint*>(hint->getId(),hint) );
    99        
     99
    100100        if(ret.second)
    101101        {
     
    109109        }
    110110    }
    111    
     111
    112112    /**
    113113    @brief
     
    127127            ThrowException(Argument, "Invalid questId.");
    128128        }
    129        
     129
    130130        Quest* quest;
    131131        std::map<std::string, Quest*>::iterator it = questMap_.find(questId);
     
    139139           COUT(2) << "The quest with id {" << questId << "} is nowhere to be found." << std::endl;
    140140        }
    141        
     141
    142142        return quest;
    143143
    144144    }
    145    
     145
    146146    /**
    147147    @brief
     
    161161            ThrowException(Argument, "Invalid hintId.");
    162162        }
    163        
     163
    164164        QuestHint* hint;
    165165        std::map<std::string, QuestHint*>::iterator it = hintMap_.find(hintId);
     
    173173           COUT(2) << "The hint with id {" << hintId << "} is nowhere to be found." << std::endl;
    174174        }
    175        
     175
    176176        return hint;
    177177
    178178    }
    179    
     179
    180180
    181181}
Note: See TracChangeset for help on using the changeset viewer.