Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <olp/authentication/Types.h>
#include <olp/core/client/ApiResponse.h>
#include <olp/core/client/CancellationToken.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

/**
* @brief Rules all the other namespaces.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <string>

#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>
#include "AuthenticationApi.h"

namespace olp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <olp/authentication/AuthenticationApi.h>
#include <olp/core/client/RetrySettings.h>
#include <olp/core/http/NetworkProxySettings.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace http {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <vector>

#include <olp/authentication/AuthenticationApi.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace authentication {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@

#include <olp/core/client/RetrySettings.h>
#include <olp/core/http/NetworkProxySettings.h>
#include <olp/core/porting/optional.hpp>

#include <olp/core/porting/optional.h>
#include "AuthenticationApi.h"
#include "AuthenticationCredentials.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <ctime>
#include <string>

#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>
#include "AuthenticationApi.h"
#include "ErrorResponse.h"

Expand Down
2 changes: 1 addition & 1 deletion olp-cpp-sdk-authentication/src/TokenEndpointImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <olp/authentication/Types.h>
#include <olp/core/client/CancellationContext.h>
#include <olp/core/client/OlpClient.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>
#include "TokenRequest.h"

namespace olp {
Expand Down
2 changes: 1 addition & 1 deletion olp-cpp-sdk-core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ set(OLP_SDK_PORTING_HEADERS
./include/olp/core/porting/deprecated.h
./include/olp/core/porting/export.h
./include/olp/core/porting/make_unique.h
./include/olp/core/porting/optional.hpp
./include/olp/core/porting/optional.h
./include/olp/core/porting/platform.h
./include/olp/core/porting/shared_mutex.h
./include/olp/core/porting/try_emplace.h
Expand Down
2 changes: 1 addition & 1 deletion olp-cpp-sdk-core/include/olp/core/cache/CacheSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#include <olp/core/Config.h>
#include <olp/core/CoreApi.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace cache {
Expand Down
14 changes: 7 additions & 7 deletions olp-cpp-sdk-core/include/olp/core/cache/KeyGenerator.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#include <olp/core/CoreApi.h>
#include <olp/core/geo/tiling/TileKey.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace cache {
Expand Down Expand Up @@ -76,7 +76,8 @@ class CORE_API KeyGenerator {
*/
static std::string CreatePartitionKey(
const std::string& hrn, const std::string& layer_id,
const std::string& partition_id, const porting::optional<int64_t>& version);
const std::string& partition_id,
const porting::optional<int64_t>& version);

/**
* @brief Generates cache key for storing list of partitions.
Expand Down Expand Up @@ -113,11 +114,10 @@ class CORE_API KeyGenerator {
*
* @return A key used to store the quadtree in cache.
*/
static std::string CreateQuadTreeKey(const std::string& hrn,
const std::string& layer_id,
olp::geo::TileKey root,
const porting::optional<int64_t>& version,
int32_t depth);
static std::string CreateQuadTreeKey(
const std::string& hrn, const std::string& layer_id,
olp::geo::TileKey root, const porting::optional<int64_t>& version,
int32_t depth);

