Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

proto_node.h
1 /* proto_node.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9
10 #ifndef PROTO_NODE_H_
11 #define PROTO_NODE_H_
12
13 #include <config.h>
14
15 #include <ui/qt/utils/field_information.h>
16
17 class ProtoNode
18 {
19 public:
20
21 class ChildIterator {
22 public:
23 typedef struct _proto_node * NodePtr;
24
25 ChildIterator(NodePtr n = Q_NULLPTR);
26
27 bool hasNext();
28 ChildIterator next();
29 ProtoNode element();
30
31 protected:
32 NodePtr node;
33 };
34
35 explicit ProtoNode(proto_node * node = NULL);
36
37 bool isValid() const;
38 bool isChild() const;
39 bool isExpanded() const;
40
41 proto_node *protoNode() const;
42 int childrenCount() const;
43 int row();
44 ProtoNode parentNode();
45
46 QString labelText() const;
47
48 ChildIterator children() const;
49
50 private:
51 proto_node * node_;
52 static bool isHidden(proto_node * node);
53 };
54
55
56 #endif // PROTO_NODE_H_
57
58 /*
59 * Editor modelines
60 *
61 * Local Variables:
62 * c-basic-offset: 4
63 * tab-width: 8
64 * indent-tabs-mode: nil
65 * End:
66 *
67 * ex: set shiftwidth=4 tabstop=8 expandtab:
68 * :indentSize=4:tabSize=8:noTabs=true:
69 */
ProtoNode
Definition: proto_node.h:17
ProtoNode::ChildIterator
Definition: proto_node.h:21
_proto_node
Definition: proto.h:759