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

Method GetProperty

framework/src/bundle/Bundle.cpp:235–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233 }
234
235 Any
236 Bundle::GetProperty(std::string const& key) const
237 {
238 if (!d)
239 {
240 throw std::invalid_argument("invalid bundle");
241 }
242
243 Any property(d->bundleManifest.GetValueDeprecated(key));
244
245 // Clients must be able to query both a bundle's properties
246 // and the framework's properties through any Bundle's
247 // GetProperty function.
248 // The Framework's properties include both the launch properties
249 // used to initialize the Framework and all relevant
250 // "org.cppmicroservices.*" properties.
251 if (property.Empty())
252 {
253 auto props = d->coreCtx->frameworkProperties.find(key);
254 if (props != d->coreCtx->frameworkProperties.end())
255 {
256 property = (*props).second;
257 }
258 }
259 return property;
260 }
261
262 std::vector<std::string>
263 Bundle::GetPropertyKeys() const

Callers 15

UnRegisterMethod · 0.45
AddingServiceMethod · 0.45
ModifiedServiceMethod · 0.45
TEST_FFunction · 0.45
serviceChangedMethod · 0.45
frame020bMethod · 0.45
frame037aMethod · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TEST_FFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 3

GetValueDeprecatedMethod · 0.80
findMethod · 0.45
endMethod · 0.45

Tested by 15

UnRegisterMethod · 0.36
AddingServiceMethod · 0.36
ModifiedServiceMethod · 0.36
TEST_FFunction · 0.36
serviceChangedMethod · 0.36
frame020bMethod · 0.36
frame037aMethod · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TEST_FFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36