/**
* @brief Generates cache key for data handle entities.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <olp/core/client/OauthToken.h>
#include <olp/core/client/RetrySettings.h>
#include <olp/core/http/Network.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace cache {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <string>
#include <vector>

#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>
#include <rapidjson/rapidjson.h>

namespace olp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
#include <map>
#include <memory>
#include <string>
#include <vector>
#include <utility>
#include <vector>

#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>
#include <rapidjson/document.h>

namespace olp {
Expand Down
2 changes: 1 addition & 1 deletion olp-cpp-sdk-core/include/olp/core/geo/tiling/PathTiling.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <olp/core/geo/coordinates/GeoCoordinates.h>
#include <olp/core/geo/tiling/TileKey.h>
#include <olp/core/geo/tiling/TileKeyUtils.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace geo {
Expand Down
28 changes: 17 additions & 11 deletions olp-cpp-sdk-core/include/olp/core/geo/tiling/TileKey.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <string>

#include <olp/core/CoreApi.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace geo {
Expand All @@ -46,12 +46,13 @@ namespace geo {
* To create a tile key, use `FromRowColumnLevel()`.
*
* For vertical navigation within the tree, use the following functions:
* `Parent()`, `ChangedLevelBy()`, and `ChangedLevelTo()`. To navigate within a level, use
* the `HasNextRow()`, `NextRow()`, `HasNextColumn()`, and `NextColumn()` functions.
* To get the number of available rows and columns on the tile level, use `RowCount()` and
* `ColumnCount()`.
* `Parent()`, `ChangedLevelBy()`, and `ChangedLevelTo()`. To navigate within a
* level, use the `HasNextRow()`, `NextRow()`, `HasNextColumn()`, and
* `NextColumn()` functions. To get the number of available rows and columns on
* the tile level, use `RowCount()` and `ColumnCount()`.
*
* You can also create tile keys from and converted them into various alternative formats:
* You can also create tile keys from and converted them into various
* alternative formats:
*
* - `ToQuadKey()` / `FromQuadKey()` – 4-based string representation.
*
Expand Down Expand Up @@ -121,7 +122,8 @@ class CORE_API TileKey {
}

/**
* @brief Creates a quad string from a tile key to later use it in REST API calls.
* @brief Creates a quad string from a tile key to later use it in REST API
* calls.
*
* If the tile is the root tile, the quadkey is '-'.
* Otherwise, the string is a number to the base of 4 without the leading
Expand All @@ -142,11 +144,13 @@ class CORE_API TileKey {
static TileKey FromQuadKey(const std::string& quad_key);

/**
* @brief Creates a HERE tile code string from a tile key to later use it in REST API calls.
* @brief Creates a HERE tile code string from a tile key to later use it in
* REST API calls.
*
* The string is a quadkey Morton code.
*
* To convert the HERE tile code string back into the tile key, use `FromHereTile()`.
* To convert the HERE tile code string back into the tile key, use
* `FromHereTile()`.
*/
std::string ToHereTile() const;

