MCPcopy Create free account
hub / github.com/WinMerge/winmerge / GetPropertyValues

Method GetPropertyValues

Src/PropertySystem.cpp:217–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217bool PropertySystem::GetPropertyValues(const String& path, PropertyValues& values)
218{
219 IPropertyStore* pps = nullptr;
220 values.m_values.clear();
221 if (!m_onlyHashProperties && SUCCEEDED(SHGetPropertyStoreFromParsingName(path.c_str(), nullptr, GPS_DEFAULT, IID_PPV_ARGS(&pps))))
222 {
223 values.m_values.reserve(m_keys.size());
224 for (const auto& key : m_keys)
225 {
226 PROPVARIANT value{};
227 if (GetPropertyIndexFromKey(key) >= 0)
228 CalculateHashValue(path, key, value);
229 else
230 pps->GetValue(key, &value);
231 values.m_values.push_back(value);
232 }
233 pps->Release();
234 return true;
235 }
236 else
237 {
238 for (const auto& key : m_keys)
239 {
240 PROPVARIANT value2{};
241 if (GetPropertyIndexFromKey(key) >= 0)
242 CalculateHashValue(path, key, value2);
243 values.m_values.push_back(value2);
244 }
245 }
246 return false;
247}
248
249int PropertySystem::GetPropertyIndex(const String& canonicalName)
250{

Callers 3

AddToListFunction · 0.80
propFunction · 0.80
TEST_FFunction · 0.80

Calls 7

SUCCEEDEDFunction · 0.85
GetPropertyIndexFromKeyFunction · 0.85
CalculateHashValueFunction · 0.70
clearMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
ReleaseMethod · 0.45

Tested by 1

TEST_FFunction · 0.64