00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifdef HAVE_CONFIG_H
00021 # include <dtn-config.h>
00022 #endif
00023
00024 #ifdef BSP_ENABLED
00025
00026 #include "BP_Tag.h"
00027
00028 namespace dtn {
00029
00030 BP_Tag::BP_Tag()
00031 : type_(BP_TAG_NONE)
00032 {
00033 }
00034
00035 BP_Tag::BP_Tag(int type)
00036 : type_(type)
00037 {
00038 }
00039
00040 BP_Tag::~BP_Tag()
00041 {
00042 }
00043
00044 BP_TagVec::const_iterator
00045 BP_TagVec::find_tag(int type, BP_TagVec::const_iterator iter) const
00046 {
00047 for ( ; iter != end(); ++iter)
00048 {
00049 if (iter->type() == type)
00050 break;
00051 }
00052
00053 return iter;
00054 }
00055
00056 BP_TagVec::const_iterator
00057 BP_TagVec::find_tag(int type) const
00058 {
00059 return find_tag(type, begin());
00060 }
00061
00062 bool
00063 BP_TagVec::has_tag(int type) const
00064 {
00065 BP_TagVec::const_iterator iter;
00066
00067 for (iter = begin(); iter != end(); ++iter)
00068 {
00069 if (iter->type() == type)
00070 return true;
00071 }
00072
00073
00074 return false;
00075 }
00076
00077 }
00078
00079 #endif