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

Function GetDoubleArray

IO/OMF/core/OMFHelpers.cxx:178–200  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

176
177//------------------------------------------------------------------------------
178bool GetDoubleArray(const Json::Value& root, std::vector<double>& value)
179{
180 if (root.empty() || !root.isArray())
181 {
182 return false;
183 }
184 value.reserve(root.size());
185 for (const auto& doubleValue : root)
186 {
187 if (doubleValue.empty() && !doubleValue.isDouble())
188 {
189 value.clear();
190 return false;
191 }
192 value.push_back(doubleValue.asDouble());
193 }
194 if (value.empty())
195 {
196 value.clear();
197 return false;
198 }
199 return true;
200}
201
202VTK_ABI_NAMESPACE_END
203} // end namespace helper

Callers 1

ProcessGeometryMethod · 0.70

Calls 8

isArrayMethod · 0.80
isDoubleMethod · 0.80
emptyMethod · 0.45
reserveMethod · 0.45
sizeMethod · 0.45
clearMethod · 0.45
push_backMethod · 0.45
asDoubleMethod · 0.45

Tested by

no test coverage detected