12 #ifndef ORDEREDKEYLIST_H_
13 #define ORDEREDKEYLIST_H_
19 #include <QtCore/QList>
37 void addEntry(T,
bool replace =
false);
77 while (it != this->end())
91 while (it != rhs.end())
93 addEntry((*it)->clone());
101 if (this->count() == 0)
109 T item = this->last();
118 item = this->first();
126 QString strKey = entry->string().c_str();
128 unsigned int iLower = 0;
129 unsigned int iUpper = this->count() - 1;
131 while ((iUpper - iLower) != 1)
133 int iPos = (iUpper + iLower) / 2;
135 if (sdKey < *this->at(iPos))
139 else if (sdKey > *this->at(iPos))
143 else if ((sdKey == *this->at(iPos)) && replace)
145 *this->at(iPos) = *entry;
151 insert(iLower + 1, entry);
154 template <
typename T>
159 while (iter != this->end())
172 template <
typename T>
177 while (iter != this->end())
194 #endif //ORDEREDKEYLIST_H_