Pepper_56_C++_interfaces
Pepper_56_C++_interfaces
 All Classes Namespaces Files Functions Typedefs Enumerations Macros Groups
var_array_buffer.h
Go to the documentation of this file.
1 // Copyright (c) 2012 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_ARRAY_BUFFER_H_
6 #define PPAPI_CPP_VAR_ARRAY_BUFFER_H_
7 
8 #include <stdint.h>
9 
10 #include "ppapi/cpp/var.h"
11 
14 
15 namespace pp {
16 
22 class VarArrayBuffer : public Var {
23  public:
27 
34  explicit VarArrayBuffer(const Var& var);
35 
41  explicit VarArrayBuffer(uint32_t size_in_bytes);
42 
44  VarArrayBuffer(const VarArrayBuffer& buffer) : Var(buffer) {}
45 
46  virtual ~VarArrayBuffer() {}
47 
55 
64  virtual Var& operator=(const Var& other);
65 
70  uint32_t ByteLength() const;
71 
93  void* Map();
94 
98  void Unmap();
99 
100  private:
101  void ConstructWithSize(uint32_t size_in_bytes);
102 };
103 
104 } // namespace pp
105 
106 #endif // PPAPI_CPP_VAR_ARRAY_BUFFER_H_
uint32_t ByteLength() const
Definition: var_array_buffer.h:22
VarArrayBuffer & operator=(const VarArrayBuffer &other)
A generic type used for passing data types between the module and the page.
Definition: var.h:23
VarArrayBuffer(const VarArrayBuffer &buffer)
Copy constructor.
Definition: var_array_buffer.h:44