| 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() |
nothing calls this directly
no test coverage detected