[SOLVED] 程序代写代做代考 ## Nan::Callback

30 $

File Name: 程序代写代做代考_##_Nan::Callback.zip
File Size: 386.22 KB

SKU: 1417687753 Category: Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Or Upload Your Assignment Here:


## Nan::Callback

`Nan::Callback` makes it easier to use `v8::Function` handles as callbacks. A class that wraps a `v8::Function` handle, protecting it from garbage collection and making it particularly useful for storage and use across asynchronous execution.

Nan::Callback


### Nan::Callback

“`c++
class Callback {
public:
Callback();

explicit Callback(const v8::Local &fn);

~Callback();

bool operator==(const Callback &other) const;

bool operator!=(const Callback &other) const;

v8::Local operator*() const;

v8::Local operator()(v8::Local target,
int argc = 0,
v8::Local argv[] = 0) const;

v8::Local operator()(int argc = 0,
v8::Local argv[] = 0) const;

void SetFunction(const v8::Local &fn);

v8::Local GetFunction() const;

bool IsEmpty() const;

void Reset(const v8::Local &fn);

void Reset();

v8::Local Call(v8::Local target,
int argc,
v8::Local argv[]) const;

v8::Local Call(int argc, v8::Local argv[]) const;
};
“`

Example usage:

“`c++
v8::Local function;
Nan::Callback callback(function);
callback.Call(0, 0);
“`

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] 程序代写代做代考 ## Nan::Callback
30 $