comparison 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
comparison
equal deleted inserted replaced
969:3dce528b0cc2 970:1a3817d84f39
306 { 306 {
307 DeleteChildren(children_); 307 DeleteChildren(children_);
308 DeleteChildren(wildcardChildren_); 308 DeleteChildren(wildcardChildren_);
309 } 309 }
310 310
311 void RestApiHierarchy::Register(const RestApiPath& path, 311 void RestApiHierarchy::Register(const std::string& uri,
312 RestApi::GetHandler handler) 312 RestApi::GetHandler handler)
313 { 313 {
314 RestApiPath path(uri);
314 RegisterInternal(path, handler, 0); 315 RegisterInternal(path, handler, 0);
315 } 316 }
316 317
317 void RestApiHierarchy::Register(const RestApiPath& path, 318 void RestApiHierarchy::Register(const std::string& uri,
318 RestApi::PutHandler handler) 319 RestApi::PutHandler handler)
319 { 320 {
321 RestApiPath path(uri);
320 RegisterInternal(path, handler, 0); 322 RegisterInternal(path, handler, 0);
321 } 323 }
322 324
323 void RestApiHierarchy::Register(const RestApiPath& path, 325 void RestApiHierarchy::Register(const std::string& uri,
324 RestApi::PostHandler handler) 326 RestApi::PostHandler handler)
325 { 327 {
328 RestApiPath path(uri);
326 RegisterInternal(path, handler, 0); 329 RegisterInternal(path, handler, 0);
327 } 330 }
328 331
329 void RestApiHierarchy::Register(const RestApiPath& path, 332 void RestApiHierarchy::Register(const std::string& uri,
330 RestApi::DeleteHandler handler) 333 RestApi::DeleteHandler handler)
331 { 334 {
335 RestApiPath path(uri);
332 RegisterInternal(path, handler, 0); 336 RegisterInternal(path, handler, 0);
333 } 337 }
334 338
335 void RestApiHierarchy::CreateSiteMap(Json::Value& target) const 339 void RestApiHierarchy::CreateSiteMap(Json::Value& target) const
336 { 340 {