| @@ -0,0 +1,84 @@ | |||
| { | |||
| "files.associations": { | |||
| "algorithm": "cpp", | |||
| "cctype": "cpp", | |||
| "clocale": "cpp", | |||
| "cmath": "cpp", | |||
| "csetjmp": "cpp", | |||
| "csignal": "cpp", | |||
| "cstdarg": "cpp", | |||
| "cstddef": "cpp", | |||
| "cstdio": "cpp", | |||
| "cstdlib": "cpp", | |||
| "cstring": "cpp", | |||
| "ctime": "cpp", | |||
| "cwchar": "cpp", | |||
| "cwctype": "cpp", | |||
| "any": "cpp", | |||
| "array": "cpp", | |||
| "atomic": "cpp", | |||
| "strstream": "cpp", | |||
| "bit": "cpp", | |||
| "*.tcc": "cpp", | |||
| "bitset": "cpp", | |||
| "cfenv": "cpp", | |||
| "chrono": "cpp", | |||
| "cinttypes": "cpp", | |||
| "codecvt": "cpp", | |||
| "compare": "cpp", | |||
| "complex": "cpp", | |||
| "concepts": "cpp", | |||
| "condition_variable": "cpp", | |||
| "coroutine": "cpp", | |||
| "cstdint": "cpp", | |||
| "deque": "cpp", | |||
| "forward_list": "cpp", | |||
| "list": "cpp", | |||
| "map": "cpp", | |||
| "set": "cpp", | |||
| "unordered_map": "cpp", | |||
| "unordered_set": "cpp", | |||
| "vector": "cpp", | |||
| "exception": "cpp", | |||
| "functional": "cpp", | |||
| "iterator": "cpp", | |||
| "memory": "cpp", | |||
| "memory_resource": "cpp", | |||
| "numeric": "cpp", | |||
| "optional": "cpp", | |||
| "random": "cpp", | |||
| "ratio": "cpp", | |||
| "regex": "cpp", | |||
| "source_location": "cpp", | |||
| "string": "cpp", | |||
| "string_view": "cpp", | |||
| "system_error": "cpp", | |||
| "tuple": "cpp", | |||
| "type_traits": "cpp", | |||
| "utility": "cpp", | |||
| "fstream": "cpp", | |||
| "future": "cpp", | |||
| "initializer_list": "cpp", | |||
| "iomanip": "cpp", | |||
| "iosfwd": "cpp", | |||
| "iostream": "cpp", | |||
| "istream": "cpp", | |||
| "limits": "cpp", | |||
| "mutex": "cpp", | |||
| "new": "cpp", | |||
| "ostream": "cpp", | |||
| "ranges": "cpp", | |||
| "shared_mutex": "cpp", | |||
| "sstream": "cpp", | |||
| "stdexcept": "cpp", | |||
| "stop_token": "cpp", | |||
| "streambuf": "cpp", | |||
| "thread": "cpp", | |||
| "typeindex": "cpp", | |||
| "typeinfo": "cpp", | |||
| "valarray": "cpp", | |||
| "variant": "cpp", | |||
| "*.mm": "cpp", | |||
| "*.ipp": "cpp" | |||
| } | |||
| } | |||
| @@ -324,37 +324,12 @@ static void Engine_updateConnected(Engine* that) { | |||
| Engine_orderModules(that); | |||
| } | |||
| template<typename T, typename Y> | |||
| inline bool mapContains(std::unordered_map<T, Y> &id, T what) { | |||
| return id.find(what) != id.end(); | |||
| } | |||
| // Stores all Modules' and Cables' relationships | |||
| /* | |||
| struct ModulesNetwork { | |||
| std::unordered_map<Module*, std::vector<Cable*>> inCables; | |||
| std::unordered_map<Module*, std::vector<Cable*>> outCables; | |||
| }; | |||
| inline ModulesNetwork Engine_buildModulesNetwork(Engine* that) { | |||
| Engine::Internal* internal = that->internal; | |||
| ModulesNetwork modulesNetwork; | |||
| for (Cable* cable : internal->cables) { | |||
| Module* inModule = cable->inputModule; | |||
| Module* outModule = cable->outputModule; | |||
| if (mapContains(modulesNetwork.inCables, inModule)) | |||
| modulesNetwork.inCables[inModule].push_back(cable); | |||
| else | |||
| modulesNetwork.inCables[inModule] = std::vector<Cable*>(); | |||
| if (mapContains(modulesNetwork.outCables, outModule)) | |||
| modulesNetwork.outCables[outModule].push_back(cable); | |||
| else | |||
| modulesNetwork.outCables[outModule] = std::vector<Cable*>(); | |||
| } | |||
| return modulesNetwork; | |||
| } | |||
| */ | |||
| static bool Engine_resolveFeedbackCable(Module* startingModule, Cable* cable) { | |||
| Module* outModule = cable->outputModule; | |||
| if (outModule == startingModule) | |||
| @@ -387,7 +362,7 @@ static void Engine_orderModule(Module* module, std::unordered_map<Module*, Modul | |||
| } | |||
| } | |||
| } | |||
| visitedModules[module] = module; //global | |||
| orderedModules.push_back(module); | |||
| } | |||