Mercurial > hg > orthanc
comparison Core/RestApi/RestApiPath.h @ 975:c550e99c452b
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Jun 2014 14:53:18 +0200 |
parents | 886652370ff2 |
children | 6e7e5ed91c2d |
comparison
equal
deleted
inserted
replaced
974:83622b0f544c | 975:c550e99c452b |
---|---|
31 | 31 |
32 | 32 |
33 #pragma once | 33 #pragma once |
34 | 34 |
35 #include "../Toolbox.h" | 35 #include "../Toolbox.h" |
36 #include "../HttpServer/HttpHandler.h" | |
37 | |
36 #include <map> | 38 #include <map> |
37 | 39 |
38 namespace Orthanc | 40 namespace Orthanc |
39 { | 41 { |
40 class RestApiPath | 42 class RestApiPath |
43 UriComponents uri_; | 45 UriComponents uri_; |
44 bool hasTrailing_; | 46 bool hasTrailing_; |
45 std::vector<std::string> components_; | 47 std::vector<std::string> components_; |
46 | 48 |
47 public: | 49 public: |
48 typedef std::map<std::string, std::string> Components; | |
49 | |
50 RestApiPath(const std::string& uri); | 50 RestApiPath(const std::string& uri); |
51 | 51 |
52 // This version is slower | 52 // This version is slower |
53 bool Match(Components& components, | 53 bool Match(HttpHandler::Arguments& components, |
54 UriComponents& trailing, | 54 UriComponents& trailing, |
55 const std::string& uriRaw) const; | 55 const std::string& uriRaw) const; |
56 | 56 |
57 bool Match(Components& components, | 57 bool Match(HttpHandler::Arguments& components, |
58 UriComponents& trailing, | 58 UriComponents& trailing, |
59 const UriComponents& uri) const; | 59 const UriComponents& uri) const; |
60 | 60 |
61 bool Match(const UriComponents& uri) const; | 61 bool Match(const UriComponents& uri) const; |
62 | 62 |