7 #include "ppapi/c/ppb_var_dictionary.h"
15 template <>
const char* interface_name<PPB_VarDictionary_1_0>() {
16 return PPB_VAR_DICTIONARY_INTERFACE_1_0;
22 if (has_interface<PPB_VarDictionary_1_0>())
23 var_ = get_interface<PPB_VarDictionary_1_0>()->Create();
38 if (var.type != PP_VARTYPE_DICTIONARY) {
70 if (!has_interface<PPB_VarDictionary_1_0>())
75 get_interface<PPB_VarDictionary_1_0>()->
Get(
var_, key.
pp_var()));
79 if (!has_interface<PPB_VarDictionary_1_0>())
82 return PP_ToBool(get_interface<PPB_VarDictionary_1_0>()->
Set(
87 if (has_interface<PPB_VarDictionary_1_0>())
92 if (!has_interface<PPB_VarDictionary_1_0>())
95 return PP_ToBool(get_interface<PPB_VarDictionary_1_0>()->
HasKey(
100 if (!has_interface<PPB_VarDictionary_1_0>())
104 get_interface<PPB_VarDictionary_1_0>()->
GetKeys(
var_));
virtual Var & operator=(const Var &other)
bool HasKey(const Var &key) const
bool is_dictionary() const
Special value passed to constructor to make NULL.
VarDictionary()
Constructs a new dictionary var.
void Delete(const Var &key)
bool Set(const Var &key, const Var &value)
Var Get(const Var &key) const
const PP_Var & pp_var() const
A generic type used for passing data types between the module and the page.
VarDictionary & operator=(const VarDictionary &other)
Assignment operator.