MCPcopy Create free account
hub / github.com/Norbyte/ositools / StatGetType

Function StatGetType

OsiInterface/Functions/StatFunctions.cpp:94–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 bool StatGetType(OsiArgumentDesc & args)
95 {
96 auto statsId = args[0].String;
97
98 auto stats = gOsirisProxy->GetLibraryManager().GetStats();
99 if (stats == nullptr) {
100 return false;
101 }
102
103 auto object = stats->objects.Find(statsId);
104 if (object == nullptr) {
105 OsiError("Stat object '" << statsId << "' does not exist");
106 return false;
107 }
108
109 auto typeInfo = stats->GetTypeInfo(object);
110 if (typeInfo == nullptr) {
111 return false;
112 }
113
114 args[1].String = typeInfo->Name.Str;
115 return true;
116 }
117 }
118
119 void CustomFunctionLibrary::RegisterStatFunctions()

Callers

nothing calls this directly

Calls 3

GetStatsMethod · 0.80
GetTypeInfoMethod · 0.80
FindMethod · 0.45

Tested by

no test coverage detected