41 pair<iterator,bool> ret = _meta_bundles.insert(bundle);
44 ExpiringBundle exb(*ret.first);
52 _bundles.erase(bundle);
55 _meta_bundles.erase(bundle);
61 _meta_bundles.clear();
67 if (timestamp == 0)
return;
69 std::set<ExpiringBundle>::iterator iter = _bundles.begin();
71 while (iter != _bundles.end())
73 const ExpiringBundle &b = (*iter);
75 if ( b.bundle.expiretime >= timestamp )
break;
78 if (_listener != NULL)
79 _listener->eventBundleExpired( b.bundle );
82 _meta_bundles.erase( b.bundle );
85 _bundles.erase( iter++ );
89 BundleList::ExpiringBundle::ExpiringBundle(
const MetaBundle &b)
93 BundleList::ExpiringBundle::~ExpiringBundle()
96 bool BundleList::ExpiringBundle::operator!=(
const ExpiringBundle& other)
const
98 return !(other == *
this);
101 bool BundleList::ExpiringBundle::operator==(
const ExpiringBundle& other)
const
103 return (other.bundle == this->bundle);
106 bool BundleList::ExpiringBundle::operator<(
const ExpiringBundle& other)
const
108 if (bundle.expiretime < other.bundle.expiretime)
return true;
109 if (bundle.expiretime != other.bundle.expiretime)
return false;
111 if (bundle < other.bundle)
return true;
116 bool BundleList::ExpiringBundle::operator>(
const ExpiringBundle& other)
const
118 return !(((*this) < other) || ((*
this) == other));