Changeset 10769 for code/branches/cpp11_v2/src/libraries
- Timestamp:
- Nov 7, 2015, 10:23:42 AM (9 years ago)
- Location:
- code/branches/cpp11_v2/src/libraries
- Files:
-
- 42 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.