5 #ifndef PPAPI_CPP_VAR_H_
6 #define PPAPI_CPP_VAR_H_
11 #include "ppapi/c/pp_var.h"
12 #include "ppapi/cpp/pass_ref.h"
13 #include "ppapi/cpp/resource.h"
49 Var(
const char* utf8_str);
52 Var(
const std::string& utf8_str);
153 bool is_int()
const {
return var_.type == PP_VARTYPE_INT32; }
170 return var_.type == PP_VARTYPE_INT32 ||
171 var_.type == PP_VARTYPE_DOUBLE;
195 int32_t
AsInt()
const;
239 var_ = PP_MakeUndefined();
282 temp_ = output_->
var_;
285 temp_.type = PP_VARTYPE_UNDEFINED;
291 if (output_ && !originally_had_exception_)
303 bool originally_had_exception_;
318 Var(
void* non_scriptable_object_pointer);
323 #endif // PPAPI_CPP_VAR_H_
bool is_array_buffer() const
This function determines if this Var is an ArrayBuffer.
std::string DebugString() const
bool is_dictionary() const
std::string AsString() const
Special value passed to constructor to make NULL.
OutException(Var *v)
A constructor.
~OutException()
Destructor.
bool is_undefined() const
virtual ~Var()
Destructor.
Var(PassRef, const PP_Var &var)
const PP_Var & pp_var() const
bool operator==(const Var &other) const
Var(DontManage, const PP_Var &var)
virtual Var & operator=(const Var &other)
A generic type used for passing data types between the module and the page.
pp::Resource AsResource() const
A reference counted module resource.