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

Function StringArrayToStringBuffer

Filters/ParallelStatistics/vtkPOrderStatistics.cxx:59–73  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

57
58//------------------------------------------------------------------------------
59static void StringArrayToStringBuffer(vtkStringArray* sVals, std::string& sPack)
60{
61 std::vector<std::string> sVect; // consecutive strings
62
63 vtkIdType nv = sVals->GetNumberOfValues();
64 sVect.reserve(nv); // reserve space for all strings
65 for (vtkIdType i = 0; i < nv; ++i)
66 {
67 // Push back current string value
68 sVect.push_back(sVals->GetValue(i));
69 }
70
71 // Concatenate vector of strings into single string
72 StringVectorToStringBuffer(sVect, sPack);
73}
74
75//------------------------------------------------------------------------------
76static void StringHistoToBuffers(

Callers 1

LearnMethod · 0.70

Calls 5

GetNumberOfValuesMethod · 0.45
reserveMethod · 0.45
push_backMethod · 0.45
GetValueMethod · 0.45

Tested by

no test coverage detected