- if (_updateList.empty())
- updateList.push_back(Update());
- else
- updateList.splice(updateList.end(), _updateList, _updateList.begin());
- }
- void putUpdateToPool(UpdateList& updateList)
- {
- for (UpdateList::iterator i = updateList.begin(); i != updateList.end(); ++i)
- putDataToPool(i->_indexDataPairList);
- _updateList.splice(_updateList.end(), updateList);
- }
-
- // Appends the updates in the list to the given timestamps updates
- void scheduleUpdates(const SGTimeStamp& timeStamp, UpdateList& updateList)
- {
- UpdateListMap::iterator i = _updateListMap.find(timeStamp);
- if (i == _updateListMap.end())
- i = _updateListMap.insert(UpdateListMap::value_type(timeStamp, UpdateList())).first;
- i->second.splice(i->second.end(), updateList);
- }
-
- // This adds raw storage for attribute index i to the end of the dataPairList.
- void getDataFromPool(unsigned i, RTIIndexDataPairList& dataPairList)
- {
- if (_attributeData.size() <= i) {
- SG_LOG(SG_NETWORK, SG_WARN, "RTI: Invalid object attribute index!");
- return;
- }
-
- // Nothing left in the pool - so allocate something
- if (_attributeData[i]._indexDataPairList.empty()) {
- dataPairList.push_back(RTIIndexDataPairList::value_type());
- dataPairList.back().first = i;
- return;
- }
-
- // Take one from the pool
- dataPairList.splice(dataPairList.end(),
- _attributeData[i]._indexDataPairList,
- _attributeData[i]._indexDataPairList.begin());