Expand All @@ -160,7 +164,8 @@ class CORE_API TileKey {
/**
* @brief Creates a 64-bit Morton code from a tile key.
*
* To convert the 64-bit Morton code back into the tile key, use `FromQuadKey64()`.
* To convert the 64-bit Morton code back into the tile key, use
* `FromQuadKey64()`.
*/
std::uint64_t ToQuadKey64() const;

Expand All @@ -174,7 +179,8 @@ class CORE_API TileKey {
/**
* @brief Creates a tile key.
*
* @param row The requested row. Must be less than 2 to the power of the level.
* @param row The requested row. Must be less than 2 to the power of the
* level.
* @param column The requested column. Must be less than 2 to the power of
* the level.
* @param level The requested level.
Expand Down
2 changes: 1 addition & 1 deletion olp-cpp-sdk-core/include/olp/core/http/NetworkResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <olp/core/CoreApi.h>
#include <olp/core/http/NetworkTypes.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace http {
Expand Down
11 changes: 7 additions & 4 deletions olp-cpp-sdk-core/include/olp/core/logging/FilterGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <olp/core/CoreApi.h>
#include <olp/core/logging/Level.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace logging {
Expand Down Expand Up @@ -54,7 +54,8 @@ class CORE_API FilterGroup {
/**
* @brief Gets the default log level.
*
* @return The default log level or `olp::porting::none` if the level is not set.
* @return The default log level or `olp::porting::none` if the level is not
* set.
*/
inline porting::optional<Level> getLevel() const;

Expand All @@ -78,7 +79,8 @@ class CORE_API FilterGroup {
*
* @param tag The tag for which to get the log level.
*
* @return The log level for the tag, or `olp::porting::none` if the level is not set.
* @return The log level for the tag, or `olp::porting::none` if the level is
* not set.
*/
inline porting::optional<Level> getLevel(const std::string& tag) const;

Expand Down Expand Up @@ -184,7 +186,8 @@ inline FilterGroup& FilterGroup::clearLevel() {
inline porting::optional<Level> FilterGroup::getLevel(
const std::string& tag) const {
auto foundIter = m_tagLevels.find(tag);
if (foundIter == m_tagLevels.end()) return porting::none;
if (foundIter == m_tagLevels.end())
return porting::none;
return foundIter->second;
}

Expand Down
2 changes: 1 addition & 1 deletion olp-cpp-sdk-core/include/olp/core/logging/Log.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <olp/core/logging/Level.h>

#include <olp/core/CoreApi.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>
#include <olp/core/utils/WarningWorkarounds.h>

/**
Expand Down
5 changes: 3 additions & 2 deletions olp-cpp-sdk-core/include/olp/core/utils/Url.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <vector>

#include <olp/core/CoreApi.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace utils {
Expand Down Expand Up @@ -81,7 +81,8 @@ class CORE_API Url {
* @return An optional pair representing host part and the rest of URL.
* Returns olp::porting::none when url cannot be split.
*/
static porting::optional<HostAndRest> ParseHostAndRest(const std::string& url);
static porting::optional<HostAndRest> ParseHostAndRest(
const std::string& url);
};

} // namespace utils
Expand Down
2 changes: 1 addition & 1 deletion olp-cpp-sdk-core/src/client/api/PlatformApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <olp/core/client/ApiError.h>
#include <olp/core/client/ApiResponse.h>
#include <olp/core/client/model/Api.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace client {
Expand Down
2 changes: 1 addition & 1 deletion olp-cpp-sdk-core/src/client/api/ResourcesApi.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <olp/core/client/ApiError.h>
#include <olp/core/client/ApiResponse.h>
#include <olp/core/client/model/Api.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace client {
Expand Down
4 changes: 2 additions & 2 deletions olp-cpp-sdk-core/src/client/repository/ApiCacheRepository.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <string>

#include <olp/core/client/HRN.h>
#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

namespace olp {
namespace cache {
Expand All @@ -44,7 +44,7 @@ class ApiCacheRepository final {
const std::string& url, porting::optional<time_t> expiry);

porting::optional<std::string> Get(const std::string& service,
const std::string& version);
const std::string& version);

private:
std::string hrn_;
Expand Down
2 changes: 1 addition & 1 deletion olp-cpp-sdk-core/src/http/curl/NetworkCurl.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <thread>
#include <vector>

#include <olp/core/porting/optional.hpp>
#include <olp/core/porting/optional.h>

#if defined(OLP_SDK_ENABLE_ANDROID_CURL) && !defined(ANDROID_HOST)
#include <openssl/ossl_typ.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
#include <string>
#include <utility>

#include <olp/core/porting/optional.hpp>

#include <olp/core/porting/optional.h>
#include <olp/dataservice/write/DataServiceWriteApi.h>

namespace olp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
#include <string>
#include <vector>

#include <olp/core/porting/optional.hpp>

#include <olp/core/porting/optional.h>
#include <olp/dataservice/write/DataServiceWriteApi.h>
#include <olp/dataservice/write/generated/model/Details.h>
#include <olp/dataservice/write/generated/model/VersionDependency.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
#include <utility>
#include <vector>

#include <olp/core/porting/optional.hpp>

#include <olp/core/porting/optional.h>
#include <olp/dataservice/write/DataServiceWriteApi.h>

namespace olp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
#include <utility>
#include <vector>

#include <olp/core/porting/optional.hpp>

#include <olp/core/porting/optional.h>
#include <olp/dataservice/write/DataServiceWriteApi.h>
#include <olp/dataservice/write/generated/model/Index.h>

Expand Down
Loading
Loading