HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PRM_KeyValueDictDataItem.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: PRM_KeyValueDictDataItem.h (PRM Library, C++)
7  *
8  * COMMENTS: Represents a key-value dictionary (string keys and values) in a
9  * parameter.
10  */
11 
12 #ifndef __PRM_KeyValueDictDataItem__
13 #define __PRM_KeyValueDictDataItem__
14 
15 #include "PRM_API.h"
16 #include "PRM_Parm.h"
17 #include "PRM_Type.h"
18 
19 class UT_JSONValueMap;
20 
22 {
23 public:
25  explicit PRM_KeyValueDictDataItem(UT_JSONValueMap *key_value_dict);
26  ~PRM_KeyValueDictDataItem() override;
27 
30  const char *getDataTypeToken() const override { return "key_value_dict"; }
31 
32  bool saveAscii(std::ostream &os) const override;
33  bool saveBinary(std::ostream &os) const override;
34 
35  int64 getMemoryUsage() const override
36  {
37  return sizeof(*this);
38  }
39 
40  // Data accessor.
41  UT_JSONValueMap *getKeyValueDict() const override;
42 
43 private:
44  UT_JSONValueMap *myKeyValueDict;
45 };
46 
47 #endif
virtual bool saveBinary(std::ostream &os) const =0
int64 getMemoryUsage() const override
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
PRM_Type::PRM_DataType getDataType() const override
virtual UT_JSONValueMap * getKeyValueDict() const
Definition: PRM_Parm.h:95
virtual bool saveAscii(std::ostream &os) const =0
const char * getDataTypeToken() const override
long long int64
Definition: SYS_Types.h:116
PRM_DataType
Definition: PRM_Type.h:112
#define PRM_API
Definition: PRM_API.h:10