00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _TCA_ENDPOINTID_H_
00019 #define _TCA_ENDPOINTID_H_
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include <string>
00031 #include "../../servlib/naming/EndpointID.h"
00032
00033 namespace dtn {
00034
00035
00036 class TcaEndpointID : public EndpointID
00037 {
00038 public:
00039 TcaEndpointID() : EndpointID(), host_(""), app_("") { }
00040 TcaEndpointID(const EndpointID& eid);
00041 TcaEndpointID(const std::string& str);
00042 TcaEndpointID(const std::string& host, const std::string& app);
00043 TcaEndpointID(const TcaEndpointID& eid);
00044
00045 const std::string& host() const { return host_; }
00046 const std::string& app() const { return app_; }
00047
00048 void set_host(const std::string& host);
00049 void set_app(const std::string& app);
00050
00051 const std::string get_hostid() const
00052 { return std::string("tca://") + host_; }
00053
00054 static inline std::string
00055 build(const std::string& host, const std::string& app)
00056 { return std::string("tca://") + host + "/" + app; }
00057
00058 protected:
00059
00060
00061 std::string host_;
00062 std::string app_;
00063 void parse();
00064 };
00065
00066
00067 }
00068
00069 #endif