ArcGIS Procedural Runtime  3.2.10650
EncodeOptionsValidator.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_ENCODEOPTIONSVALIDATOR_H_
19 #define PRTX_ENCODEOPTIONSVALIDATOR_H_
20 
21 #include "prtx/prtx.h"
22 #include "prtx/PRTUtils.h"
23 
24 #include "prt/EncoderInfo.h"
25 
26 #include <string>
27 #include <vector>
28 #include <memory>
29 
30 
31 namespace prtx {
32 
33 
34 class OptionStates;
35 typedef std::shared_ptr<OptionStates> OptionStatesPtr;
36 
40 class PRTX_EXPORTS_API OptionStates {
41 public:
42  typedef std::vector<const std::wstring*> KeyRefs;
43 
44 public:
45  virtual const KeyRefs& getKeys() const = 0;
46  virtual prt::EncoderInfo::OptionState getState(const std::wstring& key) const = 0;
47  virtual void setState(const std::wstring& key, prt::EncoderInfo::OptionState state) = 0;
48 
49  virtual ~OptionStates() { }
50 };
51 
52 
54 typedef std::shared_ptr<EncodeOptionsValidator> EncodeOptionsValidatorPtr;
55 
59 class PRTX_EXPORTS_API EncodeOptionsValidator {
60 public:
61  EncodeOptionsValidator() = default;
64  EncodeOptionsValidator& operator=(const EncodeOptionsValidator&) = delete;
65  EncodeOptionsValidator& operator=(EncodeOptionsValidator&&) = delete;
66  virtual ~EncodeOptionsValidator() = default;
67 
80  virtual void validate(
81  const prtx::PRTUtils::AttributeMapPtr& currValues,
83  const prtx::OptionStatesPtr& states
84  ) = 0;
85 };
86 
87 
88 } // namespace prtx
89 
90 
91 #endif /* PRTX_ENCODEOPTIONSVALIDATOR_H_ */
Definition: PRTUtils.h:70
OptionState
Definition: EncoderInfo.h:48
std::shared_ptr< EncodeOptionsValidator > EncodeOptionsValidatorPtr
shared pointer for prtx::EncodeOptionsValidator
Definition: EncodeOptionsValidator.h:53
The Procedural Runtime eXtension namespace. The prtx namespace contains the tools to extend the Proce...
Definition: AnnotationBuilder.h:35
Definition: EncodeOptionsValidator.h:40
Definition: EncodeOptionsValidator.h:59