71 }
catch (
const std::bad_cast&) { }
82 return _bundles.empty();
94 return _bundles.size();
99 size_t items_added = 0;
104 for (prio_bundle_set::const_iterator iter = _priority_index.begin(); (iter != _priority_index.end()) && ((cb.limit() == 0) || (items_added < cb.limit())); ++iter)
111 if ( cb.shouldAdd(bundle) )
126 for (bundle_list::const_iterator iter = _bundles.begin(); iter != _bundles.end(); ++iter)
153 std::set<dtn::data::EID> ret;
157 for (bundle_list::const_iterator iter = _bundles.begin(); iter != _bundles.end(); ++iter)
180 pair<set<dtn::data::Bundle>::iterator,
bool> ret = _bundles.insert( bundle );
185 _priority_index.insert( bundle );
187 _bundle_lengths[bundle] =
size;
206 const bundle_list::const_iterator iter = find(_bundles.begin(), _bundles.end(), id);
226 for (bundle_list::iterator iter = _bundles.begin(); iter != _bundles.end(); ++iter)
228 if ( filter.
contains((*iter).toString()) )
252 for (bundle_list::const_iterator iter = _bundles.begin(); iter != _bundles.end(); ++iter)
261 _priority_index.clear();
263 _bundle_lengths.clear();
272 const bundle_list::iterator iter = find(_bundles.begin(), _bundles.end(), b);
275 if (iter != _bundles.end())
278 eventBundleRemoved(b);
291 void MemoryBundleStorage::__erase(
const bundle_list::iterator &iter)
296 _priority_index.erase(bundle);
300 _bundle_lengths.erase(bundle);
306 _bundles.erase(iter);