MCPcopy Create free account
hub / github.com/FlightGear/flightgear / elementFor

Method elementFor

3rdparty/cppunit/src/cppunit/XmlElement.cpp:116–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115
116XmlElement *
117XmlElement::elementFor( const std::string &name ) const
118{
119 Elements::const_iterator itElement = m_elements.begin();
120 for ( ; itElement != m_elements.end(); ++itElement )
121 {
122 if ( (*itElement)->name() == name )
123 return *itElement;
124 }
125
126 throw std::invalid_argument( "XmlElement::elementFor(), not matching child element found" );
127 return NULL; // make some compilers happy.
128}
129
130
131std::string

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected