~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/xml/node-iterators.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Node iterators
 
3
 *
 
4
 * Authors:
 
5
 *   MenTaLguY <mental@rydia.net>
 
6
 *
 
7
 * Copyright (C) 2004 MenTaLguY
 
8
 *
 
9
 * Released under GNU GPL, read the file 'COPYING' for more information
 
10
 */
 
11
 
 
12
#ifndef SEEN_INKSCAPE_XML_SP_REPR_ITERATORS_H
 
13
#define SEEN_INKSCAPE_XML_SP_REPR_ITERATORS_H
 
14
 
 
15
#include "util/forward-pointer-iterator.h"
 
16
#include "xml/node.h"
 
17
 
 
18
namespace Inkscape {
 
19
namespace XML {
 
20
 
 
21
struct NodeSiblingIteratorStrategy {
 
22
    static Node const *next(Node const *node) {
 
23
        return ( node ? node->next() : NULL );
 
24
    }
 
25
};
 
26
struct NodeParentIteratorStrategy {
 
27
    static Node const *next(Node const *node) {
 
28
        return ( node ? node->parent() : NULL );
 
29
    }
 
30
};
 
31
 
 
32
typedef Inkscape::Util::ForwardPointerIterator<Node,
 
33
                                               NodeSiblingIteratorStrategy>
 
34
        NodeSiblingIterator;
 
35
 
 
36
typedef Inkscape::Util::ForwardPointerIterator<Node const,
 
37
                                               NodeSiblingIteratorStrategy>
 
38
        NodeConstSiblingIterator;
 
39
 
 
40
typedef Inkscape::Util::ForwardPointerIterator<Node,
 
41
                                               NodeParentIteratorStrategy>
 
42
        NodeParentIterator;
 
43
 
 
44
typedef Inkscape::Util::ForwardPointerIterator<Node const,
 
45
                                               NodeParentIteratorStrategy>
 
46
        NodeConstParentIterator;
 
47
 
 
48
}
 
49
}
 
50
 
 
51
#endif
 
52
/*
 
53
  Local Variables:
 
54
  mode:c++
 
55
  c-file-style:"stroustrup"
 
56
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
 
57
  indent-tabs-mode:nil
 
58
  fill-column:99
 
59
  End:
 
60
*/
 
61
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :