| 66 | } |
| 67 | |
| 68 | bool StatGetAttributeString(OsiArgumentDesc & args) |
| 69 | { |
| 70 | auto statName = args[0].String; |
| 71 | auto attributeName = args[1].String; |
| 72 | |
| 73 | auto stats = gOsirisProxy->GetLibraryManager().GetStats(); |
| 74 | if (stats == nullptr) { |
| 75 | return false; |
| 76 | } |
| 77 | |
| 78 | auto object = stats->objects.Find(statName); |
| 79 | if (object == nullptr) { |
| 80 | OsiError("Stat object '" << statName << "' does not exist"); |
| 81 | return false; |
| 82 | } |
| 83 | |
| 84 | auto value = stats->GetAttributeFixedString(object, attributeName); |
| 85 | if (!value) { |
| 86 | OsiError("Attribute '" << attributeName << "' not found on object '" << statName << "'"); |
| 87 | return false; |
| 88 | } |
| 89 | |
| 90 | args[2].String = value->Str; |
| 91 | return true; |
| 92 | } |
| 93 | |
| 94 | bool StatGetType(OsiArgumentDesc & args) |
| 95 | { |
nothing calls this directly
no test coverage detected