Messagelib

messagecore/src/helpers/nodehelper.h
1 /*
2  SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, [email protected]
3  SPDX-FileCopyrightText: 2009 Andras Mantia <[email protected]>
4  SPDX-FileCopyrightText: 2010 Leo Franchi <[email protected]>
5 
6  SPDX-License-Identifier: GPL-2.0-or-later
7 */
8 
9 #pragma once
10 
11 #include "messagecore_export.h"
12 
13 namespace KMime
14 {
15 class Content;
16 class Message;
17 }
18 
19 namespace MessageCore
20 {
21 /**
22  * @short Contains some static functions for navigating in KMime::Node trees.
23  */
24 namespace NodeHelper
25 {
26 /**
27  * Returns the next sibling node of the given @p node.
28  * If there is no sibling node @c 0 is returned.
29  */
30 MESSAGECORE_EXPORT KMime::Content *nextSibling(const KMime::Content *node);
31 
32 /**
33  * Returns the next node (child, sibling or parent) of the given @p node.
34  *
35  * @param node The start node for iteration.
36  * @param allowChildren If @c true child nodes will be returned, otherwise only sibling or parent nodes.
37  */
38 MESSAGECORE_EXPORT KMime::Content *next(KMime::Content *node, bool allowChildren = true);
39 
40 /**
41  * Returns the first child node of the given @p node.
42  * If there is no child node @c 0 is returned.
43  */
44 MESSAGECORE_EXPORT KMime::Content *firstChild(const KMime::Content *node);
45 }
46 }
47 
MESSAGECORE_EXPORT KMime::Content * firstChild(const KMime::Content *node)
Returns the first child node of the given node.
MESSAGECORE_EXPORT KMime::Content * nextSibling(const KMime::Content *node)
Returns the next sibling node of the given node.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:04:54 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.