HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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  virtual ~PRM_KeyValueDictDataItem();
27 
30  virtual const char *getDataTypeToken() const { return "key_value_dict"; }
31 
32  virtual bool saveAscii(std::ostream &os) const;
33  virtual bool saveBinary(std::ostream &os) const;
34 
35  virtual int64 getMemoryUsage() const
36  {
37  return sizeof(this);
38  }
39 
40  // Data accessor.
41  virtual UT_JSONValueMap *getKeyValueDict() const;
42 
43 private:
44  UT_JSONValueMap *myKeyValueDict;
45 };
46 
47 #endif
virtual bool saveBinary(std::ostream &os) const =0
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
virtual UT_JSONValueMap * getKeyValueDict() const
Definition: PRM_Parm.h:85
virtual int64 getMemoryUsage() const
long long int64
Definition: SYS_Types.h:106
virtual bool saveAscii(std::ostream &os) const =0
PRM_DataType
Definition: PRM_Type.h:112
virtual const char * getDataTypeToken() const
virtual PRM_Type::PRM_DataType getDataType() const
#define PRM_API
Definition: PRM_API.h:10