ArcGIS Procedural Runtime  3.2.10650
DataBackend.h
1 /*
2  COPYRIGHT (c) 2012-2024 Esri R&D Center Zurich
3  TRADE SECRETS: ESRI PROPRIETARY AND CONFIDENTIAL
4  Unpublished material - all rights reserved under the
5  Copyright Laws of the United States and applicable international
6  laws, treaties, and conventions.
7 
8  For additional information, contact:
9  Environmental Systems Research Institute, Inc.
10  Attn: Contracts and Legal Services Department
11  380 New York Street
12  Redlands, California, 92373
13  USA
14 
15  email: contracts@esri.com
16 */
17 
18 #ifndef PRTX_DATABACKEND_H_
19 #define PRTX_DATABACKEND_H_
20 
21 #include "prtx/prtx.h"
22 #include "prtx/Types.h"
23 #include "prtx/URI.h"
24 #include "prtx/Content.h"
25 #include "prtx/Texture.h"
26 #include "prtx/Geometry.h"
27 #include "prtx/CGB.h"
28 #include "prtx/ResolveMap.h"
29 #include "prtx/Table.h"
30 
31 #include "prt/Status.h"
32 #include "prt/Cache.h"
33 
34 #include <string>
35 #include <memory>
36 
37 
38 namespace prtx {
39 
40 class Mesh;
41 using MeshPtr = std::shared_ptr<Mesh>;
42 using MeshPtrVector = std::vector<MeshPtr>;
43 
44 class Material;
45 using MaterialPtr = std::shared_ptr<Material>;
46 using MaterialPtrVector = std::vector<MaterialPtr>;
47 
48 using BinaryVectorPtr = std::shared_ptr<BinaryVector>;
49 
50 class CTString;
51 using CTStringPtr = std::shared_ptr<CTString>;
52 
63 namespace DataBackend {
64 
65 
74 PRTX_EXPORTS_API CGBPtr resolveCGB(prt::Cache* cache, const std::wstring& key, const prtx::ResolveMap* resolveMap = nullptr);
75 
85 PRTX_EXPORTS_API GeometryPtr resolveGeometry(prt::Cache* cache, const std::wstring& key, const prtx::ResolveMap* resolveMap = nullptr, std::wstring* warnings = nullptr);
86 
96 PRTX_EXPORTS_API void resolveMaterial(prt::Cache* cache, MaterialPtrVector& materials, const std::wstring& key, const prtx::ResolveMap* resolveMap = nullptr, std::wstring* warnings = nullptr);
97 
107 PRTX_EXPORTS_API TexturePtr resolveTexture(prt::Cache* cache, const std::wstring& key, const prtx::ResolveMap* resolveMap = nullptr, std::wstring* warnings = nullptr);
108 
109 
119 PRTX_EXPORTS_API BinaryVectorPtr resolveBinaryData(prt::Cache* cache, const std::wstring& key, const prtx::ResolveMap* resolveMap = nullptr, std::wstring* warnings = nullptr);
120 
130 PRTX_EXPORTS_API CTStringPtr resolveText(prt::Cache* cache, const std::wstring& key, const prtx::ResolveMap* resolveMap = nullptr, std::wstring* warnings = nullptr);
131 
141 PRTX_EXPORTS_API TablePtr resolveTable(prt::Cache* cache, const std::wstring& key, const prtx::ResolveMap* resolveMap = nullptr, std::wstring* warnings = nullptr);
142 
143 
151 PRTX_EXPORTS_API bool isCached(prt::Cache* cache, prt::ContentType ct, const prtx::URIPtr& uri);
152 
159 [[deprecated]] PRTX_EXPORTS_API void readURI(const prtx::URIPtr& uri, BinaryVector& data);
160 
161 
162 } // namespace DataBackend
163 
164 
165 } // namespace prtx
166 
167 
168 #endif /* PRTX_DATABACKEND_H_ */
std::shared_ptr< Texture > TexturePtr
shared Texture pointer
Definition: Texture.h:37
CTStringPtr resolveText(prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
std::vector< uint8_t > BinaryVector
vector to hold binary data
Definition: Types.h:37
std::shared_ptr< Material > MaterialPtr
shared Material pointer
Definition: DataBackend.h:45
bool isCached(prt::Cache *cache, prt::ContentType ct, const prtx::URIPtr &uri)
Definition: Material.h:202
The Procedural Runtime eXtension namespace. The prtx namespace contains the tools to extend the Proce...
Definition: AnnotationBuilder.h:35
std::shared_ptr< URI > URIPtr
shared pointer implementation of prtx::URI
Definition: URI.h:37
std::shared_ptr< Geometry > GeometryPtr
shared Geometry pointer
Definition: DebugUtils.h:37
ContentType
Definition: ContentType.h:28
Definition: Cache.h:53
std::vector< MeshPtr > MeshPtrVector
vector of shared Mesh pointers
Definition: DataBackend.h:42
std::vector< MaterialPtr > MaterialPtrVector
vector of shared Material pointers
Definition: DataBackend.h:46
BinaryVectorPtr resolveBinaryData(prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
Definition: /ResolveMap.h:40
void readURI(const prtx::URIPtr &uri, BinaryVector &data)
CGBPtr resolveCGB(prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr)
std::shared_ptr< Mesh > MeshPtr
shared Mesh pointer
Definition: DataBackend.h:41
GeometryPtr resolveGeometry(prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
TexturePtr resolveTexture(prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
void resolveMaterial(prt::Cache *cache, MaterialPtrVector &materials, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)
Definition: CTString.h:35
TablePtr resolveTable(prt::Cache *cache, const std::wstring &key, const prtx::ResolveMap *resolveMap=nullptr, std::wstring *warnings=nullptr)