Changeset 10769 for code/branches/cpp11_v2/src
- Timestamp:
- Nov 7, 2015, 10:23:42 AM (9 years ago)
- Location:
- code/branches/cpp11_v2/src
- Files:
-
- 71 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/OrxonoxConfig.h.in
r9675 r10769 213 213 template<class _Ty> class allocator; 214 214 template<class _Elem, class _Traits, class _Ax> class basic_string; 215 typedef basic_string<char, char_traits<char>, allocator<char> 215 typedef basic_string<char, char_traits<char>, allocator<char>> string; 216 216 } 217 217 -
code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.h
r10768 r10769 157 157 158 158 private: 159 std::stack<std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator> 159 std::stack<std::pair<std::list<ClassTreeMaskNode*>::iterator, std::list<ClassTreeMaskNode*>::iterator>> nodes_; ///< A stack to store list-iterators 160 160 std::list<ClassTreeMaskNode*> rootlist_; ///< A list for internal use (it only stores the root-node) 161 161 }; … … 298 298 void create(ClassTreeMaskNode* node); 299 299 300 std::list<std::pair<const Identifier*, bool> 301 std::list<std::pair<const Identifier*, bool> 302 Iterator<BaseObject> 300 std::list<std::pair<const Identifier*, bool>> subclasses_; ///< A list of all Identifiers through which objects the iterator should iterate 301 std::list<std::pair<const Identifier*, bool>>::iterator subclassIterator_; ///< The current class of the iterator 302 Iterator<BaseObject> objectIterator_; ///< The current object of the iterator 303 303 }; 304 304 } -
code/branches/cpp11_v2/src/libraries/core/ConfigurablePaths.cc
r10768 r10769 143 143 144 144 // Create directories to avoid problems when opening files in non existent folders. 145 std::vector<std::pair<bf::path, std::string> 145 std::vector<std::pair<bf::path, std::string>> directories; 146 146 directories.push_back(std::make_pair(bf::path(configPath_), std::string("config"))); 147 147 directories.push_back(std::make_pair(bf::path(logPath_), std::string("log"))); 148 148 149 for (std::vector<std::pair<bf::path, std::string> 149 for (std::vector<std::pair<bf::path, std::string>>::iterator it = directories.begin(); 150 150 it != directories.end(); ++it) 151 151 { -
code/branches/cpp11_v2/src/libraries/core/EventIncludes.h
r8729 r10769 86 86 87 87 #define XMLPortEventStateIntern(name, classname, statename, xmlelement, mode) \ 88 static orxonox::ExecutorMemberPtr<classname> xmlsetfunctor##name = orxonox::createExecutor(orxonox::createFunctor(&classname::addEventSource), std::string( #classname ) + "::" + "addEventSource" + '(' + statename + ')').cast<orxonox::ExecutorMember<classname> 89 static orxonox::ExecutorMemberPtr<classname> xmlgetfunctor##name = orxonox::createExecutor(orxonox::createFunctor(&classname::getEventSource), std::string( #classname ) + "::" + "getEventSource" + '(' + statename + ')').cast<orxonox::ExecutorMember<classname> 88 static orxonox::ExecutorMemberPtr<classname> xmlsetfunctor##name = orxonox::createExecutor(orxonox::createFunctor(&classname::addEventSource), std::string( #classname ) + "::" + "addEventSource" + '(' + statename + ')').cast<orxonox::ExecutorMember<classname>>(); \ 89 static orxonox::ExecutorMemberPtr<classname> xmlgetfunctor##name = orxonox::createExecutor(orxonox::createFunctor(&classname::getEventSource), std::string( #classname ) + "::" + "getEventSource" + '(' + statename + ')').cast<orxonox::ExecutorMember<classname>>(); \ 90 90 xmlsetfunctor##name->setDefaultValue(1, statename); \ 91 91 xmlgetfunctor##name->setDefaultValue(1, statename); \ -
code/branches/cpp11_v2/src/libraries/core/GUIManager.cc
r10768 r10769 165 165 d_caching = false; 166 166 167 std::vector<std::pair<CEGUI::String, CEGUI::LoggingLevel> 167 std::vector<std::pair<CEGUI::String, CEGUI::LoggingLevel>>::iterator it = d_cache.begin(); 168 168 169 169 while (it != d_cache.end()) -
code/branches/cpp11_v2/src/libraries/core/Game.cc
r10768 r10769 73 73 std::string name_; 74 74 weak_ptr<GameStateTreeNode> parent_; 75 std::vector<shared_ptr<GameStateTreeNode> 75 std::vector<shared_ptr<GameStateTreeNode>> children_; 76 76 }; 77 77 … … 384 384 385 385 // Check children first 386 std::vector<shared_ptr<GameStateTreeNode> 386 std::vector<shared_ptr<GameStateTreeNode>> requestedNodes; 387 387 for (unsigned int i = 0; i < lastRequestedNode->children_.size(); ++i) 388 388 { … … 454 454 { 455 455 // Split string into pieces of the form whitespacesText 456 std::vector<std::pair<std::string, int> 456 std::vector<std::pair<std::string, int>> stateStrings; 457 457 size_t pos = 0; 458 458 size_t startPos = 0; … … 473 473 474 474 // Parse elements recursively 475 std::vector<std::pair<std::string, int> 475 std::vector<std::pair<std::string, int>>::const_iterator begin = stateStrings.begin(); 476 476 parseStates(begin, this->rootStateNode_); 477 477 } … … 479 479 /*** Internal ***/ 480 480 481 void Game::parseStates(std::vector<std::pair<std::string, int> 481 void Game::parseStates(std::vector<std::pair<std::string, int>>::const_iterator& it, shared_ptr<GameStateTreeNode> currentNode) 482 482 { 483 483 SubString tokens(it->first, ","); 484 std::vector<std::pair<std::string, int> 484 std::vector<std::pair<std::string, int>>::const_iterator startIt = it; 485 485 486 486 for (unsigned int i = 0; i < tokens.size(); ++i) … … 620 620 } 621 621 622 /*static*/ std::map<std::string, shared_ptr<Game::GameStateFactory> 623 { 624 static std::map<std::string, shared_ptr<GameStateFactory> 622 /*static*/ std::map<std::string, shared_ptr<Game::GameStateFactory>>& Game::GameStateFactory::getFactories() 623 { 624 static std::map<std::string, shared_ptr<GameStateFactory>> factories; 625 625 return factories; 626 626 } … … 628 628 /*static*/ shared_ptr<GameState> Game::GameStateFactory::fabricate(const GameStateInfo& info) 629 629 { 630 std::map<std::string, shared_ptr<Game::GameStateFactory> 630 std::map<std::string, shared_ptr<Game::GameStateFactory>>::const_iterator it = getFactories().find(info.className); 631 631 assert(it != getFactories().end()); 632 632 return it->second->fabricateInternal(info); -
code/branches/cpp11_v2/src/libraries/core/Game.h
r10624 r10769 84 84 { // tolua_export 85 85 friend class Singleton<Game>; 86 typedef std::vector<shared_ptr<GameState> 87 typedef std::map<std::string, shared_ptr<GameState> 86 typedef std::vector<shared_ptr<GameState>> GameStateVector; 87 typedef std::map<std::string, shared_ptr<GameState>> GameStateMap; 88 88 typedef shared_ptr<GameStateTreeNode> GameStateTreeNodePtr; 89 89 … … 129 129 130 130 virtual shared_ptr<GameState> fabricateInternal(const GameStateInfo& info) = 0; 131 static std::map<std::string, shared_ptr<GameStateFactory> 131 static std::map<std::string, shared_ptr<GameStateFactory>>& getFactories(); 132 132 }; 133 133 template <class T> … … 150 150 void unloadGraphics(bool loadGraphicsManagerWithoutRenderer = true); 151 151 152 void parseStates(std::vector<std::pair<std::string, int> 152 void parseStates(std::vector<std::pair<std::string, int>>::const_iterator& it, shared_ptr<GameStateTreeNode> currentNode); 153 153 bool checkState(const std::string& name) const; 154 154 void loadState(const std::string& name); -
code/branches/cpp11_v2/src/libraries/core/Loader.cc
r10768 r10769 73 73 std::string xmlInput; 74 74 75 shared_ptr<std::vector<std::vector<std::pair<std::string, size_t> > > > lineTrace(new std::vector<std::vector<std::pair<std::string, size_t> >>());75 shared_ptr<std::vector<std::vector<std::pair<std::string, size_t>>>> lineTrace(new std::vector<std::vector<std::pair<std::string, size_t>>>()); 76 76 lineTrace->reserve(1000); //arbitrary number 77 77 … … 163 163 if (line <= lineTrace->size()) 164 164 { 165 std::vector<std::pair<std::string, size_t> 165 std::vector<std::pair<std::string, size_t>> linesources = lineTrace->at(line - 1); 166 166 std::ostringstream message; 167 167 message << "Possible sources of error:" << endl; 168 for (std::vector<std::pair<std::string, size_t> 168 for (std::vector<std::pair<std::string, size_t>>::iterator it = linesources.begin(); it != linesources.end(); ++it) 169 169 { 170 170 message << it->first << ", Line " << it->second << endl; -
code/branches/cpp11_v2/src/libraries/core/Loader.h
r10624 r10769 67 67 static bool getLuaTags(const std::string& text, std::map<size_t, bool>& luaTags); 68 68 69 std::vector<std::pair<const XMLFile*, ClassTreeMask> 69 std::vector<std::pair<const XMLFile*, ClassTreeMask>> files_; 70 70 71 71 static Loader* singletonPtr_s; -
code/branches/cpp11_v2/src/libraries/core/LuaState.cc
r10765 r10769 245 245 //Note: due to newlines etc., it's possible that one line consists of parts of 246 246 // multiple, different files 247 std::vector<std::vector<std::pair<std::string, size_t> >>::reverse_iterator it = lineTrace_->rbegin();247 std::vector<std::vector<std::pair<std::string, size_t>>>::reverse_iterator it = lineTrace_->rbegin(); 248 248 std::pair<std::string, size_t> temppair = std::make_pair(filename, line); 249 249 //Avoid duplicate entries. This could happen if there were lua blocks on the same line … … 259 259 { 260 260 //Add the new line to the trace map 261 lineTrace_->push_back(std::vector<std::pair<std::string, size_t> 261 lineTrace_->push_back(std::vector<std::pair<std::string, size_t>>()); 262 262 //Add the source of the line at the end 263 263 lineTrace_->rbegin()->push_back(std::make_pair(filename, line + i)); -
code/branches/cpp11_v2/src/libraries/core/LuaState.h
r10265 r10769 94 94 void clearOutput() { output_.clear(); } // tolua_export 95 95 96 void setTraceMap(shared_ptr<std::vector<std::vector<std::pair<std::string, size_t> > >> map)97 { map->push_back(std::vector<std::pair<std::string, size_t> 96 void setTraceMap(shared_ptr<std::vector<std::vector<std::pair<std::string, size_t>>>> map) 97 { map->push_back(std::vector<std::pair<std::string, size_t>>()); lineTrace_ = map; } 98 98 99 99 void setIncludeParser(std::string (*function)(const std::string&)) { includeParseFunction_ = function; } … … 116 116 private: 117 117 shared_ptr<ResourceInfo> getFileInfo(const std::string& filename); 118 shared_ptr<std::vector<std::vector<std::pair<std::string, size_t> > >> lineTrace_;118 shared_ptr<std::vector<std::vector<std::pair<std::string, size_t>>>> lineTrace_; 119 119 120 120 std::stringstream output_; -
code/branches/cpp11_v2/src/libraries/core/class/Identifiable.h
r10765 r10769 121 121 122 122 /// 'Fast map' that holds this-pointers of all derived types 123 std::vector<std::pair<unsigned int, void*> 123 std::vector<std::pair<unsigned int, void*>> objectPointers_; 124 124 }; 125 125 } -
code/branches/cpp11_v2/src/libraries/core/class/Identifier.h
r10768 r10769 321 321 void updateConfigValues(bool updateChildren, Identifiable*) const; 322 322 323 static WeakPtr<ClassIdentifier<T> 323 static WeakPtr<ClassIdentifier<T>> classIdentifier_s; 324 324 }; 325 325 326 326 template <class T> 327 WeakPtr<ClassIdentifier<T> 327 WeakPtr<ClassIdentifier<T>> ClassIdentifier<T>::classIdentifier_s; 328 328 329 329 /** -
code/branches/cpp11_v2/src/libraries/core/class/IdentifierManager.h
r10624 r10769 111 111 /// Used while creating the object hierarchy to keep track of the identifiers of a newly created object (and all other objects that get created as 112 112 /// a consequence of this, e.g. nested member objects). 113 std::map<Identifiable*, std::list<const Identifier*> 113 std::map<Identifiable*, std::list<const Identifier*>> identifierTraceOfNewObject_; 114 114 Identifier* recordTraceForIdentifier_; //!< The identifier for which we want to record the trace of identifiers during object creation. If null, no trace is recorded. 115 115 -
code/branches/cpp11_v2/src/libraries/core/command/ArgumentCompletionFunctions.cc
r10624 r10769 99 99 100 100 // get all the groups that are visible (except the shortcut group "") 101 const std::map<std::string, std::map<std::string, ConsoleCommand*> 102 for (std::map<std::string, std::map<std::string, ConsoleCommand*> 101 const std::map<std::string, std::map<std::string, ConsoleCommand*>>& commands = ConsoleCommandManager::getInstance().getCommands(); 102 for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = commands.begin(); it_group != commands.end(); ++it_group) 103 103 if (groupIsVisible(it_group->second, bOnlyShowHidden) && it_group->first != "" && (fragmentLC == "" || getLowercase(it_group->first).find(fragmentLC) == 0)) 104 104 groupList.push_back(ArgumentCompletionListElement(it_group->first, getLowercase(it_group->first))); 105 105 106 106 // now add all shortcuts (in group "") 107 std::map<std::string, std::map<std::string, ConsoleCommand*> 107 std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = commands.find(""); 108 108 if (it_group != commands.end()) 109 109 { … … 138 138 139 139 // find the iterator of the given group 140 std::map<std::string, std::map<std::string, ConsoleCommand*> 140 std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = ConsoleCommandManager::getInstance().getCommands().begin(); 141 141 for ( ; it_group != ConsoleCommandManager::getInstance().getCommands().end(); ++it_group) 142 142 if (getLowercase(it_group->first) == groupLC) … … 212 212 if (tokens.size() == 1) 213 213 { 214 std::map<std::string, std::map<std::string, ConsoleCommand*> 214 std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = ConsoleCommandManager::getInstance().getCommands().find(tokens[0]); 215 215 if (it_group != ConsoleCommandManager::getInstance().getCommands().end()) 216 216 return detail::_subcommands(fragment, tokens[0], true); -
code/branches/cpp11_v2/src/libraries/core/command/CommandEvaluation.cc
r10768 r10769 306 306 // the user typed 1-2 arguments, check what he tried to type and print a suitable error 307 307 std::string groupLC = getLowercase(this->getToken(0)); 308 for (std::map<std::string, std::map<std::string, ConsoleCommand*> 308 for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().begin(); it_group != ConsoleCommandManager::getInstance().getCommandsLC().end(); ++it_group) 309 309 if (it_group->first == groupLC) 310 310 return std::string("Error: There is no command in group \"") + this->getToken(0) + "\" starting with \"" + this->getToken(1) + "\"."; … … 328 328 329 329 // iterate through all groups and their commands and calculate the distance to the current command. keep the best. 330 for (std::map<std::string, std::map<std::string, ConsoleCommand*> 330 for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().begin(); it_group != ConsoleCommandManager::getInstance().getCommandsLC().end(); ++it_group) 331 331 { 332 332 if (it_group->first != "") … … 346 346 347 347 // now also iterate through all shortcuts and keep the best if it's better than the one found above. 348 std::map<std::string, std::map<std::string, ConsoleCommand*> 348 std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = ConsoleCommandManager::getInstance().getCommandsLC().find(""); 349 349 if (it_group != ConsoleCommandManager::getInstance().getCommandsLC().end()) 350 350 { -
code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommandManager.cc
r10768 r10769 50 50 { 51 51 // find the group 52 std::map<std::string, std::map<std::string, ConsoleCommand*> 52 std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = this->commandMap_.find(group); 53 53 if (it_group != this->commandMap_.end()) 54 54 { … … 83 83 84 84 // find the group 85 std::map<std::string, std::map<std::string, ConsoleCommand*> 85 std::map<std::string, std::map<std::string, ConsoleCommand*>>::const_iterator it_group = this->commandMapLC_.find(groupLC); 86 86 if (it_group != this->commandMapLC_.end()) 87 87 { … … 146 146 { 147 147 // iterate through all groups 148 for (std::map<std::string, std::map<std::string, ConsoleCommand*> 148 for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::iterator it_group = this->commandMap_.begin(); it_group != this->commandMap_.end(); ) 149 149 { 150 150 // iterate through all commands of each group … … 168 168 169 169 // iterate through all groups 170 for (std::map<std::string, std::map<std::string, ConsoleCommand*> 170 for (std::map<std::string, std::map<std::string, ConsoleCommand*>>::iterator it_group = this->commandMapLC_.begin(); it_group != this->commandMapLC_.end(); ) 171 171 { 172 172 // iterate through all commands of each group -
code/branches/cpp11_v2/src/libraries/core/command/ConsoleCommandManager.h
r10624 r10769 54 54 55 55 /// Returns the map with all groups and commands. 56 inline const std::map<std::string, std::map<std::string, ConsoleCommand*> 56 inline const std::map<std::string, std::map<std::string, ConsoleCommand*>>& getCommands() 57 57 { return this->commandMap_; } 58 58 /// Returns the map with all groups and commands in lowercase. 59 inline const std::map<std::string, std::map<std::string, ConsoleCommand*> 59 inline const std::map<std::string, std::map<std::string, ConsoleCommand*>>& getCommandsLC() 60 60 { return this->commandMapLC_; } 61 61 … … 71 71 72 72 private: 73 std::map<std::string, std::map<std::string, ConsoleCommand*> 74 std::map<std::string, std::map<std::string, ConsoleCommand*> 73 std::map<std::string, std::map<std::string, ConsoleCommand*>> commandMap_; 74 std::map<std::string, std::map<std::string, ConsoleCommand*>> commandMapLC_; 75 75 76 76 static ConsoleCommandManager* singletonPtr_s; -
code/branches/cpp11_v2/src/libraries/core/command/ExecutorPtr.h
r7401 r10769 66 66 inline ExecutorMemberPtr() : SharedChildPtr<ExecutorMember<T>, ExecutorPtr>() {} 67 67 inline ExecutorMemberPtr(ExecutorMember<T>* pointer) : SharedChildPtr<ExecutorMember<T>, ExecutorPtr>(pointer) {} 68 inline ExecutorMemberPtr(const SharedPtr<ExecutorMember<T> 68 inline ExecutorMemberPtr(const SharedPtr<ExecutorMember<T>>& other) : SharedChildPtr<ExecutorMember<T>, ExecutorPtr>(other) {} 69 69 }; 70 70 } -
code/branches/cpp11_v2/src/libraries/core/command/FunctorPtr.h
r7401 r10769 65 65 inline FunctorMemberPtr() : SharedChildPtr<FunctorMember<T>, FunctorPtr>() {} 66 66 inline FunctorMemberPtr(FunctorMember<T>* pointer) : SharedChildPtr<FunctorMember<T>, FunctorPtr>(pointer) {} 67 inline FunctorMemberPtr(const SharedPtr<FunctorMember<T> 67 inline FunctorMemberPtr(const SharedPtr<FunctorMember<T>>& other) : SharedChildPtr<FunctorMember<T>, FunctorPtr>(other) {} 68 68 }; 69 69 … … 73 73 /// It's not possible to use a typedef for FunctorPointerPtr<T>, so we have to create a child-class instead. It inherits all functions from SharedChildPtr, but needs to (re-)implement some constructors. 74 74 template <class F, class T> 75 class FunctorPointerPtr : public SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T> 75 class FunctorPointerPtr : public SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T>> 76 76 { 77 77 public: 78 inline FunctorPointerPtr() : SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T> 79 inline FunctorPointerPtr(FunctorPointer<F, T>* pointer) : SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T> 80 inline FunctorPointerPtr(const SharedPtr<FunctorPointer<F, T> >& other) : SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T>>(other) {}78 inline FunctorPointerPtr() : SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T>>() {} 79 inline FunctorPointerPtr(FunctorPointer<F, T>* pointer) : SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T>>(pointer) {} 80 inline FunctorPointerPtr(const SharedPtr<FunctorPointer<F, T>>& other) : SharedChildPtr<FunctorPointer<F, T>, FunctorMemberPtr<T>>(other) {} 81 81 }; 82 82 } -
code/branches/cpp11_v2/src/libraries/core/command/Shell.h
r10624 r10769 128 128 const std::string& getInput() const; 129 129 130 typedef std::list<std::pair<std::string, LineType> 130 typedef std::list<std::pair<std::string, LineType>> LineList; 131 131 LineList::const_iterator getNewestLineIterator() const; 132 132 LineList::const_iterator getEndIterator() const; -
code/branches/cpp11_v2/src/libraries/core/config/SettingsConfigFile.h
r9684 r10769 63 63 64 64 public: 65 typedef std::multimap<std::string, std::pair<std::string, ConfigValueContainer*> 65 typedef std::multimap<std::string, std::pair<std::string, ConfigValueContainer*>> ContainerMap; 66 66 67 67 SettingsConfigFile(const std::string& filename); -
code/branches/cpp11_v2/src/libraries/core/input/InputManager.h
r10765 r10769 225 225 std::vector<InputState*> activeStatesTicked_; //!< Like activeStates_, but only contains the ones that currently receive events 226 226 227 std::vector<boost::function<void ()> 227 std::vector<boost::function<void ()>> callBuffer_; //!< Caches all calls from InputStates to be executed afterwards (see preUpdate) 228 228 229 229 static InputManager* singletonPtr_s; //!< Pointer reference to the singleton -
code/branches/cpp11_v2/src/libraries/core/input/KeyBinder.h
r10765 r10769 127 127 }; 128 128 //! Actual key bindings for joy stick buttons 129 std::vector<shared_ptr<JoyStickButtonVector> 129 std::vector<shared_ptr<JoyStickButtonVector>> joyStickButtons_; 130 130 //! Helper class to use something like std:vector<HalfAxis[48]> 131 131 struct JoyStickAxisVector … … 135 135 }; 136 136 //! Actual key bindings for joy stick axes (and sliders) 137 std::vector<shared_ptr<JoyStickAxisVector> 137 std::vector<shared_ptr<JoyStickAxisVector>> joyStickAxes_; 138 138 139 139 //! Pointer map with all Buttons, including half axes … … 142 142 std::vector<HalfAxis*> allHalfAxes_; 143 143 //! Maps input commands to all Button names, including half axes 144 std::map< std::string, std::vector<std::string> 144 std::map< std::string, std::vector<std::string>> allCommands_; 145 145 146 146 /** -
code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.cc
r10765 r10769 73 73 void ModuleInstance::deleteAllStaticallyInitializedInstances() 74 74 { 75 std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*> 75 std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*>> copy(this->staticallyInitializedInstancesByType_); 76 76 this->staticallyInitializedInstancesByType_.clear(); 77 for (std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*> 77 for (std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*>>::iterator it1 = copy.begin(); it1 != copy.end(); ++it1) 78 78 for (std::set<StaticallyInitializedInstance*>::iterator it2 = it1->second.begin(); it2 != it1->second.end(); ++it2) 79 79 delete (*it2); -
code/branches/cpp11_v2/src/libraries/core/module/ModuleInstance.h
r10549 r10769 69 69 70 70 private: 71 std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*> 71 std::map<StaticInitialization::Type, std::set<StaticallyInitializedInstance*>> staticallyInitializedInstancesByType_; 72 72 std::string libraryName_; 73 73 DynLib* dynLib_; -
code/branches/cpp11_v2/src/libraries/core/object/DestroyLaterManager.h
r10624 r10769 52 52 53 53 private: 54 std::vector<StrongPtr<Destroyable> 54 std::vector<StrongPtr<Destroyable>> retainedInstances_; 55 55 56 56 static DestroyLaterManager* singletonPtr_s; -
code/branches/cpp11_v2/src/libraries/core/object/Iterator.h
r10736 r10769 70 70 */ 71 71 template <class T> 72 class Iterator : public IteratorBase<T, Iterator<T> 72 class Iterator : public IteratorBase<T, Iterator<T>> 73 73 { 74 74 public: … … 76 76 @brief Constructor: Sets the element, whereon the iterator points, to zero. 77 77 */ 78 inline Iterator() : IteratorBase<T, Iterator<T> 78 inline Iterator() : IteratorBase<T, Iterator<T>>() {} 79 79 80 80 /** … … 83 83 */ 84 84 template <class OT, class OI> 85 inline Iterator(const IteratorBase<OT, OI>& other) : IteratorBase<T, Iterator<T> 85 inline Iterator(const IteratorBase<OT, OI>& other) : IteratorBase<T, Iterator<T>>(other) {} 86 86 87 87 /** -
code/branches/cpp11_v2/src/libraries/core/object/ObjectListIterator.h
r10736 r10769 68 68 */ 69 69 template <class T> 70 class ObjectListIterator : public IteratorBase<T, ObjectListIterator<T> 70 class ObjectListIterator : public IteratorBase<T, ObjectListIterator<T>> 71 71 { 72 72 public: … … 74 74 @brief Constructor: Sets the element, whereon the ObjectListIterator points, to zero. 75 75 */ 76 inline ObjectListIterator() : IteratorBase<T, ObjectListIterator<T> 76 inline ObjectListIterator() : IteratorBase<T, ObjectListIterator<T>>() {} 77 77 78 78 /** … … 80 80 @param element The element to start with 81 81 */ 82 inline ObjectListIterator(ObjectListElement<T>* element) : IteratorBase<T, ObjectListIterator<T> 82 inline ObjectListIterator(ObjectListElement<T>* element) : IteratorBase<T, ObjectListIterator<T>>(element) {} 83 83 84 84 /** … … 87 87 */ 88 88 template <class OI> 89 inline ObjectListIterator(const IteratorBase<T, OI>& other) : IteratorBase<T, ObjectListIterator<T> 89 inline ObjectListIterator(const IteratorBase<T, OI>& other) : IteratorBase<T, ObjectListIterator<T>>(other) {} 90 90 91 91 /** -
code/branches/cpp11_v2/src/libraries/core/singleton/ScopeManager.h
r10542 r10769 79 79 80 80 std::set<ScopeID::Value> activeScopes_; 81 std::map<ScopeID::Value, std::set<ScopeListener*> 81 std::map<ScopeID::Value, std::set<ScopeListener*>> listeners_; //!< Stores all listeners for a scope 82 82 83 83 static ScopeManager* singletonPtr_s; -
code/branches/cpp11_v2/src/libraries/network/FunctionCallManager.cc
r10624 r10769 37 37 38 38 std::map<uint32_t, packet::FunctionCalls*> FunctionCallManager::sPeerMap_; 39 std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t> >> FunctionCallManager::sIncomingFunctionCallBuffer_;39 std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t>>> FunctionCallManager::sIncomingFunctionCallBuffer_; 40 40 41 41 … … 70 70 void FunctionCallManager::processBufferedFunctionCalls() 71 71 { 72 std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t> >>::iterator it = FunctionCallManager::sIncomingFunctionCallBuffer_.begin();72 std::vector<std::pair<FunctionCall, std::pair<uint32_t, uint32_t>>>::iterator it = FunctionCallManager::sIncomingFunctionCallBuffer_.begin(); 73 73 while( it!=FunctionCallManager::sIncomingFunctionCallBuffer_.end() ) 74 74 { -
code/branches/cpp11_v2/src/libraries/network/FunctionCallManager.h
r10624 r10769 54 54 55 55 static std::map<uint32_t, packet::FunctionCalls*> sPeerMap_; 56 static std::vector<std::pair<FunctionCall,std::pair<uint32_t, uint32_t> >> sIncomingFunctionCallBuffer_;56 static std::vector<std::pair<FunctionCall,std::pair<uint32_t, uint32_t>>> sIncomingFunctionCallBuffer_; 57 57 protected: 58 58 FunctionCallManager(); -
code/branches/cpp11_v2/src/libraries/network/GamestateManager.cc
r10768 r10769 351 351 // void GamestateManager::removeClient(ClientInformation* client){ 352 352 // assert(client); 353 // std::map<unsigned int, std::map<unsigned int, packet::Gamestate*> 353 // std::map<unsigned int, std::map<unsigned int, packet::Gamestate*>>::iterator clientMap = gamestateMap_.find(client->getID()); 354 354 // // first delete all remained gamestates 355 355 // std::map<unsigned int, packet::Gamestate*>::iterator it; -
code/branches/cpp11_v2/src/libraries/network/GamestateManager.h
r10622 r10769 108 108 bool processGamestate(packet::Gamestate *gs); 109 109 110 // std::map<unsigned int, std::map<unsigned int, packet::Gamestate*> 110 // std::map<unsigned int, std::map<unsigned int, packet::Gamestate*>> gamestateMap_; 111 111 std::map<unsigned int, packet::Gamestate*> gamestateQueue; 112 112 // std::map<unsigned int, uint32_t> lastProcessedGamestateID_; -
code/branches/cpp11_v2/src/libraries/network/TrafficControl.cc
r10768 r10769 148 148 // shortcut for maps 149 149 std::map<unsigned int, objInfo >& objectListPerm = clientListPerm_[clientID]; 150 std::map<unsigned int, std::list<obj> 150 std::map<unsigned int, std::list<obj>>& objectListTemp = clientListTemp_[clientID]; 151 151 152 152 for(itvec = objectListTemp[gamestateID].begin(); itvec != objectListTemp[gamestateID].end(); itvec++) … … 180 180 void TrafficControl::insertinClientListPerm(unsigned int clientID, obj objinf) 181 181 { 182 std::map<unsigned int,std::map<unsigned int, objInfo> 182 std::map<unsigned int,std::map<unsigned int, objInfo>>::iterator itperm;//iterator clientListPerm over clientIDs 183 183 unsigned int gsid=GAMESTATEID_INITIAL, gsdiff=currentGamestateID, prioperm=Synchronisable::getSynchronisable(objinf.objID)->getPriority(), priomom=0; 184 184 clientListPerm_[clientID][objinf.objID] = objInfo(objinf.objID, objinf.objCreatorID,gsid,gsdiff, objinf.objSize,prioperm,priomom); -
code/branches/cpp11_v2/src/libraries/network/TrafficControl.h
r6746 r10769 82 82 *permanent client list: contains client ids, object ids and objectInfos (in this order) 83 83 */ 84 std::map<unsigned int, std::map<unsigned int, objInfo > 84 std::map<unsigned int, std::map<unsigned int, objInfo >> clientListPerm_; 85 85 //has to be created with constructor and then needs to be updated by evaluateList(). 86 86 … … 88 88 *temporary client list: contains client ids, gamestate ids and object ids (in this order) 89 89 */ 90 std::map<unsigned int, std::map<unsigned int, std::list<obj> >> clientListTemp_;90 std::map<unsigned int, std::map<unsigned int, std::list<obj>>> clientListTemp_; 91 91 92 92 /**updateReferenceList -
code/branches/cpp11_v2/src/libraries/network/packet/ClassID.cc
r10765 r10769 52 52 uint32_t network_id; 53 53 flags_ = flags_ | PACKET_FLAGS_CLASSID; 54 std::queue<std::pair<uint32_t, std::string> 54 std::queue<std::pair<uint32_t, std::string>> tempQueue; 55 55 56 56 //calculate total needed size (for all strings and integers) -
code/branches/cpp11_v2/src/libraries/network/packet/FunctionIDs.cc
r10624 r10769 53 53 uint32_t networkID; 54 54 flags_ = flags_ | PACKET_FLAGS_FUNCTIONIDS; 55 std::queue<std::pair<uint32_t, std::string> 55 std::queue<std::pair<uint32_t, std::string>> tempQueue; 56 56 57 57 //calculate total needed size (for all strings and integers) -
code/branches/cpp11_v2/src/libraries/network/synchronisable/Serialise.h
r10624 r10769 90 90 { 91 91 // *const_cast<typename Loki::TypeTraits<T*>::UnqualifiedType*>(&variable) = dynamic_cast<T*>(variable->getSynchronisable( *(uint32_t*)(mem) )); 92 *const_cast<typename Loki::TypeTraits<StrongPtr<T> 92 *const_cast<typename Loki::TypeTraits<StrongPtr<T>>::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem))); 93 93 mem += returnSize( variable ); 94 94 } … … 125 125 { 126 126 // *const_cast<typename Loki::TypeTraits<T*>::UnqualifiedType*>(&variable) = dynamic_cast<T*>(variable->getSynchronisable( *(uint32_t*)(mem) )); 127 *const_cast<typename Loki::TypeTraits<WeakPtr<T> 127 *const_cast<typename Loki::TypeTraits<WeakPtr<T>>::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem))); 128 128 mem += returnSize( variable ); 129 129 } -
code/branches/cpp11_v2/src/libraries/network/synchronisable/Synchronisable.h
r10768 r10769 242 242 SynchronisableVariableBase* sv; 243 243 if (bidirectional) 244 sv = new SynchronisableVariableBidirectional<std::set<T> 244 sv = new SynchronisableVariableBidirectional<std::set<T>>(variable, mode, cb); 245 245 else 246 sv = new SynchronisableVariable<std::set<T> 246 sv = new SynchronisableVariable<std::set<T>>(variable, mode, cb); 247 247 syncList_.push_back(sv); 248 248 stringList_.push_back(sv); … … 250 250 251 251 template <> _NetworkExport void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional); 252 // template <class T> _NetworkExport void Synchronisable::registerVariable<std::set<T> 252 // template <class T> _NetworkExport void Synchronisable::registerVariable<std::set<T>>( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional); 253 253 template <> _NetworkExport void Synchronisable::unregisterVariable( std::string& variable ); 254 254 -
code/branches/cpp11_v2/src/libraries/tools/TextureGenerator.cc
r10546 r10769 71 71 namespace orxonox 72 72 { 73 std::map<std::string, std::map<ColourValue, std::string> 73 std::map<std::string, std::map<ColourValue, std::string>> TextureGenerator::materials_s; 74 74 unsigned int TextureGenerator::materialCount_s = 0; 75 75 -
code/branches/cpp11_v2/src/libraries/tools/TextureGenerator.h
r5781 r10769 53 53 ~TextureGenerator(); 54 54 55 static std::map<std::string, std::map<ColourValue, std::string> 55 static std::map<std::string, std::map<ColourValue, std::string>> materials_s; 56 56 static unsigned int materialCount_s; 57 57 }; -
code/branches/cpp11_v2/src/libraries/util/SharedPtr.h
r10768 r10769 343 343 For example the @c Functor classes: While a @c Functor* pointer would be managed by 344 344 @c SharedPtr<Functor>, the child class @c FunctorStatic is managed by the class 345 <tt>SharedChildPtr<FunctorStatic, SharedPtr<Functor> 345 <tt>SharedChildPtr<FunctorStatic, SharedPtr<Functor>></tt>. 346 346 347 347 The second template argument @a Parent is used as the parent class of … … 351 351 So for example this works: 352 352 @code 353 SharedChildPtr<FunctorStatic, SharedPtr<Functor> 353 SharedChildPtr<FunctorStatic, SharedPtr<Functor>> functorStatic = createFunctor(&MyClass::myStaticFunction); 354 354 SharedPtr<Functor> functor = functorStatic; 355 355 @endcode -
code/branches/cpp11_v2/src/modules/designtools/SkyboxGenerator.h
r9667 r10769 106 106 107 107 std::vector<std::string> names_; //!< The names of the image files for the skybox faces to be generated. 108 std::vector< std::pair<int, int> 108 std::vector< std::pair<int, int>> rotations_; //!< The rotation in yaw an pitch direction that is applied to the camera after a specific face has been generated. 109 109 110 110 // Storage variables -
code/branches/cpp11_v2/src/modules/mini4dgame/Mini4DgameAI.h
r10230 r10769 81 81 protected: 82 82 83 std::list<std::pair<Timer*, char> 83 std::list<std::pair<Timer*, char>> reactionTimers_; //!< A list of reaction timers and the directions that take effect when their timer expires. 84 84 Mini4DgameCenterpoint* center_; 85 85 -
code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.cc
r10765 r10769 208 208 float distance; 209 209 bool humanItem; 210 for( std::list<WeakPtr<Pawn> 210 for( std::list<WeakPtr<Pawn>>::iterator current = pawnsIn_.begin(); current != pawnsIn_.end(); current++ ) 211 211 { 212 212 Pawn* currentPawn = *current; -
code/branches/cpp11_v2/src/modules/objects/SpaceBoundaries.h
r9667 r10769 101 101 102 102 // Variabeln:: 103 std::list<WeakPtr<Pawn> 103 std::list<WeakPtr<Pawn>> pawnsIn_; //!< List of the pawns that this instance of SpaceBoundaries has to handle. 104 104 105 105 std::vector<BillboardAdministration> billboards_; -
code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.cc
r10765 r10769 100 100 101 101 // Check for objects that were in range but no longer are. Iterate through all objects, that are in range. 102 for(std::set<WeakPtr<WorldEntity> 102 for(std::set<WeakPtr<WorldEntity>>::iterator it = this->range_.begin(); it != this->range_.end(); ) 103 103 { 104 104 WorldEntity* entity = *it; … … 261 261 bool DistanceMultiTrigger::addToRange(WorldEntity* entity) 262 262 { 263 std::pair<std::set<WeakPtr<WorldEntity> 263 std::pair<std::set<WeakPtr<WorldEntity>>::iterator, bool> pair = this->range_.insert(entity); 264 264 return pair.second; 265 265 } -
code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.h
r10624 r10769 153 153 ClassTreeMask beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons. 154 154 155 std::set<WeakPtr<WorldEntity> 155 std::set<WeakPtr<WorldEntity>> range_; //!< The set of entities that currently are in range of the DistanceMultiTrigger. 156 156 157 157 }; -
code/branches/cpp11_v2/src/modules/objects/triggers/MultiTrigger.h
r10765 r10769 192 192 std::set<BaseObject*> triggered_; //!< The set of all objects the MultiTrigger is triggered for. 193 193 194 std::deque< std::pair<float, MultiTriggerState*>> stateQueue_; //!< The queue of states waiting to become active.194 std::deque<std::pair<float, MultiTriggerState*>> stateQueue_; //!< The queue of states waiting to become active. 195 195 196 196 ClassTreeMask targetMask_; //!< The target mask, masking all objects that can trigger this MultiTrigger. -
code/branches/cpp11_v2/src/modules/objects/triggers/Trigger.h
r9667 r10769 127 127 BillboardSet debugBillboard_; //!< A set of debug billboards to visualize the state of the trigger. 128 128 129 std::queue<std::pair<float, char> 129 std::queue<std::pair<float, char>> stateChanges_; //!< A queue of state changes (in the same format as latestState_) paired with the time they will take effect since the last state change took effect. 130 130 }; 131 131 -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.cc
r10768 r10769 187 187 const Matrix4& camTransform = cam->getOgreCamera()->getProjectionMatrix() * cam->getOgreCamera()->getViewMatrix(); 188 188 189 for (std::list<std::pair<RadarViewable*, unsigned int> 189 for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt) 190 190 listIt->second = (int)((listIt->first->getRVWorldPosition() - HumanController::getLocalControllerSingleton()->getControllableEntity()->getWorldPosition()).length() + 0.5f); 191 191 … … 209 209 bool nextHasToBeSelected = false; 210 210 211 for (std::list<std::pair<RadarViewable*, unsigned int> 211 for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++markerCount, ++listIt) 212 212 { 213 213 … … 641 641 } 642 642 643 for (std::list<std::pair<RadarViewable*, unsigned int> 643 for (std::list<std::pair<RadarViewable*, unsigned int>>::iterator listIt = this->sortedObjectList_.begin(); listIt != this->sortedObjectList_.end(); ++listIt) 644 644 { 645 645 if ((listIt->first) == viewable) -
code/branches/cpp11_v2/src/modules/overlays/hud/HUDNavigation.h
r10291 r10769 141 141 142 142 std::map<RadarViewable*, ObjectInfo> activeObjectList_; 143 std::list<std::pair<RadarViewable*, unsigned int> 143 std::list<std::pair<RadarViewable*, unsigned int>> sortedObjectList_; 144 144 145 145 float healthMarkerSize_; -
code/branches/cpp11_v2/src/modules/pickup/PickupManager.h
r10624 r10769 161 161 std::map<uint32_t, PickupInventoryContainer*>::iterator pickupsIterator_; //!< An iterator pointing to the current Pickupable in pickupsList_. 162 162 163 std::map<uint32_t, WeakPtr<Pickupable> 163 std::map<uint32_t, WeakPtr<Pickupable>> pickups_; //!< Map linking a number identifying a Pickupable to a weak pointer of a Pickupable. 164 164 std::map<Pickupable*, uint32_t> indexes_;//!< Map linking Pickupable to the number identifying it. 165 165 -
code/branches/cpp11_v2/src/modules/pickup/items/ShrinkPickup.cc
r10765 r10769 182 182 183 183 // Iterate over all camera positions and inversely move the camera to create a shrinking sensation. 184 const std::list< StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions();184 const std::list<StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions(); 185 185 int size = cameraPositions.size(); 186 186 for(int index = 0; index < size; index++) … … 208 208 209 209 // Iterate over all camera positions and inversely move the camera to create a shrinking sensation. 210 const std::list< StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions();210 const std::list<StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions(); 211 211 int size = cameraPositions.size(); 212 212 for(int index = 0; index < size; index++) … … 263 263 264 264 // Iterate over all camera positions and inversely move the camera to create a shrinking sensation. 265 const std::list< StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions();265 const std::list<StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions(); 266 266 int size = cameraPositions.size(); 267 267 for(int index = 0; index < size; index++) … … 304 304 305 305 // Iterate over all camera positions and inversely move the camera to create a shrinking sensation. 306 const std::list< StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions();306 const std::list<StrongPtr<CameraPosition>>& cameraPositions = pawn->getCameraPositions(); 307 307 int size = cameraPositions.size(); 308 308 for(int index = 0; index < size; index++) -
code/branches/cpp11_v2/src/modules/pong/PongAI.cc
r10768 r10769 77 77 PongAI::~PongAI() 78 78 { 79 for (std::list<std::pair<Timer*, char> 79 for (std::list<std::pair<Timer*, char>>::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it) 80 80 it->first->destroy(); 81 81 } -
code/branches/cpp11_v2/src/modules/pong/PongAI.h
r9667 r10769 89 89 float strength_; //!< The strength of the AI. Ranging from 0 to 1. 90 90 91 std::list<std::pair<Timer*, char> 91 std::list<std::pair<Timer*, char>> reactionTimers_; //!< A list of reaction timers and the directions that take effect when their timer expires. 92 92 char movement_; //!< The planned movement. 93 93 char oldMove_; //!< The previous movement. -
code/branches/cpp11_v2/src/modules/tetris/Tetris.cc
r10768 r10769 104 104 } 105 105 106 for (std::list<StrongPtr<TetrisStone> 106 for (std::list<StrongPtr<TetrisStone>>::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it) 107 107 (*it)->destroy(); 108 108 this->stones_.clear(); … … 136 136 return false; 137 137 138 for(std::list<StrongPtr<TetrisStone> 138 for(std::list<StrongPtr<TetrisStone>>::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it) 139 139 { 140 140 const Vector3& currentStonePosition = (*it)->getPosition(); //!< Saves the position of the currentStone … … 192 192 193 193 // check for collisions with all stones 194 for(std::list<StrongPtr<TetrisStone> 194 for(std::list<StrongPtr<TetrisStone>>::const_iterator it = this->stones_.begin(); it != this->stones_.end(); ++it) 195 195 { 196 196 //Vector3 currentStonePosition = rotateVector((*it)->getPosition(), this->activeBrick_->getRotationCount()); … … 469 469 { 470 470 stonesPerRow = 0; 471 for(std::list<StrongPtr<TetrisStone> 472 { 473 std::list<StrongPtr<TetrisStone> 471 for(std::list<StrongPtr<TetrisStone>>::iterator it = this->stones_.begin(); it != this->stones_.end(); ) 472 { 473 std::list<StrongPtr<TetrisStone>>::iterator it_temp = it++; 474 474 correctPosition = static_cast<unsigned int>(((*it_temp)->getPosition().y - 5)/this->center_->getStoneSize()); 475 475 if(correctPosition == row) … … 491 491 void Tetris::clearRow(unsigned int row) 492 492 {// clear the full row 493 for(std::list<StrongPtr<TetrisStone> 493 for(std::list<StrongPtr<TetrisStone>>::iterator it = this->stones_.begin(); it != this->stones_.end(); ) 494 494 { 495 495 if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) == row) … … 502 502 } 503 503 // adjust height of stones above the deleted row //TODO: check if this could be a source of a bug. 504 for(std::list<StrongPtr<TetrisStone> 504 for(std::list<StrongPtr<TetrisStone>>::iterator it = this->stones_.begin(); it != this->stones_.end(); ++it) 505 505 { 506 506 if(static_cast<unsigned int>(((*it)->getPosition().y - 5)/this->center_->getStoneSize()) > row) -
code/branches/cpp11_v2/src/modules/tetris/Tetris.h
r10624 r10769 93 93 94 94 WeakPtr<TetrisCenterpoint> center_; //!< The playing field. 95 std::list<StrongPtr<TetrisStone> 95 std::list<StrongPtr<TetrisStone>> stones_; //!< A list of all stones in play. 96 96 WeakPtr<TetrisBrick> activeBrick_; 97 97 WeakPtr<TetrisBrick> futureBrick_; -
code/branches/cpp11_v2/src/modules/towerdefense/TowerDefense.cc
r10765 r10769 287 287 } 288 288 289 for (std::list<WeakPtr<TowerDefenseEnemy> 289 for (std::list<WeakPtr<TowerDefenseEnemy>>::iterator it = enemies_.begin(); it != enemies_.end(); ) 290 290 { 291 291 if (*it == nullptr) -
code/branches/cpp11_v2/src/modules/towerdefense/TowerDefense.h
r10629 r10769 87 87 int waveNumber_; 88 88 int lifes_; 89 std::list<orxonox::WeakPtr<TowerDefenseEnemy> 89 std::list<orxonox::WeakPtr<TowerDefenseEnemy>> enemies_; 90 90 TowerDefenseField* fields_[16][16]; 91 std::vector<orxonox::WeakPtr<TowerDefenseField> 91 std::vector<orxonox::WeakPtr<TowerDefenseField>> waypoints_; 92 92 Vector3 endpoint_; 93 93 Vector3 offset_; -
code/branches/cpp11_v2/src/orxonox/controllers/ArtificialController.h
r9667 r10769 89 89 90 90 //WAYPOINT DATA 91 std::vector<WeakPtr<WorldEntity> 91 std::vector<WeakPtr<WorldEntity>> waypoints_; 92 92 size_t currentWaypoint_; 93 93 float squaredaccuracy_; -
code/branches/cpp11_v2/src/orxonox/infos/PlayerInfo.h
r10624 r10769 99 99 Controller* controller_; 100 100 ControllableEntity* controllableEntity_; 101 std::vector< WeakPtr<ControllableEntity>> previousControllableEntity_; //!< List of the previous ControllableEntities if repeatedly startTemporary control was called. The ControllableEntity at the back is the most recent.101 std::vector<WeakPtr<ControllableEntity>> previousControllableEntity_; //!< List of the previous ControllableEntities if repeatedly startTemporary control was called. The ControllableEntity at the back is the most recent. 102 102 unsigned int controllableEntityID_; 103 103 -
code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.cc
r10768 r10769 62 62 OverlayGroup::~OverlayGroup() 63 63 { 64 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)64 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 65 65 (*it)->destroy(); 66 66 this->hudElements_.clear(); … … 86 86 void OverlayGroup::setScale(const Vector2& scale) 87 87 { 88 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)88 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 89 89 (*it)->scale(scale / this->scale_); 90 90 this->scale_ = scale; … … 94 94 void OverlayGroup::setScroll(const Vector2& scroll) 95 95 { 96 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)96 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 97 97 (*it)->scroll(scroll - this->scroll_); 98 98 this->scroll_ = scroll; … … 133 133 if (index < this->hudElements_.size()) 134 134 { 135 std::set< StrongPtr<OrxonoxOverlay>>::const_iterator it = hudElements_.begin();135 std::set<StrongPtr<OrxonoxOverlay>>::const_iterator it = hudElements_.begin(); 136 136 for (unsigned int i = 0; i != index; ++it, ++i) 137 137 ; … … 147 147 SUPER( OverlayGroup, changedVisibility ); 148 148 149 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)149 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 150 150 (*it)->changedVisibility(); //inform all Child Overlays that our visibility has changed 151 151 } … … 155 155 this->owner_ = owner; 156 156 157 for (std::set< StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it)157 for (std::set<StrongPtr<OrxonoxOverlay>>::iterator it = hudElements_.begin(); it != hudElements_.end(); ++it) 158 158 (*it)->setOwner(owner); 159 159 } -
code/branches/cpp11_v2/src/orxonox/overlays/OverlayGroup.h
r10624 r10769 65 65 static void scrollGroup(const std::string& name, const Vector2& scroll); 66 66 67 inline const std::set< StrongPtr<OrxonoxOverlay>>& getOverlays() const67 inline const std::set<StrongPtr<OrxonoxOverlay>>& getOverlays() const 68 68 { return this->hudElements_; } 69 69 … … 91 91 92 92 private: 93 std::set< StrongPtr<OrxonoxOverlay>> hudElements_; //!< Contains all the OrxonoxOverlays of the this group.93 std::set<StrongPtr<OrxonoxOverlay>> hudElements_; //!< Contains all the OrxonoxOverlays of the this group. 94 94 Vector2 scale_; //!< Current scale (independent of the elements). 95 95 Vector2 scroll_; //!< Current scrolling offset. -
code/branches/cpp11_v2/src/orxonox/sound/SoundBuffer.cc
r10765 r10769 39 39 namespace orxonox 40 40 { 41 SoundBuffer::SoundBuffer(const std::string& filename, std::list<shared_ptr<SoundBuffer> 41 SoundBuffer::SoundBuffer(const std::string& filename, std::list<shared_ptr<SoundBuffer>>::iterator poolIterator) 42 42 : filename_(filename) 43 43 , audioBuffer_(AL_NONE) -
code/branches/cpp11_v2/src/orxonox/sound/SoundBuffer.h
r10624 r10769 64 64 65 65 private: 66 SoundBuffer(const std::string& filename, std::list<shared_ptr<SoundBuffer> 66 SoundBuffer(const std::string& filename, std::list<shared_ptr<SoundBuffer>>::iterator poolIterator); 67 67 #if !defined(_MSC_VER) || _MSC_VER >= 1500 68 68 ~SoundBuffer(); … … 73 73 std::string filename_; 74 74 ALuint audioBuffer_; 75 std::list<shared_ptr<SoundBuffer> 75 std::list<shared_ptr<SoundBuffer>>::iterator poolIterator_; 76 76 }; 77 77 } -
code/branches/cpp11_v2/src/orxonox/sound/SoundManager.cc
r10765 r10769 422 422 { 423 423 // If we're already fading out --> remove that 424 for (std::list<StrongPtr<AmbientSound> 424 for (std::list<StrongPtr<AmbientSound>>::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); it++) 425 425 { 426 426 if (*it == sound) … … 438 438 { 439 439 // If we're already fading in --> remove that 440 for (std::list<StrongPtr<AmbientSound> 440 for (std::list<StrongPtr<AmbientSound>>::iterator it = this->fadeInList_.begin(); it != this->fadeInList_.end(); it++) 441 441 { 442 442 if (*it == sound) … … 461 461 462 462 // FADE IN 463 for (std::list<StrongPtr<AmbientSound> 463 for (std::list<StrongPtr<AmbientSound>>::iterator it= this->fadeInList_.begin(); it != this->fadeInList_.end(); ) 464 464 { 465 465 if ((*it)->getVolume() + this->crossFadeStep_*dt > 1.0f) … … 476 476 477 477 // FADE OUT 478 for (std::list<StrongPtr<AmbientSound> 478 for (std::list<StrongPtr<AmbientSound>>::iterator it = this->fadeOutList_.begin(); it != this->fadeOutList_.end(); ) 479 479 { 480 480 if ((*it)->getVolume() - this->crossFadeStep_*dt < 0.0f) … … 606 606 #endif 607 607 this->availableSoundSources_.push_back(source); 608 for (std::vector<std::pair<ALuint, BaseSound*> 608 for (std::vector<std::pair<ALuint, BaseSound*>>::iterator it = this->usedSoundSources_.begin(); 609 609 it != this->usedSoundSources_.end(); ++it) 610 610 { -
code/branches/cpp11_v2/src/orxonox/sound/SoundManager.h
r10624 r10769 125 125 126 126 // Ambient sound related 127 typedef std::list<std::pair<AmbientSound*, bool> 127 typedef std::list<std::pair<AmbientSound*, bool>> AmbientList; 128 128 AmbientList ambientSounds_; 129 129 //! Absolute change per second (0.1 means 10% of the nominal volume) for cross fading 130 130 float crossFadeStep_; 131 std::list<StrongPtr<AmbientSound> 132 std::list<StrongPtr<AmbientSound> 131 std::list<StrongPtr<AmbientSound>> fadeInList_; 132 std::list<StrongPtr<AmbientSound>> fadeOutList_; 133 133 134 134 // Volume related … … 139 139 static const unsigned int maxEffectsPoolSize_s = 40 * 1024 * 1024; 140 140 unsigned int effectsPoolSize_; 141 typedef std::list<shared_ptr<SoundBuffer> 141 typedef std::list<shared_ptr<SoundBuffer>> EffectsPoolList; 142 142 EffectsPoolList effectsPool_; 143 typedef std::map<std::string, shared_ptr<SoundBuffer> 143 typedef std::map<std::string, shared_ptr<SoundBuffer>> SoundBufferMap; 144 144 SoundBufferMap soundBuffers_; 145 145 … … 148 148 unsigned int maxSources_; 149 149 std::vector<ALuint> availableSoundSources_; 150 std::vector<std::pair<ALuint, BaseSound*> 150 std::vector<std::pair<ALuint, BaseSound*>> usedSoundSources_; 151 151 152 152 bool bDestructorCalled_; ///< Becomes true if the destructor is called - used to prevent ambient sounds from registering after the lists were cleared -
code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.cc
r10768 r10769 108 108 this->camera_->destroy(); 109 109 110 for (std::list<StrongPtr<CameraPosition> 110 for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 111 111 (*it)->destroy(); 112 112 … … 165 165 { 166 166 unsigned int i = 0; 167 for (std::list<StrongPtr<CameraPosition> 167 for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 168 168 { 169 169 if (i == index) … … 180 180 181 181 unsigned int counter = 0; 182 for (std::list<StrongPtr<CameraPosition> 182 for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 183 183 { 184 184 if ((*it) == this->currentCameraPosition_) … … 219 219 else if (this->cameraPositions_.size() > 0) 220 220 { 221 for (std::list<StrongPtr<CameraPosition> 221 for (std::list<StrongPtr<CameraPosition>>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 222 222 { 223 223 if ((*it) == this->camera_->getParent()) … … 477 477 if (parent) 478 478 { 479 for (std::list<StrongPtr<CameraPosition> 479 for (std::list<StrongPtr<CameraPosition>>::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 480 480 if ((*it)->getIsAbsolute()) 481 481 parent->attach((*it)); -
code/branches/cpp11_v2/src/orxonox/worldentities/ControllableEntity.h
r10624 r10769 121 121 void addCameraPosition(CameraPosition* position); 122 122 CameraPosition* getCameraPosition(unsigned int index) const; 123 inline const std::list<StrongPtr<CameraPosition> 123 inline const std::list<StrongPtr<CameraPosition>>& getCameraPositions() const 124 124 { return this->cameraPositions_; } 125 125 unsigned int getCurrentCameraIndex() const; … … 242 242 bool bMouseLook_; 243 243 float mouseLookSpeed_; 244 std::list<StrongPtr<CameraPosition> 244 std::list<StrongPtr<CameraPosition>> cameraPositions_; 245 245 CameraPosition* currentCameraPosition_; 246 246 std::string cameraPositionTemplate_;
Note: See TracChangeset
for help on using the changeset viewer.