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

Method Init

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:1376–1397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1374class MapViewWrapper : NodeRT::WrapperBase {
1375 public:
1376 static void Init() {
1377 HandleScope scope;
1378
1379 Local<FunctionTemplate> localRef = Nan::New<FunctionTemplate>(New);
1380 s_constructorTemplate.Reset(localRef);
1381 localRef->SetClassName(
1382 Nan::New<String>("Windows::Foundation::Collections:IMapView")
1383 .ToLocalChecked());
1384 localRef->InstanceTemplate()->SetInternalFieldCount(1);
1385
1386 Nan::SetPrototypeMethod(localRef, "hasKey", HasKey);
1387 Nan::SetPrototypeMethod(localRef, "lookup", Lookup);
1388 Nan::SetPrototypeMethod(localRef, "split", Split);
1389 Nan::SetPrototypeMethod(localRef, "first", First);
1390
1391 Nan::SetAccessor(localRef->PrototypeTemplate(),
1392 Nan::New<String>("size").ToLocalChecked(), SizeGetter);
1393 Nan::SetAccessor(localRef->PrototypeTemplate(),
1394 Nan::New<String>("length").ToLocalChecked(), SizeGetter);
1395
1396 return;
1397 }
1398
1399 static Local<Value> CreateMapViewWrapper(
1400 ::Windows::Foundation::Collections::IMapView<K, V> ^ winRtInstance,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected