5
* MenTaLguY <mental@rydia.net>
7
* Copyright (C) 2004 MenTaLguY
9
* Released under GNU GPL, read the file 'COPYING' for more information
12
#ifndef SEEN_INKSCAPE_XML_SP_REPR_ITERATORS_H
13
#define SEEN_INKSCAPE_XML_SP_REPR_ITERATORS_H
15
#include "util/forward-pointer-iterator.h"
21
struct NodeSiblingIteratorStrategy {
22
static Node const *next(Node const *node) {
23
return ( node ? node->next() : NULL );
26
struct NodeParentIteratorStrategy {
27
static Node const *next(Node const *node) {
28
return ( node ? node->parent() : NULL );
32
typedef Inkscape::Util::ForwardPointerIterator<Node,
33
NodeSiblingIteratorStrategy>
36
typedef Inkscape::Util::ForwardPointerIterator<Node const,
37
NodeSiblingIteratorStrategy>
38
NodeConstSiblingIterator;
40
typedef Inkscape::Util::ForwardPointerIterator<Node,
41
NodeParentIteratorStrategy>
44
typedef Inkscape::Util::ForwardPointerIterator<Node const,
45
NodeParentIteratorStrategy>
46
NodeConstParentIterator;
55
c-file-style:"stroustrup"
56
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
61
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :