00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _BP_TAG_H_
00021 #define _BP_TAG_H_
00022
00023 #ifdef BSP_ENABLED
00024
00025 #include <vector>
00026 #include <oasys/debug/DebugUtils.h>
00027
00028 namespace dtn {
00029
00034 class BP_Tag {
00035
00036 public:
00037 BP_Tag();
00038
00039 BP_Tag(int type);
00040
00041 virtual ~BP_Tag();
00042
00043 int type() const {
00044 ASSERT(type_ != BP_TAG_NONE);
00045 return type_;
00046 }
00047
00052 enum {
00053 BP_TAG_NONE = 0xffff,
00054 BP_TAG_E2E_SEC_OUT_DONE = 0xff01,
00055 BP_TAG_BAB_IN_DONE = 0x0201,
00056 BP_TAG_PSB_IN_DONE = 0x0301,
00057 BP_TAG_CB_IN_DONE = 0x0401,
00058 };
00059
00060 private:
00061 int type_;
00062 };
00063
00068 class BP_TagVec : public std::vector<BP_Tag> {
00069
00070 public:
00071
00077 BP_TagVec::const_iterator find_tag(int type,
00078 BP_TagVec::const_iterator iter) const;
00079
00084 BP_TagVec::const_iterator find_tag(int type) const;
00085
00090 bool has_tag(int type) const;
00091
00092 };
00093
00094 }
00095
00096 #endif
00097
00098 #endif