MCPcopy Create free account
hub / github.com/Kitware/VTK / GetUIntArray

Function GetUIntArray

IO/OMF/core/OMFHelpers.cxx:128–150  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

126
127//------------------------------------------------------------------------------
128bool GetUIntArray(const Json::Value& root, std::vector<unsigned int>& value)
129{
130 if (root.empty() || !root.isArray())
131 {
132 return false;
133 }
134 value.reserve(root.size());
135 for (const auto& uIntValue : root)
136 {
137 if (uIntValue.empty() && !uIntValue.isUInt())
138 {
139 value.clear();
140 return false;
141 }
142 value.push_back(uIntValue.asUInt());
143 }
144 if (value.empty())
145 {
146 value.clear();
147 return false;
148 }
149 return true;
150}
151
152//------------------------------------------------------------------------------
153bool GetFloatArray(const Json::Value& root, std::vector<float>& value)

Callers

nothing calls this directly

Calls 8

isArrayMethod · 0.80
isUIntMethod · 0.80
asUIntMethod · 0.80
emptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected