Code

54366e61fd918e0437b78d6db0859183fb597d37
[inkscape.git] / src / xml / node-fns.h
1 #ifndef SEEN_REPR_GET_CHILDREN_H
2 #define SEEN_REPR_GET_CHILDREN_H
4 #include "xml/node.h"
6 namespace Inkscape {
7 namespace XML {
9 class Node;
11 bool id_permitted(Node const *node);
13 inline Node *next_node(Node *node) {
14     return ( node ? node->next() : NULL );
15 }
16 inline Node const *next_node(Node const *node) {
17     return ( node ? node->next() : NULL );
18 }
19 Node *previous_node(Node *node);
20 inline Node const *previous_node(Node const *node) {
21     return previous_node(const_cast<Node *>(node));
22 }
23 inline Node *parent_node(Node *node) {
24     return ( node ? node->parent() : NULL );
25 }
26 inline Node const *parent_node(Node const *node) {
27     return ( node ? node->parent() : NULL );
28 }
30 }
31 }
33 #endif /* !SEEN_REPR_GET_CHILDREN_H */
35 /*
36   Local Variables:
37   mode:c++
38   c-file-style:"stroustrup"
39   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
40   indent-tabs-mode:nil
41   fill-column:99
42   End:
43 */
44 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :