22 if (prevElement) prevElement->
AddNext(
this);
23 if (nextElement)
AddNext(nextElement);
34 if (!nextElement || (nextElement ==
this))
return false;
39 if (nextElement->
prev && (nextElement->
prev !=
this))
49 if (nextElement && (
next == nextElement))
54 mf::LogError(
"pma::SortedObjectBase") <<
"Object structure is broken.";
67 while (next_vector.size())
RemoveNext(next_vector.front());
79 if (nextElement ==
this)
86 for (
size_t i = 0; i < next_vector.size(); i++)
88 if (next_vector[i] == nextElement)
91 present =
true;
break;
96 if (nextElement->
prev)
101 next_vector.push_back(
next);
109 if (!nextElement || (nextElement ==
this))
return -1;
112 for (
unsigned int i = 0; i < next_vector.size(); i++)
114 if (next_vector[i] == nextElement) { index = i;
break; }
118 if (next_vector[index]->
prev !=
this)
120 mf::LogError(
"pma::SortedBranchBase") <<
"Object structure is broken.";
123 next_vector[index]->prev = 0;
124 next_vector.erase(next_vector.begin() + index);
126 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)