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

Method SeekInlineDataPosition

IO/XMLParser/vtkXMLDataParser.cxx:173–195  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

171
172//------------------------------------------------------------------------------
173void vtkXMLDataParser::SeekInlineDataPosition(vtkXMLDataElement* element)
174{
175 istream* stream = this->GetStream();
176 if (!element->GetInlineDataPosition())
177 {
178 // Scan for the start of the actual inline data.
179 char c = 0;
180 stream->clear(stream->rdstate() & ~ios::eofbit);
181 stream->clear(stream->rdstate() & ~ios::failbit);
182 this->SeekG(element->GetXMLByteIndex());
183 while (stream->get(c) && (c != '>'))
184 {
185 }
186 while (stream->get(c) && vtkXMLDataElement::IsSpace(c))
187 {
188 }
189 vtkTypeInt64 pos = this->TellG();
190 element->SetInlineDataPosition(pos - 1);
191 }
192
193 // Seek to the data position.
194 this->SeekG(element->GetInlineDataPosition());
195}
196
197//------------------------------------------------------------------------------
198void vtkXMLDataParser::EndElement(const char*)

Callers 1

ReadInlineDataMethod · 0.95

Calls 6

SeekGMethod · 0.80
GetXMLByteIndexMethod · 0.80
TellGMethod · 0.80
GetStreamMethod · 0.45
clearMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected