ArcGIS Procedural Runtime  3.2.10650
ExtensionManager.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_EXTENSIONMANAGER_H_
19 #define PRTX_EXTENSIONMANAGER_H_
20 
21 #include "prtx/prtx.h"
22 #include "prtx/URI.h"
23 #include "prtx/ExtensionFactory.h"
24 #include "prtx/StreamAdaptor.h"
25 #include "prtx/ResolveMapProvider.h"
26 #include "prtx/Decoder.h"
27 #include "prtx/Encoder.h"
28 
29 #include "prt/AttributeMap.h"
30 #include "prt/EncoderInfo.h"
31 #include "prt/DecoderInfo.h"
32 
33 #ifdef _MSC_VER
34 # pragma warning(push)
35 # pragma warning (disable : 4275)
36 #endif
37 
38 
39 namespace prtx {
40 
41 
52 class PRTX_EXPORTS_API ExtensionManager {
53 public:
54  ExtensionManager(const ExtensionManager&) = delete;
55  ExtensionManager& operator=(const ExtensionManager&) = delete;
56  virtual ~ExtensionManager() = default;
57 
61  static ExtensionManager& instance();
62 
69  virtual void addFactory(prtx::ExtensionFactory* factory) = 0;
70 
74  virtual void listEncoderIds(std::vector<std::wstring>& result) const = 0;
75 
76 
80  virtual void listDecoderIds(std::vector<std::wstring>& result) const = 0;
81 
90  virtual prt::EncoderInfo const* createEncoderInfo(const std::wstring& id) const = 0;
91 
98  virtual prt::DecoderInfo const* createDecoderInfo(const std::wstring& id) const = 0;
99 
105  virtual EncoderPtr createEncoder(
106  const std::wstring& id,
107  const prt::AttributeMap* options,
108  prt::Callbacks* const callbacks
109  ) const = 0;
110 
121  virtual DecoderPtr createDecoder(prt::ContentType ct, const prtx::URIPtr& uri) const = 0;
122 
128  virtual DecoderPtr createDecoder(const std::wstring& id) const = 0;
129 
137  virtual StreamAdaptorPtr createStreamAdaptor(const prtx::URIPtr& uri) const = 0;
138 
146  virtual ResolveMapProviderPtr createResolveMapProvider(const prtx::URIPtr& uri) const = 0;
147 
148 public:
149  static void setInstance(ExtensionManager* theInstance);
150  virtual void init(const wchar_t* const* prtPlugins, size_t prtPluginsCount) = 0;
151 
152 protected:
153  ExtensionManager() = default;
154 };
155 
156 
157 } // namespace prtx
158 
159 
160 #ifdef _MSC_VER
161 #pragma warning(pop)
162 #endif
163 
164 
165 #endif /* PRTX_EXTENSIONMANAGER_H_ */
Definition: DecoderInfo.h:30
Definition: ExtensionFactory.h:48
Definition: EncoderInfo.h:43
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
ContentType
Definition: ContentType.h:28
Definition: AttributeMap.h:32
Definition: ExtensionManager.h:52
Definition: Callbacks.h:45