ArcGIS Procedural Runtime  3.2.10650
Attributable.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 PRT_ATTRIBUTABLE_H_
19 #define PRT_ATTRIBUTABLE_H_
20 
21 #include "prt/prt.h"
22 #include "prt/Status.h"
23 
24 #include <cstddef>
25 #include <cstdint>
26 
27 
28 namespace prt {
29 
30 
38 class PRT_EXPORTS_API Attributable {
39 public:
40 
56  PT_COUNT
57  };
58 
68  virtual const wchar_t* const* getKeys (size_t* count, Status* stat = 0) const = 0;
69 
77  virtual bool hasKey (const wchar_t* key, Status* stat = 0) const = 0;
78 
86  virtual PrimitiveType getType (const wchar_t* key, Status* stat = 0) const = 0;
87 
96  virtual bool getBool (const wchar_t* key, Status* stat = 0) const = 0;
97 
106  virtual int32_t getInt (const wchar_t* key, Status* stat = 0) const = 0;
107 
116  virtual double getFloat (const wchar_t* key, Status* stat = 0) const = 0;
117 
127  virtual const wchar_t* getString (const wchar_t* key, Status* stat = 0) const = 0;
128 
139  virtual const bool* getBoolArray (const wchar_t* key, size_t* count, Status* stat = 0) const = 0;
140 
151  virtual const int32_t* getIntArray (const wchar_t* key, size_t* count, Status* stat = 0) const = 0;
152 
163  virtual const double* getFloatArray (const wchar_t* key, size_t* count, Status* stat = 0) const = 0;
164 
175  virtual const wchar_t* const* getStringArray (const wchar_t* key, size_t* count, Status* stat = 0) const = 0;
176 
177 protected:
178  Attributable() { }
179  virtual ~Attributable() { }
180 };
181 
182 
186 class PRT_EXPORTS_API AttributableSetter {
187 public:
188 
196  virtual Status setBool (const wchar_t* key, bool value) = 0;
197 
205  virtual Status setInt (const wchar_t* key, int32_t value) = 0;
206 
214  virtual Status setFloat (const wchar_t* key, double value) = 0;
215 
223  virtual Status setString (const wchar_t* key, const wchar_t* value) = 0;
224 
233  virtual Status setBoolArray (const wchar_t* key, const bool* value, size_t count) = 0;
234 
243  virtual Status setIntArray (const wchar_t* key, const int32_t* value, size_t count) = 0;
244 
253  virtual Status setFloatArray (const wchar_t* key, const double* value, size_t count) = 0;
254 
263  virtual Status setStringArray (const wchar_t* key, const wchar_t* const* value, size_t count) = 0;
264 
265 protected:
266  AttributableSetter() { }
267  virtual ~AttributableSetter() { }
268 };
269 
270 
271 } // namespace
272 
273 
274 #endif /* PRT_ATTRIBUTABLE_H_ */
Float array type.
Definition: Attributable.h:51
Float type.
Definition: Attributable.h:47
Boolean type.
Definition: Attributable.h:48
Blind data type.
Definition: Attributable.h:54
Definition: Attributable.h:186
Boolean array type.
Definition: Attributable.h:52
Integer type.
Definition: Attributable.h:49
Undefined type.
Definition: Attributable.h:45
String type.
Definition: Attributable.h:46
PrimitiveType
Definition: Attributable.h:44
String array type.
Definition: Attributable.h:50
Definition: Attributable.h:38
Integer array type.
Definition: Attributable.h:53
Status
Definition: Status.h:31
The Procedural Runtime API namespace. The prt namespace contains the top level entry points into the ...
Definition: Annotation.h:24
Blind data array type.
Definition: Attributable.h:55