提交 ad11423e65272af0b411fb0d84c1910482cca0c7

作者 WZP 万忠平
1 个父辈 532206c0

wzp、

... ... @@ -34,7 +34,7 @@ class SERVER_EXPORT DmpService
34 34 virtual std::string name() const = 0;
35 35 virtual std::string version() const = 0;
36 36 virtual std::string description() const = 0;
37   - virtual bool validate() const { return true; }
  37 + virtual bool validate() { return true; }
38 38 virtual bool allowMethod(DmpServerRequest::Method) const { return true; }
39 39 virtual void executeRequest(const DmpServerContext &context) = 0;
40 40 };
... ...
... ... @@ -105,7 +105,7 @@ bool DmpTileServer::publish(const std::string &serviceName, const std::string &t
105 105 if(!wmtsservice) {
106 106 return false;
107 107 }
108   - else if(!wmtsservice.validate())
  108 + else if(!wmtsservice->validate())
109 109 {
110 110 return false;
111 111 }
... ... @@ -115,7 +115,7 @@ bool DmpTileServer::publish(const std::string &serviceName, const std::string &t
115 115 if(!tmsservice) {
116 116 return false;
117 117 }
118   - else if(!tmsservice.validate())
  118 + else if(!tmsservice->validate())
119 119 {
120 120 return false;
121 121 }
... ...
... ... @@ -40,10 +40,6 @@ namespace DmpWmts
40 40 {
41 41 LOGGER_DEBUG("Destructing WmtsService");
42 42 }
43   - bool DmpWMTSService::allowMethod(DmpServerRequest::Method method)
44   - {
45   - return method == DmpServerRequest::GET_METHOD;
46   - }
47 43 bool DmpWMTSService::validate()
48 44 {
49 45 return false;
... ...
... ... @@ -24,7 +24,7 @@ namespace DmpWmts
24 24 std::string name() const override { return std::string("WMTSService"); }
25 25 std::string version() const override { return std::string("1.0.0"); }
26 26 std::string description() const override { return std::string("WMTS瓦片服务"); }
27   - bool validate() const override;
  27 + bool validate() override;
28 28 bool allowMethod(DmpServerRequest::Method method) const override { return method == DmpServerRequest::GET_METHOD;}
29 29 void executeRequest(const DmpServerContext &context) override;
30 30
... ...
注册登录 后发表评论