summaryrefslogtreecommitdiffstats
path: root/src/xml/node-fns.h
blob: 54366e61fd918e0437b78d6db0859183fb597d37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef SEEN_REPR_GET_CHILDREN_H
#define SEEN_REPR_GET_CHILDREN_H

#include "xml/node.h"

namespace Inkscape {
namespace XML {

class Node;

bool id_permitted(Node const *node);

inline Node *next_node(Node *node) {
    return ( node ? node->next() : NULL );
}
inline Node const *next_node(Node const *node) {
    return ( node ? node->next() : NULL );
}
Node *previous_node(Node *node);
inline Node const *previous_node(Node const *node) {
    return previous_node(const_cast<Node *>(node));
}
inline Node *parent_node(Node *node) {
    return ( node ? node->parent() : NULL );
}
inline Node const *parent_node(Node const *node) {
    return ( node ? node->parent() : NULL );
}

}
}

#endif /* !SEEN_REPR_GET_CHILDREN_H */

/*
  Local Variables:
  mode:c++
  c-file-style:"stroustrup"
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
  indent-tabs-mode:nil
  fill-column:99
  End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :