Cesium for Unreal 2.12.0
Loading...
Searching...
No Matches
UnrealAssetAccessor.h
Go to the documentation of this file.
1// Copyright 2020-2024 CesiumGS, Inc. and Contributors
2
3#pragma once
4
5#include "CesiumAsync/AsyncSystem.h"
6#include "CesiumAsync/IAssetAccessor.h"
7#include "Containers/Map.h"
8#include "Containers/UnrealString.h"
9#include "HAL/Platform.h"
10#include <cstddef>
11
12class CESIUMRUNTIME_API UnrealAssetAccessor
14public:
16
18 get(const CesiumAsync::AsyncSystem& asyncSystem,
19 const std::string& url,
20 const std::vector<CesiumAsync::IAssetAccessor::THeader>& headers)
21 override;
22
25 const CesiumAsync::AsyncSystem& asyncSystem,
26 const std::string& verb,
27 const std::string& url,
28 const std::vector<CesiumAsync::IAssetAccessor::THeader>& headers,
29 const std::span<const std::byte>& contentPayload) override;
30
31 virtual void tick() noexcept override;
32
33private:
34 CesiumAsync::Future<std::shared_ptr<CesiumAsync::IAssetRequest>> getFromFile(
35 const CesiumAsync::AsyncSystem& asyncSystem,
36 const std::string& url,
37 const std::vector<CesiumAsync::IAssetAccessor::THeader>& headers);
38
39 FString _userAgent;
40 TMap<FString, FString> _cesiumRequestHeaders;
41};
std::pair< std::string, std::string > THeader
virtual CesiumAsync::Future< std::shared_ptr< CesiumAsync::IAssetRequest > > get(const CesiumAsync::AsyncSystem &asyncSystem, const std::string &url, const std::vector< CesiumAsync::IAssetAccessor::THeader > &headers) override
virtual void tick() noexcept override
virtual CesiumAsync::Future< std::shared_ptr< CesiumAsync::IAssetRequest > > request(const CesiumAsync::AsyncSystem &asyncSystem, const std::string &verb, const std::string &url, const std::vector< CesiumAsync::IAssetAccessor::THeader > &headers, const std::span< const std::byte > &contentPayload) override
STL namespace.