35 : _scheme(DEFAULT_SCHEME), _ssp(
"none")
39 EID::EID(
const std::string &scheme,
const std::string &ssp)
40 : _scheme(scheme), _ssp(ssp)
49 : _scheme(DEFAULT_SCHEME), _ssp(
"none")
51 if (orig_value.length() == 0) {
55 std::string value = orig_value;
60 size_t delimiter = value.find_first_of(
":");
63 if (delimiter == std::string::npos)
67 _scheme = value.substr(0, delimiter);
70 size_t startofssp = delimiter + 1;
71 _ssp = value.substr(startofssp, value.length() - startofssp);
74 if (_scheme.length() == 0) {
78 if (_ssp.length() == 0) {
81 }
catch (
const std::exception&) {
88 : _scheme(
EID::DEFAULT_SCHEME), _ssp(
"none")
90 if (node == 0)
return;
92 std::stringstream ss_ssp;
95 ss_ssp << node.
get<
size_t>();
98 if (application > 0) {
99 ss_ssp <<
"." << application.
get<
size_t>();
113 _scheme = other._scheme;
119 return (_ssp == other._ssp) && (_scheme == other._scheme);
124 return ((*
this) ==
EID(other));
129 return !((*this) == other);
149 if (_scheme < other._scheme)
return true;
150 if (_scheme != other._scheme)
return false;
152 return _ssp < other._ssp;
157 return other < (*this);
162 return _scheme +
":" + _ssp;
167 size_t first_char = 0;
168 char delimiter =
'.';
176 first_char = _ssp.find_first_not_of(delimiter);
179 if (first_char == std::string::npos) {
186 size_t application_start = _ssp.find_first_of(delimiter, first_char);
189 if (application_start == std::string::npos)
193 return _ssp.substr(application_start + 1, _ssp.length() - application_start - 1);
198 size_t first_char = 0;
199 char delimiter =
'.';
207 first_char = _ssp.find_first_not_of(delimiter);
210 if (first_char == std::string::npos) {
217 size_t application_start = _ssp.find_first_of(delimiter, first_char);
220 if (application_start == std::string::npos)
224 return _ssp.substr(0, application_start);
239 return _scheme +
":" +
getHost();
247 return (_ssp.find_first_of(
".") != std::string::npos);
251 size_t first_char = _ssp.find_first_not_of(
"/");
254 if (first_char == std::string::npos)
258 size_t application_start = _ssp.find_first_of(
"/", first_char);
261 if (application_start == std::string::npos)
294 std::stringstream ss_node(
getHost());
304 return make_pair(node, app);