Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
 All Classes Namespaces Files Functions Typedefs Enumerations Macros Groups
var_dictionary.h
Go to the documentation of this file.
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef PPAPI_CPP_VAR_DICTIONARY_H_
6 #define PPAPI_CPP_VAR_DICTIONARY_H_
7 
8 #include "ppapi/c/pp_bool.h"
9 #include "ppapi/cpp/var.h"
10 #include "ppapi/cpp/var_array.h"
11 
14 
15 namespace pp {
16 
17 class VarDictionary : public Var {
18  public:
20  VarDictionary();
21 
27  explicit VarDictionary(const Var& var);
28 
33  explicit VarDictionary(const PP_Var& var);
34 
36  VarDictionary(const VarDictionary& other);
37 
38  virtual ~VarDictionary();
39 
41  VarDictionary& operator=(const VarDictionary& other);
42 
51  virtual Var& operator=(const Var& other);
52 
60  Var Get(const Var& key) const;
61 
70  bool Set(const Var& key, const Var& value);
71 
75  void Delete(const Var& key);
76 
82  bool HasKey(const Var& key) const;
83 
88  VarArray GetKeys() const;
89 };
90 
91 } // namespace pp
92 
93 #endif // PPAPI_CPP_VAR_DICTIONARY_H_
bool HasKey(const Var &key) const
Definition: var_dictionary.h:17
VarDictionary()
Constructs a new dictionary var.
void Delete(const Var &key)
VarDictionary & operator=(const VarDictionary &other)
Assignment operator.
bool Set(const Var &key, const Var &value)
Var Get(const Var &key) const
A generic type used for passing data types between the module and the page.
Definition: var.h:23
VarArray GetKeys() const
Definition: var_array.h:17