Changeset 11070
- Timestamp:
- Jan 17, 2016, 8:40:36 PM (9 years ago)
- Location:
- code/branches/cpp11_v3/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v3/src/libraries/core/class/Identifier.h
r11054 r11070 204 204 /// Returns the map that stores all XMLPort params. 205 205 inline const std::map<std::string, XMLPortParamContainer*>& getXMLPortParamMap() const { return this->xmlportParamContainers_; } 206 /// Returns a const_iterator to the beginning of the map that stores all XMLPort params.207 inline std::map<std::string, XMLPortParamContainer*>::const_iterator getXMLPortParamMapBegin() const { return this->xmlportParamContainers_.begin(); }208 /// Returns a const_iterator to the end of the map that stores all XMLPort params.209 inline std::map<std::string, XMLPortParamContainer*>::const_iterator getXMLPortParamMapEnd() const { return this->xmlportParamContainers_.end(); }210 206 211 207 /// Returns the map that stores all XMLPort objects. 212 208 inline const std::map<std::string, XMLPortObjectContainer*>& getXMLPortObjectMap() const { return this->xmlportObjectContainers_; } 213 /// Returns a const_iterator to the beginning of the map that stores all XMLPort objects.214 inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortObjectMapBegin() const { return this->xmlportObjectContainers_.begin(); }215 /// Returns a const_iterator to the end of the map that stores all XMLPort objects.216 inline std::map<std::string, XMLPortObjectContainer*>::const_iterator getXMLPortObjectMapEnd() const { return this->xmlportObjectContainers_.end(); }217 209 218 210 void addXMLPortParamContainer(const std::string& paramname, XMLPortParamContainer* container); -
code/branches/cpp11_v3/src/libraries/core/config/ConfigFile.cc
r11054 r11070 238 238 file << section->getFileEntry() << endl; 239 239 240 for ( std::list<ConfigFileEntry*>::const_iterator it_entries = section->getEntriesBegin(); it_entries != section->getEntriesEnd(); ++it_entries)241 file << (*it_entries)->getFileEntry() << endl;240 for (ConfigFileEntry* entry : section->getEntries()) 241 file << entry->getFileEntry() << endl; 242 242 243 243 file << endl; -
code/branches/cpp11_v3/src/libraries/core/config/ConfigFileSection.h
r11068 r11070 161 161 std::list<ConfigFileEntry*>& getEntries() 162 162 { return this->entries_; } 163 /// Returns the begin-iterator of the list of entries in this section. 164 std::list<ConfigFileEntry*>::const_iterator getEntriesBegin() const 165 { return this->entries_.begin(); } 166 /// Returns the end-iterator of the list of entries in this section. 167 std::list<ConfigFileEntry*>::const_iterator getEntriesEnd() const 168 { return this->entries_.end(); } 163 const std::list<ConfigFileEntry*>& getEntries() const 164 { return this->entries_; } 169 165 170 166 std::list<ConfigFileEntry*>::iterator getOrCreateEntryIterator(const std::string& name, const std::string& fallback, bool bString); -
code/branches/cpp11_v3/src/orxonox/items/MultiStateEngine.cc
r11068 r11070 86 86 // We have no ship, so the effects are not attached and won't be destroyed automatically 87 87 for (EffectContainer* container : this->effectContainers_) 88 for ( std::vector<WorldEntity*>::const_iterator it = container->getEffectsBegin(); it != container->getEffectsBegin(); ++it)89 (*it)->destroy();88 for (WorldEntity* effect : container->getEffects()) 89 effect->destroy(); 90 90 if (this->defEngineSndNormal_) 91 91 this->defEngineSndNormal_->destroy(); … … 199 199 200 200 for (EffectContainer* container : this->effectContainers_) 201 for ( std::vector<WorldEntity*>::const_iterator it = container->getEffectsBegin(); it != container->getEffectsEnd(); ++it)202 this->getShip()->attach( *it);203 } 204 205 void MultiStateEngine::addEffectContainer(EffectContainer* effect)206 { 207 if ( effect== nullptr)201 for (WorldEntity* effect : container->getEffects()) 202 this->getShip()->attach(effect); 203 } 204 205 void MultiStateEngine::addEffectContainer(EffectContainer* container) 206 { 207 if (container == nullptr) 208 208 return; 209 effect->setLuaState(this->lua_, 'f' + multi_cast<std::string>(this->effectContainers_.size()));210 this->effectContainers_.push_back( effect);209 container->setLuaState(this->lua_, 'f' + multi_cast<std::string>(this->effectContainers_.size())); 210 this->effectContainers_.push_back(container); 211 211 if (this->getShip()) 212 212 { 213 for ( std::vector<WorldEntity*>::const_iterator it = effect->getEffectsBegin(); it != effect->getEffectsBegin(); ++it)214 this->getShip()->attach( *it);213 for (WorldEntity* effect : container->getEffects()) 214 this->getShip()->attach(effect); 215 215 } 216 216 } -
code/branches/cpp11_v3/src/orxonox/worldentities/EffectContainer.h
r11054 r11070 54 54 WorldEntity* getEffect(unsigned int index) const; 55 55 56 inline std::vector<WorldEntity*>::const_iterator getEffectsBegin() 57 { return this->effects_.begin(); } 58 inline std::vector<WorldEntity*>::const_iterator getEffectsEnd() 59 { return this->effects_.end(); } 56 inline const std::vector<WorldEntity*>& getEffects() const 57 { return this->effects_; } 60 58 61 59 void updateCondition();
Note: See TracChangeset
for help on using the changeset viewer.