PIMapIterators refactoring

PIChunkStream some refactoring
This commit is contained in:
Бычков Андрей
2022-08-05 17:05:56 +03:00
parent 170a713357
commit 1eaecb288f
8 changed files with 233 additions and 86 deletions

View File

@@ -393,7 +393,7 @@ bool PIConnection::removeDevice(const PIString & full_path) {
channels_.remove(dev);
auto it = channels_.makeIterator();
while (it.next()) {
it.valueRef().removeAll(dev);
it.value().removeAll(dev);
}
__device_pool__->lock();
PIDiagnostics * dg = diags_.value(dev, nullptr);
@@ -418,7 +418,7 @@ void PIConnection::removeAllDevices() {
channels_.remove(d);
auto it = channels_.makeIterator();
while (it.next()) {
it.valueRef().removeAll(d);
it.value().removeAll(d);
}
PIDiagnostics * dg = diags_.value(d, nullptr);
if (dg) delete dg;
@@ -572,7 +572,7 @@ void PIConnection::removeAllFilters() {
channels_.remove(i.value()->extractor);
auto it = channels_.makeIterator();
while (it.next()) {
it.valueRef().removeAll(i.value()->extractor);
it.value().removeAll(i.value()->extractor);
}
if (diags_.value(i.value()->extractor)) {
delete diags_.value(i.value()->extractor);
@@ -677,7 +677,7 @@ bool PIConnection::removeChannel(const PIString & name0) {
channels_.remove(dev0);
auto it = channels_.makeIterator();
while (it.next()) {
it.valueRef().removeAll(dev0);
it.value().removeAll(dev0);
}
return true;
}
@@ -1234,7 +1234,7 @@ void PIConnection::unboundExtractor(PIPacketExtractor * pe) {
channels_.remove(pe);
auto it = channels_.makeIterator();
while (it.next()) {
it.valueRef().removeAll(pe);
it.value().removeAll(pe);
}
bounded_extractors.remove(pe);
PIVector<PIIODevice * > k = bounded_extractors.keys();