Mercurial > hg > orthanc
diff Core/RestApi/RestApiHierarchy.cpp @ 970:1a3817d84f39
refactoring
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 30 Jun 2014 13:23:05 +0200 |
parents | 3dce528b0cc2 |
children | 2047e6f033bd |
line wrap: on
line diff
--- a/Core/RestApi/RestApiHierarchy.cpp Mon Jun 30 13:17:49 2014 +0200 +++ b/Core/RestApi/RestApiHierarchy.cpp Mon Jun 30 13:23:05 2014 +0200 @@ -308,27 +308,31 @@ DeleteChildren(wildcardChildren_); } - void RestApiHierarchy::Register(const RestApiPath& path, + void RestApiHierarchy::Register(const std::string& uri, RestApi::GetHandler handler) { + RestApiPath path(uri); RegisterInternal(path, handler, 0); } - void RestApiHierarchy::Register(const RestApiPath& path, + void RestApiHierarchy::Register(const std::string& uri, RestApi::PutHandler handler) { + RestApiPath path(uri); RegisterInternal(path, handler, 0); } - void RestApiHierarchy::Register(const RestApiPath& path, + void RestApiHierarchy::Register(const std::string& uri, RestApi::PostHandler handler) { + RestApiPath path(uri); RegisterInternal(path, handler, 0); } - void RestApiHierarchy::Register(const RestApiPath& path, + void RestApiHierarchy::Register(const std::string& uri, RestApi::DeleteHandler handler) { + RestApiPath path(uri); RegisterInternal(path, handler, 0); }