00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _PROPHET_BUNDLE_LIST_FACADE_H_
00018 #define _PROPHET_BUNDLE_LIST_FACADE_H_
00019
00020 #include "Bundle.h"
00021
00022 #include <string>
00023 #include <vector>
00024
00025 namespace prophet
00026 {
00027
00031 class BundleList : public std::vector<const Bundle*>
00032 {
00033 public:
00037 virtual ~BundleList() {}
00038
00042 const Bundle* find(const std::string& dest_id,
00043 u_int32_t creation_ts,
00044 u_int32_t seqno) const
00045 {
00046 for (const_iterator i = begin(); i != end(); i++)
00047 {
00048 if ((*i)->creation_ts() == creation_ts &&
00049 (*i)->sequence_num() == seqno &&
00050 (*i)->destination_id() == dest_id)
00051 return (*i);
00052 }
00053 return NULL;
00054 }
00055
00056 };
00057
00058 };
00059
00060 #endif // _PROPHET_BUNDLE_LIST_FACADE_H_