21 if (prevElement) prevElement->
AddNext(
this);
22 if (nextElement)
AddNext(nextElement);
33 if (!nextElement || (nextElement ==
this))
return false;
38 if (nextElement->
prev && (nextElement->
prev !=
this))
48 if (nextElement && (
next == nextElement))
53 mf::LogError(
"pma::SortedObjectBase") <<
"Object structure is broken.";
66 while (next_vector.size())
RemoveNext(next_vector.front());
78 if (nextElement ==
this)
85 for (
size_t i = 0; i < next_vector.size(); i++)
87 if (next_vector[i] == nextElement)
90 present =
true;
break;
95 if (nextElement->
prev)
100 next_vector.push_back(
next);
108 if (!nextElement || (nextElement ==
this))
return -1;
111 for (
unsigned int i = 0; i < next_vector.size(); i++)
113 if (next_vector[i] == nextElement) { index = i;
break; }
117 if (next_vector[index]->
prev !=
this)
119 mf::LogError(
"pma::SortedBranchBase") <<
"Object structure is broken.";
122 next_vector[
index]->prev = 0;
123 next_vector.erase(next_vector.begin() +
index);
125 if (next_vector.size() > 0)
next = next_vector.back();
virtual bool AddNext(pma::SortedObjectBase *nextElement)
virtual int RemoveNext(pma::SortedObjectBase *nextElement)
pma::SortedObjectBase * prev
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
Implementation of the Projection Matching Algorithm.
virtual int RemoveNext(pma::SortedObjectBase *nextElement)
virtual void Disconnect(void)
MaybeLogger_< ELseverityLevel::ELsev_warning, false > LogWarning
pma::SortedObjectBase * next
virtual void Disconnect(void)
virtual bool AddNext(pma::SortedObjectBase *nextElement)
constexpr ProductStatus present() noexcept