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

Function vtkXMLDataElementVectorAttributeSet

Common/DataModel/vtkXMLDataElement.cxx:960–976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

958//------------------------------------------------------------------------------
959template <class T>
960void vtkXMLDataElementVectorAttributeSet(
961 vtkXMLDataElement* elem, const char* name, int length, const T* data)
962{
963 if (!elem || !name || !length)
964 {
965 return;
966 }
967 std::stringstream vstr;
968 vstr.imbue(std::locale::classic());
969 vstr << data[0];
970 for (int i = 1; i < length; ++i)
971 {
972 vstr << ' ' << data[i];
973 }
974
975 elem->SetAttribute(name, vstr.str().c_str());
976}
977
978//------------------------------------------------------------------------------
979void vtkXMLDataElement::SetVectorAttribute(const char* name, int length, const int* data)

Callers 1

SetVectorAttributeMethod · 0.85

Calls 3

SetAttributeMethod · 0.45
c_strMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected