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

Function Enum

src/NodeRTLib/CppTemplates/Enum.cpp:2–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1
2 static void Init@(Model.Name)Enum(const Local<Object> exports) {
3 HandleScope scope;
4
5 Local<Object> enumObject = Nan::New<Object>();
6
7 Nan::Set(exports, Nan::New<String>("@(Model.Name)").ToLocalChecked(), enumObject);
8 @foreach(var name in Enum.GetNames(Model)) {
9 @:Nan::Set(enumObject, Nan::New<String>("@(TX.Uncap(name))").ToLocalChecked(), Nan::New<Integer>(static_cast<int>(@TX.ToWinRT(Model)::@(name))));
10 }
11 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected