{{+bindTo:partials.standard_nacl_article}}

pp::Var::OutException Class Reference

{{- dummy div to appease doxygen -}}

List of all members.

Public Member Functions

 OutException (Var *v)
 ~OutException ()
PP_Var * get ()

Detailed Description

This class is used when calling the raw C PPAPI when using the C++ Var as a possible NULL exception.

This class will handle getting the address of the internal value out if it's non-NULL and fixing up the reference count.

Warning: this will only work for things with exception semantics, i.e. that the value will not be changed if it's a non-undefined exception. Otherwise, this class will mess up the refcounting.

This is a bit subtle:

  • If NULL is passed, we return NULL from get() and do nothing.
  • If a undefined value is passed, we return the address of a undefined var from get and have the output value take ownership of that var.
  • If a non-undefined value is passed, we return the address of that var from get, and nothing else should change.

Example: void FooBar(a, b, Var* exception = NULL) { foo_interface->Bar(a, b, Var::OutException(exception).get()); }


Constructor & Destructor Documentation

A constructor.

Destructor.


Member Function Documentation

PP_Var* pp::Var::OutException::get ( ) [inline]

The documentation for this class was generated from the following file:
{{/partials.standard_nacl_article}}