| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
ProtoNode::ChildIterator Class Reference

An iterator for traversing the child nodes of a ProtoNode. More...

`#include <proto_node.h>`

## Public Types
typedef struct _proto_node * | NodePtr
| Pointer type for the underlying proto_node structure.

## Public Member Functions
| ChildIterator (NodePtr n=Q_NULLPTR)
| Constructs a new ChildIterator.
bool | hasNext ()
| Checks if there is a subsequent child node.
ChildIterator | next ()
| Advances the iterator to the next child node.
ProtoNode | element ()
| Retrieves the ProtoNode element at the current iterator position.

## Protected Attributes
NodePtr | node

## Detailed Description

An iterator for traversing the child nodes of a ProtoNode.

## Constructor & Destructor Documentation

## ◆ ChildIterator()

ProtoNode::ChildIterator::ChildIterator | ( | NodePtr | n = Q_NULLPTR | ) |

Constructs a new ChildIterator.

Parameters

  n | The starting node for the iterator, defaults to Q_NULLPTR.

## Member Function Documentation

## ◆ element()

ProtoNode ProtoNode::ChildIterator::element | ( |  | ) |

Retrieves the ProtoNode element at the current iterator position.

Returns
  The current ProtoNode.

## ◆ hasNext()

bool ProtoNode::ChildIterator::hasNext | ( |  | ) |

Checks if there is a subsequent child node.

Returns
  True if another child exists, false otherwise.

## ◆ next()

ProtoNode::ChildIterator ProtoNode::ChildIterator::next | ( |  | ) |

Advances the iterator to the next child node.

Returns
  A ChildIterator pointing to the next node.

## Member Data Documentation

## ◆ node

NodePtr ProtoNode::ChildIterator::node
| protected

Pointer to the current underlying protocol tree node.

The documentation for this class was generated from the following files:

- /builds/wireshark/wireshark/ui/qt/utils/proto_node.h
- /builds/wireshark/wireshark/ui/qt/utils/proto_node.cpp