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

Method StartElement

IO/Chemistry/vtkCMLMoleculeReader.cxx:137–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137void vtkCMLParser::StartElement(const char* name, const char** attr)
138{
139 if (strcmp(name, "atom") == 0)
140 {
141 this->NewAtom(attr);
142 }
143 else if (strcmp(name, "bond") == 0)
144 {
145 this->NewBond(attr);
146 }
147 else if (strcmp(name, "molecule") == 0)
148 {
149 this->NewMolecule(attr);
150 }
151 else if (this->GetDebug())
152 {
153 std::string desc;
154 desc += "Unhandled CML Element. Name: ";
155 desc += name;
156 desc += "\n\tAttributes:";
157 int attrIndex = 0;
158 while (const char* cur = attr[attrIndex])
159 {
160 if (attrIndex > 0)
161 {
162 desc.push_back(' ');
163 }
164 desc += cur;
165 ++attrIndex;
166 }
167 vtkDebugMacro(<< desc);
168 }
169}
170
171void vtkCMLParser::EndElement(const char*) {}
172

Callers

nothing calls this directly

Calls 5

NewAtomMethod · 0.95
NewBondMethod · 0.95
NewMoleculeMethod · 0.95
GetDebugMethod · 0.80
push_backMethod · 0.45

Tested by

no test coverage detected