MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / writeElement

Method writeElement

Engine/lib/collada/src/dae/daeTinyXMLPlugin.cpp:154–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154void daeTinyXMLPlugin::writeElement( daeElement* element )
155{
156 daeMetaElement* _meta = element->getMeta();
157 if (!_meta->getIsTransparent() )
158 {
159 tinyxml2::XMLElement* tiElm = m_doc->NewElement( element->getElementName() );
160
161 if (m_elements.empty() == true) {
162 m_doc->LinkEndChild(tiElm);
163 } else {
164 tinyxml2::XMLElement* first = m_elements.front();
165 first->LinkEndChild(tiElm);
166 }
167 m_elements.push_front(tiElm);
168
169 daeMetaAttributeRefArray& attrs = _meta->getMetaAttributes();
170
171 int acnt = (int)attrs.getCount();
172
173 for(int i=0;i<acnt;i++)
174 {
175 writeAttribute( attrs[i], element );
176 }
177 }
178 writeValue(element);
179
180 daeElementRefArray children;
181 element->getChildren( children );
182 for ( size_t x = 0; x < children.getCount(); x++ )
183 {
184 writeElement( children.get(x) );
185 }
186
187 if (!_meta->getIsTransparent() )
188 {
189 m_elements.pop_front();
190 }
191}
192
193
194void daeTinyXMLPlugin::writeValue( daeElement* element )

Callers

nothing calls this directly

Calls 11

getMetaMethod · 0.80
getIsTransparentMethod · 0.80
NewElementMethod · 0.80
getElementNameMethod · 0.45
emptyMethod · 0.45
frontMethod · 0.45
push_frontMethod · 0.45
getCountMethod · 0.45
getChildrenMethod · 0.45
getMethod · 0.45
pop_frontMethod · 0.45

Tested by

no test coverage detected