Changeset 15:4a4ecf74137e in rrlib_xml


Ignore:
Timestamp:
23.12.2010 03:46:05 (9 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Convert:
svn:3219ad6e-c0b7-4ac2-9554-e22e195eef7a/trunk@16
Message:

Re-added expensive but corrected GetChildren method which is often used in finroc_core.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tXMLNode.h

    r14 r15  
    187187  } 
    188188 
     189  inline std::vector<tXMLNode> GetChildren() const 
     190  { 
     191    std::vector<tXMLNode> children; 
     192    if (this->HasChildren()) 
     193    { 
     194      tXMLNode child = this->GetFirstChild(); 
     195      do 
     196      { 
     197        children.push_back(child); 
     198        child = child.GetNextSibling(); 
     199      } 
     200      while (child.HasNextSibling()); 
     201    } 
     202    return children; 
     203  } 
     204 
    189205  inline tXMLNode GetFirstChild() 
    190206  { 
Note: See TracChangeset for help on using the changeset viewer.