00001 /* 00002 * EID.h 00003 * 00004 * Created on: 09.03.2009 00005 * Author: morgenro 00006 */ 00007 00008 #ifndef EID_H_ 00009 #define EID_H_ 00010 00011 #include <string> 00012 #include "ibrcommon/Exceptions.h" 00013 00014 using namespace std; 00015 00016 namespace dtn { 00017 namespace data 00018 { 00019 class EID 00020 { 00021 public: 00022 EID(); 00023 EID(std::string scheme, std::string ssp); 00024 EID(std::string value); 00025 virtual ~EID(); 00026 00027 EID(const EID &other); 00028 00029 EID& operator=(const EID &other); 00030 00031 bool operator==(EID const& other) const; 00032 00033 bool operator==(string const& other) const; 00034 00035 bool operator!=(EID const& other) const; 00036 00037 EID operator+(string suffix); 00038 00039 bool sameHost(string const& other) const; 00040 bool sameHost(EID const& other) const; 00041 00042 bool operator<(EID const& other) const; 00043 bool operator>(const EID& other) const; 00044 00045 string getString() const; 00046 string getApplication() const throw (ibrcommon::Exception); 00047 string getNode() const throw (ibrcommon::Exception); 00048 string getScheme() const; 00049 00050 string getNodeEID() const; 00051 00052 bool hasApplication() const; 00053 00054 private: 00055 std::string _scheme; 00056 std::string _ssp; 00057 }; 00058 } 00059 } 00060 00061 #endif /* EID_H_ */
1.5.6