VirtualBox

Changeset 79808 in vbox for trunk/include/iprt/cpp


Ignore:
Timestamp:
Jul 16, 2019 2:04:51 PM (5 years ago)
Author:
vboxsync
Message:

IPRT/xml.h: Added methods for simple attribute enumeration. bugref:9288

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/cpp/xml.h

    r79799 r79808  
    504504                                       ///< NULL if this is a content node
    505505
    506     /** Child list entry of this node. (List head m_pParent->m_children.) */
     506    /** Child list entry of this node. (List head m_pParent->m_children or
     507     *  m_pParent->m_attribute depending on the type.) */
    507508    RTLISTNODE      m_listEntry;
    508509    /** Pointer to the parent list anchor.
     
    775776    /** @} */
    776777
     778    /** @name Attribute enumeration
     779     * @{ */
     780
     781    /** Get the first attribute node.
     782     * @returns Pointer to the first child node, NULL if no attributes. */
     783    const AttributeNode *getFirstAttribute() const
     784    {
     785        return RTListGetFirstCpp(&m_attributes, const AttributeNode, m_listEntry);
     786    }
     787
     788    /** Get the last attribute node.
     789     * @returns Pointer to the last child node, NULL if no attributes. */
     790    const AttributeNode *getLastAttribute() const
     791    {
     792        return RTListGetLastCpp(&m_attributes, const AttributeNode, m_listEntry);
     793    }
     794
     795    /** @} */
    777796
    778797    const AttributeNode *findAttribute(const char *pcszMatch, const char *pcszNamespace = NULL) const;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette