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

Function StatAttributeExists

OsiInterface/Functions/StatFunctions.cpp:22–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20 }
21
22 bool StatAttributeExists(OsiArgumentDesc & args)
23 {
24 auto statName = args[0].String;
25 auto attributeName = args[1].String;
26
27 auto stats = gOsirisProxy->GetLibraryManager().GetStats();
28 if (stats == nullptr) {
29 return false;
30 }
31
32 auto object = stats->objects.Find(statName);
33 if (object == nullptr) {
34 return false;
35 }
36
37 int attributeIndex;
38 auto attrInfo = stats->GetAttributeInfo(object, attributeName, attributeIndex);
39 return attrInfo != nullptr;
40 }
41
42 bool StatGetAttributeInt(OsiArgumentDesc & args)
43 {

Callers

nothing calls this directly

Calls 3

GetStatsMethod · 0.80
GetAttributeInfoMethod · 0.80
FindMethod · 0.45

Tested by

no test coverage detected