add CountProperty() to plugin APIs, throw is GetProperty doesn't find key

This commit is contained in:
Alexey Rybalchenko
2018-03-19 13:59:43 +01:00
committed by Mohammad Al-Turany
parent 243352d717
commit 95112dac02
5 changed files with 35 additions and 16 deletions

View File

@@ -182,8 +182,14 @@ auto DDS::FillChannelContainers() -> void
}
// save properties that will have multiple values arriving (with only some of them to be used)
vector<string> iValues = GetProperty<vector<string>>("dds-i");
vector<string> inValues = GetProperty<vector<string>>("dds-i-n");
vector<string> iValues;
if (PropertyExists("dds-i")) {
iValues = GetProperty<vector<string>>("dds-i");
}
vector<string> inValues;
if (PropertyExists("dds-i-n")) {
inValues = GetProperty<vector<string>>("dds-i-n");
}
for (const auto& vi : iValues) {
size_t pos = vi.find(":");