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

Method Get

src/NodeRTLib/ProjectFiles/CollectionsWrap.h:811–833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

809 }
810
811 static void Get(uint32_t index,
812 const Nan::PropertyCallbackInfo<v8::Value>& info) {
813 HandleScope scope;
814 if (!NodeRT::Utils::IsWinRtWrapperOf<
815 ::Windows::Foundation::Collections::IVector<T> ^>(info.This())) {
816 return;
817 }
818
819 VectorWrapper<T>* wrapper =
820 VectorWrapper<T>::Unwrap<VectorWrapper<T>>(info.This());
821
822 if (wrapper->_instance->Size <= index) {
823 return;
824 }
825
826 if (wrapper->_getterFunc == nullptr) {
827 info.GetReturnValue().Set(
828 CreateOpaqueWrapper(wrapper->_instance->GetAt(index)));
829 } else {
830 info.GetReturnValue().Set(
831 wrapper->_getterFunc(wrapper->_instance->GetAt(index)));
832 }
833 }
834
835 static void Set(uint32 index,
836 Local<Value> value,

Callers

nothing calls this directly

Calls 2

SetMethod · 0.45
GetAtMethod · 0.45

Tested by

no test coverage detected