MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / Load

Method Load

framework/src/bundle/BundleRegistry.cpp:506–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504 }
505
506 void
507 BundleRegistry::Load()
508 {
509 auto l = this->Lock();
510 US_UNUSED(l);
511 auto bas = coreCtx->storage->GetAllBundleArchives();
512 for (auto const& ba : bas)
513 {
514 try
515 {
516 auto impl = std::make_shared<BundlePrivate>(coreCtx, ba);
517 bundles.v.insert(std::make_pair(impl->location, impl));
518 }
519 catch (...)
520 {
521 ba->SetAutostartSetting(-1); // Do not start on launch
522 std::cerr << "Failed to load bundle " << util::ToString(ba->GetBundleId())
523 << " (" + ba->GetBundleLocation() + ") uninstalled it!"
524 << " (exception: " << util::GetExceptionStr(std::current_exception()) << ")" << std::endl;
525 }
526 }
527 }
528
529 void
530 BundleRegistry::CheckIllegalState() const

Callers 10

FilterBundlesMethod · 0.45
GetServiceMethod · 0.45
GetBundleContextMethod · 0.45
Stop1Method · 0.45
Stop2Method · 0.45
Start0Method · 0.45
RemoveBundleResourcesMethod · 0.45
InitMethod · 0.45

Calls 8

GetExceptionStrFunction · 0.85
LockMethod · 0.80
GetBundleLocationMethod · 0.80
ToStringFunction · 0.50
GetAllBundleArchivesMethod · 0.45
insertMethod · 0.45
SetAutostartSettingMethod · 0.45
GetBundleIdMethod · 0.45

Tested by

no test coverage detected