@@ -1207,6 +1207,23 @@ class PluginManager {
12071207 }
12081208 }
12091209
1210+ // Register a pre-loaded instance and wire it. Shared by load_and_wire
1211+ // (serial) and load_all_parallel (parallel). Ensures notify_loaded fires
1212+ // and wire_instance is called consistently. Not virtual — this is an
1213+ // implementation detail, not a subclass override point.
1214+ void wire_preloaded (std::shared_ptr<IPlugin> instance,
1215+ std::optional<PluginLoader<IPlugin>> loader,
1216+ const PluginEntry& entry,
1217+ const std::vector<std::string>& deps,
1218+ const ConfigMap& config_map) {
1219+ locator_.add (instance);
1220+ plugins_.push_back (
1221+ {std::move (instance), std::move (loader), entry, deps});
1222+ rebuild_name_index ();
1223+ wire_instance_tracked (plugins_.back (), config_map);
1224+ notify_loaded (entry);
1225+ }
1226+
12101227 protected:
12111228 // --- Extensibility points (override in subclasses) ---
12121229 // Subclasses that override these SHOULD call the base implementation to
@@ -1276,22 +1293,6 @@ class PluginManager {
12761293 wire_preloaded (std::move (instance), std::move (loader), entry, deps,
12771294 config_map);
12781295 }
1279-
1280- // Register a pre-loaded instance and wire it. Shared by load_and_wire
1281- // (serial) and load_all_parallel (parallel). Ensures notify_loaded fires
1282- // and wire_instance is called consistently.
1283- void wire_preloaded (std::shared_ptr<IPlugin> instance,
1284- std::optional<PluginLoader<IPlugin>> loader,
1285- const PluginEntry& entry,
1286- const std::vector<std::string>& deps,
1287- const ConfigMap& config_map) {
1288- locator_.add (instance);
1289- plugins_.push_back (
1290- {std::move (instance), std::move (loader), entry, deps});
1291- rebuild_name_index ();
1292- wire_instance_tracked (plugins_.back (), config_map);
1293- notify_loaded (entry);
1294- }
12951296};
12961297
12971298// --- ObserverGuard inline implementation ---
0 commit comments