Mercurial > hg > orthanc
comparison OrthancFramework/Sources/RestApi/RestApiPath.cpp @ 4300:b30a8de92ad9
abi continued
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 19:33:18 +0100 |
parents | bf7b9edf6b81 |
children | a01b1c9cbef4 |
comparison
equal
deleted
inserted
replaced
4299:3f85db78c441 | 4300:b30a8de92ad9 |
---|---|
129 UriComponents trailing; | 129 UriComponents trailing; |
130 return Match(components, trailing, uri); | 130 return Match(components, trailing, uri); |
131 } | 131 } |
132 | 132 |
133 | 133 |
134 size_t RestApiPath::GetLevelCount() const | |
135 { | |
136 return uri_.size(); | |
137 } | |
138 | |
139 | |
134 bool RestApiPath::IsWildcardLevel(size_t level) const | 140 bool RestApiPath::IsWildcardLevel(size_t level) const |
135 { | 141 { |
136 assert(uri_.size() == components_.size()); | 142 assert(uri_.size() == components_.size()); |
137 | 143 |
138 if (level >= uri_.size()) | 144 if (level >= uri_.size()) |
139 { | 145 { |
140 throw OrthancException(ErrorCode_ParameterOutOfRange); | 146 throw OrthancException(ErrorCode_ParameterOutOfRange); |
141 } | 147 } |
142 | 148 |
143 return uri_[level].length() == 0; | 149 return uri_[level].length() == 0; |
150 } | |
151 | |
152 bool RestApiPath::IsUniversalTrailing() const | |
153 { | |
154 return hasTrailing_; | |
144 } | 155 } |
145 | 156 |
146 const std::string& RestApiPath::GetWildcardName(size_t level) const | 157 const std::string& RestApiPath::GetWildcardName(size_t level) const |
147 { | 158 { |
148 assert(uri_.size() == components_.size()); | 159 assert(uri_.size() == components_.size()); |