MCPcopy Create free account
hub / github.com/NodeRT/NodeRT / Init

Method Init

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:46–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44class ArrayWrapper : NodeRT::WrapperBase {
45 public:
46 static void Init() {
47 EscapableHandleScope scope;
48
49 Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
50 s_constructorTemplate.Reset(localRef);
51
52 localRef->SetClassName(
53 Nan::New<String>("Windows::Foundation::Array").ToLocalChecked());
54 localRef->InstanceTemplate()->SetInternalFieldCount(1);
55 Nan::SetIndexedPropertyHandler(localRef->InstanceTemplate(), Get, Set);
56
57 Nan::SetAccessor(localRef->PrototypeTemplate(),
58 Nan::New<String>("length").ToLocalChecked(), LengthGetter);
59
60 return;
61 }
62
63 static Local<Value> CreateArrayWrapper(
64 ::Platform::Array<T> ^ winRtInstance,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected