00001 /* 00002 * BundleList.cpp 00003 * 00004 * Created on: 26.07.2010 00005 * Author: morgenro 00006 */ 00007 00008 #include "routing/BundleSummary.h" 00009 00010 namespace dtn 00011 { 00012 namespace routing 00013 { 00014 BundleSummary::BundleSummary() 00015 { 00016 } 00017 00018 BundleSummary::~BundleSummary() 00019 { 00020 } 00021 00022 void BundleSummary::add(const dtn::data::MetaBundle bundle) 00023 { 00024 _vector.add(bundle); 00025 dtn::data::BundleList::add(bundle); 00026 } 00027 00028 void BundleSummary::remove(const dtn::data::MetaBundle bundle) 00029 { 00030 _vector.remove(bundle); 00031 dtn::data::BundleList::remove(bundle); 00032 } 00033 00034 void BundleSummary::clear() 00035 { 00036 _vector.clear(); 00037 dtn::data::BundleList::clear(); 00038 } 00039 00040 void BundleSummary::eventBundleExpired(const ExpiringBundle &bundle) 00041 { 00042 _vector.remove(bundle.bundle); 00043 } 00044 00045 bool BundleSummary::contains(const dtn::data::BundleID &bundle) const 00046 { 00047 return _vector.contains(bundle); 00048 } 00049 00050 const SummaryVector& BundleSummary::getSummaryVector() const 00051 { 00052 return _vector; 00053 } 00054 } 00055 }
1.6.3