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

Method AddArray

Common/DataModel/vtkArrayData.cxx:65–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void vtkArrayData::AddArray(vtkArray* array)
66{
67 if (!array)
68 {
69 vtkErrorMacro(<< "Cannot add nullptr array.");
70 return;
71 }
72
73 // See http://developers.sun.com/solaris/articles/cmp_stlport_libCstd.html
74 // Language Feature: Partial Specializations
75 // Workaround
76
77 int n = 0;
78#ifdef _RWSTD_NO_CLASS_PARTIAL_SPEC
79 std::count(this->Implementation->Arrays.begin(), this->Implementation->Arrays.end(), array, n);
80#else
81 n = std::count(this->Implementation->Arrays.begin(), this->Implementation->Arrays.end(), array);
82#endif
83
84 if (n != 0)
85 {
86 vtkErrorMacro(<< "Cannot add array twice.");
87 return;
88 }
89
90 this->Implementation->Arrays.push_back(array);
91 array->Register(nullptr);
92
93 this->Modified();
94}
95
96void vtkArrayData::ClearArrays()
97{

Callers 15

TestHistogram2DComponentFunction · 0.45
TestHistogram2DMagnitudeFunction · 0.45
TestQtTreeModelAdapterFunction · 0.45
SetOrientationMethod · 0.45
RequestDataMethod · 0.45
SetTreeMethod · 0.45
SetOrientationMethod · 0.45
RequestDataMethod · 0.45
SetTableMethod · 0.45
TestColumnTreeFunction · 0.45
TestQtLabelStrategyFunction · 0.45
TestDendrogramItemFunction · 0.45

Calls 6

countFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
push_backMethod · 0.45
RegisterMethod · 0.45
ModifiedMethod · 0.45

Tested by 15

TestHistogram2DComponentFunction · 0.36
TestHistogram2DMagnitudeFunction · 0.36
TestQtTreeModelAdapterFunction · 0.36
TestColumnTreeFunction · 0.36
TestQtLabelStrategyFunction · 0.36
TestDendrogramItemFunction · 0.36
TestTanglegramItemFunction · 0.36
TestGraphLayoutViewFunction · 0.36
TestTreeHeatmapItemFunction · 0.36
TestConeLayoutStrategyFunction · 0.36