// SPDX-FileCopyrightText: 2024 Yury Gubich // SPDX-License-Identifier: GPL-3.0-or-later #include "router.h" Router::Router(): actors(), defaultGroup("Stranger") {} void Router::registerModule(const std::string& key, const std::shared_ptr& module) { modules[key] = module; } void Router::registerActor(const std::string& key, const std::string& group) { if (key == "default") { defaultGroup = group; return; } Actors::iterator act = actors.find(key); if (act == actors.end()) actors.emplace(key, group); else act->second.setGroup(group); } void Router::routeMessage(const std::string& sender, const std::string& body) { }