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

Function JsArrayToWinrtVector

src/NodeRTLib/ProjectFiles/CollectionsConverter.h:118–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116
117 template <class V>
118 static ::Platform::Collections::Vector<V> ^
119 JsArrayToWinrtVector(
120 v8::Local<v8::Array> arr,
121 const std::function<bool(v8::Local<v8::Value>)>& checkValueTypeFunc,
122 const std::function<V(v8::Local<v8::Value>)>& convertToValueTypeFunc) {
123 std::vector<V> vec(arr->Length());
124 if (!FillVector<std::vector<V>&, V>(arr, checkValueTypeFunc,
125 convertToValueTypeFunc, vec)) {
126 return nullptr;
127 }
128
129 return ref new ::Platform::Collections::Vector<V>(vec);
130 }
131
132 template <class V>
133 static ::Platform::Collections::VectorView<V> ^

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected