ArcGIS Procedural Runtime  3.2.10650
EncoderFactory.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_ENCODERFACTORY_H_
19 #define PRTX_ENCODERFACTORY_H_
20 
21 #include "prtx.h"
22 #include "prtx/ExtensionFactory.h"
23 #include "prtx/Encoder.h"
24 
25 #include "prt/Annotation.h"
26 #include "prt/AttributeMap.h"
27 #include "prt/Callbacks.h"
28 #include "prt/EncoderInfo.h"
29 
30 #include <string>
31 #include <vector>
32 
33 #ifdef _MSC_VER
34 # pragma warning(push)
35 # pragma warning (disable : 4251 4231 4660)
36 #endif
37 
38 
39 class EncoderInfoImpl;
40 
41 
42 namespace prtx {
43 
44 
81 class PRTX_EXPORTS_API EncoderFactory : public ExtensionFactory {
82 protected:
95  EncoderFactory(const prt::EncoderInfo* info);
96 
97 public:
98  EncoderFactory() = delete;
99  virtual ~EncoderFactory();
100 
109  virtual Encoder* create(const prt::AttributeMap* options, prt::Callbacks* callbacks) const = 0;
110 
114  virtual const std::wstring& getID() const final;
115 
119  virtual const std::wstring& getName() const final;
120 
124  virtual const std::wstring& getDescription() const final;
125 
129  virtual prt::ContentType getContentType() const final;
130 
134  bool checkOptionKeys(prt::AttributeMap const* opts) const;
135 
142  prt::EncoderInfo* createEncoderInfo() const;
143 
149  virtual prtx::Extension::ExtensionType getExtensionType() const final override {
150  return Extension::ET_ENCODER;
151  }
152 
158  virtual bool canHandleURI(prtx::URIPtr /* uri */) const final override {
159  return true;
160  }
161 
162 private:
163  virtual Extension* create() const override;
164 
165 protected:
166  const EncoderInfoImpl* mInfo {nullptr};
167 };
168 
169 
170 } /* namespace prtx */
171 
172 
173 #ifdef _MSC_VER
174 #pragma warning(pop)
175 #endif
176 
177 
178 #endif /* PRTX_ENCODERFACTORY_H_ */
ExtensionType
Definition: Extension.h:46
Definition: EncoderFactory.h:81
virtual bool canHandleURI(prtx::URIPtr) const final override
Definition: EncoderFactory.h:158
Definition: Encoder.h:55
Extension sub-class is an encoder.
Definition: Extension.h:50
Definition: ExtensionFactory.h:48
Definition: EncoderInfo.h:43
Definition: Extension.h:41
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
virtual prtx::Extension::ExtensionType getExtensionType() const final override
Definition: EncoderFactory.h:149
Definition: Callbacks.h:45