olp-cpp-sdk 1.24.0
Loading...
Searching...
No Matches
PrefetchTileResult.h
1/*
2 * Copyright (C) 2019-2021 HERE Europe B.V.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * SPDX-License-Identifier: Apache-2.0
17 * License-Filename: LICENSE
18 */
19
20#pragma once
21
22#include <olp/core/client/ApiError.h>
23#include <olp/core/client/ApiResponse.h>
24#include <olp/core/geo/tiling/TileKey.h>
25#include <olp/dataservice/read/DataServiceReadApi.h>
26
27namespace olp {
28namespace dataservice {
29namespace read {
30
32class DATASERVICE_READ_API PrefetchTileNoError {
33 public:
34 PrefetchTileNoError() = default;
35
38 ~PrefetchTileNoError() = default;
39};
40
47class DATASERVICE_READ_API PrefetchTileResult
48 : public client::ApiResponse<PrefetchTileNoError, client::ApiError> {
49 public:
54
56
65 const PrefetchTileNoError& result)
66 : base_type(result), tile_key_(tile) {}
67
77 : base_type(error), tile_key_(tile) {}
78
87 : base_type(r), tile_key_(r.tile_key_) {}
88
96 explicit PrefetchTileResult(const client::ApiError& error)
97 : base_type(error) {}
98
99 public:
106};
107
108} // namespace read
109} // namespace dataservice
110} // namespace olp
A wrapper around an internal error or HTTP status code.
Definition ApiError.h:37
Represents a request outcome.
Definition ApiResponse.h:65
A helper class for the 'ApiResponse` class.
Definition PrefetchTileResult.h:32
PrefetchTileNoError(const PrefetchTileNoError &other)=default
A default copy constructor.
Represents the result of a prefetch operation.
Definition PrefetchTileResult.h:48
geo::TileKey tile_key_
The TileKey instance that addresses a tile in a quadtree.
Definition PrefetchTileResult.h:105
PrefetchTileResult(const PrefetchTileResult &r)
Creates the PrefetchTileResult instance that is a copy of the r parameter.
Definition PrefetchTileResult.h:86
PrefetchTileResult(const geo::TileKey &tile, const PrefetchTileNoError &result)
Creates the PrefetchTileResult instance if the corresponding response was successful.
Definition PrefetchTileResult.h:64
PrefetchTileResult(const client::ApiError &error)
Creates the ApiResponse instance if the corresponding response was not successful.
Definition PrefetchTileResult.h:96
PrefetchTileResult(const geo::TileKey &tile, const client::ApiError &error)
Creates the PrefetchTileResult instance if the corresponding response was not successful.
Definition PrefetchTileResult.h:76
Addresses a tile in a quadtree.
Definition TileKey.h:63
Rules all the other namespaces.
Definition AppleSignInProperties.h:24