Changeset 21:4d7521838475 in rrlib_xml


Ignore:
Timestamp:
31.12.2010 06:02:35 (9 years ago)
Author:
Tobias Föhst <foehst@…>
Branch:
default
Phase:
public
Convert:
svn:3219ad6e-c0b7-4ac2-9554-e22e195eef7a/trunk@22
Message:

Renamed method due to the policy to avoid unneeded abbreviations

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tXMLNode.h

    r20 r21  
    356356  } 
    357357 
     358  /*! Get the number of children of this XML node. 
     359   * 
     360   *  Counts children. 
     361   * 
     362   *  \returns The number of XML nodes reachable as children of this node 
     363   */ 
     364  inline const size_t GetNumberOfChildren() const 
     365  { 
     366    return std::distance(this->GetChildrenBegin(), this->GetChildrenEnd()); 
     367  } 
     368 
     369  inline const size_t GetNumChildren() const __attribute__((deprecated)) 
     370  { 
     371    return this->GetNumberOfChildren(); 
     372  } 
     373 
    358374  /*! Get access to first child of this node 
    359375   * 
     
    732748  /*! Get list of XML attributes of this node 
    733749   * 
    734    * \returns the XML attribute list 
    735    */ 
    736   xmlAttrPtr GetAttributeList() const 
     750   * \returns The XML attribute list 
     751   */ 
     752  inline xmlAttrPtr GetAttributeList() const 
    737753  { 
    738754    return this->properties; 
     
    822838  const std::string GetXMLDump(bool format = false) const; 
    823839 
    824  
    825   /*! Get number of children of this XML node. 
    826    * 
    827    *  Counts children. 
    828    * 
    829    *  \returns number of children. 
    830    */ 
    831   size_t GetNumChildren() const 
    832   { 
    833     return std::distance(this->GetChildrenBegin(), this->GetChildrenEnd()); 
    834   } 
    835  
    836840}; 
    837841 
  • test/test_xml2_wrapper.cpp

    r20 r21  
    122122 
    123123  std::cout << "Accessing node with content: " << document2.GetRootNode().GetXMLDump() 
    124             << " and " << document2.GetRootNode().GetNumChildren() << " children." << std::endl; 
     124            << " and " << document2.GetRootNode().GetNumberOfChildren() << " children." << std::endl; 
    125125 
    126126  std::cout << document2.GetRootNode().GetName() << std::endl; 
     
    179179 
    180180  std::cout << "doc 1: " << document1.GetRootNode().GetXMLDump() << std::endl 
    181             << " has " << document1.GetRootNode().GetNumChildren() << " children." << std::endl; 
     181            << " has " << document1.GetRootNode().GetNumberOfChildren() << " children." << std::endl; 
    182182 
    183183  return EXIT_SUCCESS; 
Note: See TracChangeset for help on using the changeset viewer.