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

Function StringHistoToBuffers

Filters/ParallelStatistics/vtkPOrderStatistics.cxx:76–91  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

74
75//------------------------------------------------------------------------------
76static void StringHistoToBuffers(
77 const std::map<vtkStdString, vtkIdType>& histo, std::string& buffer, vtkIdTypeArray* card)
78{
79 buffer.clear();
80
81 card->SetNumberOfTuples(static_cast<vtkIdType>(histo.size()));
82
83 vtkIdType r = 0;
84 for (std::map<vtkStdString, vtkIdType>::const_iterator it = histo.begin(); it != histo.end();
85 ++it, ++r)
86 {
87 buffer.append(it->first);
88 card->SetValue(r, it->second);
89 buffer.push_back(0);
90 }
91}
92
93//------------------------------------------------------------------------------
94static void StringBufferToStringVector(const std::string& buffer, std::vector<std::string>& strings)

Callers 1

BroadcastMethod · 0.85

Calls 8

clearMethod · 0.45
SetNumberOfTuplesMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
appendMethod · 0.45
SetValueMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected