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

Function JsObjectToWinrtMap

src/NodeRTLib/ProjectFiles/CollectionsConverter.h:83–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81 // In this case we expect a non-array JS object.
82 template <class V>
83 static ::Platform::Collections::Map<Platform::String ^, V> ^
84 JsObjectToWinrtMap(
85 v8::Local<v8::Object> obj,
86 const std::function<bool(v8::Local<v8::Value>)>& checkValueTypeFunc,
87 const std::function<V(v8::Local<v8::Value>)>& convertToValueTypeFunc) {
88 std::map<::Platform::String ^, V> stdMap;
89
90 if (!FillMapFromJsObject(
91 obj, checkStringFunc, NodeRT::Utils::V8StringToPlatformString,
92 checkValueTypeFunc, convertToValueTypeFunc, stdMap)) {
93 return nullptr;
94 }
95
96 return ref new ::Platform::Collections::Map<::Platform::String ^, V>(
97 stdMap);
98 }
99
100 template <class V>
101 static ::Platform::Collections::MapView<Platform::String ^, V> ^

Callers

nothing calls this directly

Calls 1

FillMapFromJsObjectFunction · 0.85

Tested by

no test coverage detected