00001 /* 00002 * BundleID.h 00003 * 00004 * Created on: 01.09.2009 00005 * Author: morgenro 00006 */ 00007 00008 #ifndef BUNDLEID_H_ 00009 #define BUNDLEID_H_ 00010 00011 #include "ibrdtn/data/EID.h" 00012 #include "ibrdtn/data/Bundle.h" 00013 00014 namespace dtn 00015 { 00016 namespace data 00017 { 00018 class BundleID 00019 { 00020 public: 00021 BundleID(); 00022 BundleID(const dtn::data::Bundle &b); 00023 BundleID(EID source, size_t timestamp, size_t sequencenumber, bool fragment = false, size_t offset = 0); 00024 virtual ~BundleID(); 00025 00026 bool operator!=(const BundleID& other) const; 00027 bool operator==(const BundleID& other) const; 00028 bool operator<(const BundleID& other) const; 00029 bool operator>(const BundleID& other) const; 00030 00031 string toString() const; 00032 size_t getTimestamp() const; 00033 00034 friend std::ostream &operator<<(std::ostream &stream, const BundleID &obj); 00035 friend std::istream &operator>>(std::istream &stream, BundleID &obj); 00036 00037 dtn::data::EID source; 00038 size_t timestamp; 00039 size_t sequencenumber; 00040 00041 bool fragment; 00042 size_t offset; 00043 }; 00044 } 00045 } 00046 00047 #endif /* BUNDLEID_H_ */
1.6.3