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

Method Get

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:549–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547 }
548
549 static void Get(uint32_t index,
550 const Nan::PropertyCallbackInfo<v8::Value>& info) {
551 HandleScope scope;
552 if (!NodeRT::Utils::IsWinRtWrapperOf<
553 ::Windows::Foundation::Collections::IVectorView<T> ^>(
554 info.This())) {
555 return;
556 }
557
558 VectorViewWrapper<T>* wrapper =
559 VectorViewWrapper<T>::Unwrap<VectorViewWrapper<T>>(info.This());
560
561 if (wrapper->_instance->Size <= index) {
562 return;
563 }
564
565 if (wrapper->_getterFunc == nullptr) {
566 info.GetReturnValue().Set(
567 CreateOpaqueWrapper(wrapper->_instance->GetAt(index)));
568 } else {
569 info.GetReturnValue().Set(
570 wrapper->_getterFunc(wrapper->_instance->GetAt(index)));
571 }
572 }
573
574 static void GetAt(Nan::NAN_METHOD_ARGS_TYPE info) {
575 HandleScope scope;

Callers

nothing calls this directly

Calls 2

SetMethod · 0.45
GetAtMethod · 0.45

Tested by

no test coverage detected