~centralelyon2010/inkscape/imagelinks2

« back to all changes in this revision

Viewing changes to src/xml/repr.h

  • Committer: JazzyNico
  • Date: 2011-08-29 20:25:30 UTC
  • Revision ID: nicoduf@yahoo.fr-20110829202530-6deuoz11q90usldv
Code refactoring and merging with trunk (revision 10599).

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 */
4
4
/* Authors:
5
5
 *   Lauris Kaplinski <lauris@kaplinski.com>
 
6
 *   Jon A. Cruz <jon@joncruz.org>
6
7
 *
7
8
 * Copyright (C) 1999-2002 authors
8
9
 * Copyright (C) 2000-2002 Ximian, Inc.
10
11
 * Released under GNU GPL, read the file 'COPYING' for more information
11
12
 */
12
13
 
13
 
#ifndef __SP_REPR_H__
14
 
#define __SP_REPR_H__
 
14
#ifndef SEEN_SP_REPR_H
 
15
#define SEEN_SP_REPR_H
15
16
 
16
17
#include <stdio.h>
17
18
#include <glib/gtypes.h>
78
79
                          gchar const *new_href_base = NULL);
79
80
Inkscape::XML::Document *sp_repr_read_buf (const Glib::ustring &buf, const gchar *default_ns);
80
81
Glib::ustring sp_repr_save_buf(Inkscape::XML::Document *doc);
 
82
 
 
83
// TODO convert to std::string
81
84
void sp_repr_save_stream(Inkscape::XML::Document *doc, FILE *to_file,
82
85
                         gchar const *default_ns = NULL, bool compress = false,
83
86
                         gchar const *old_href_base = NULL,
84
87
                         gchar const *new_href_base = NULL);
 
88
 
85
89
bool sp_repr_save_file(Inkscape::XML::Document *doc, gchar const *filename, gchar const *default_ns=NULL);
86
90
bool sp_repr_save_rebased_file(Inkscape::XML::Document *doc, gchar const *filename_utf8,
87
91
                               gchar const *default_ns,
137
141
/// \deprecated Use sp_repr_get_int to check for success
138
142
long long int sp_repr_get_int_attribute(Inkscape::XML::Node *repr, gchar const *key, long long int def);
139
143
 
140
 
int sp_repr_compare_position(Inkscape::XML::Node *first, Inkscape::XML::Node *second);
 
144
int sp_repr_compare_position(Inkscape::XML::Node const *first, Inkscape::XML::Node const *second);
141
145
 
142
 
/* Searching */
 
146
// Searching
 
147
/**
 
148
 * @brief Find an element node with the given name
 
149
 *
 
150
 * This function searches the descendants of the specified node depth-first for
 
151
 * the first XML node with the specified name.
 
152
 *
 
153
 * @param repr The node to start from
 
154
 * @param name The name of the element node to find
 
155
 * @param maxdepth Maximum search depth, or -1 for an unlimited depth
 
156
 * @return  A pointer to the matching Inkscape::XML::Node
 
157
 * @relatesalso Inkscape::XML::Node
 
158
 */
143
159
Inkscape::XML::Node *sp_repr_lookup_name(Inkscape::XML::Node *repr,
144
160
                                         gchar const *name,
145
161
                                         gint maxdepth = -1);
 
162
 
 
163
Inkscape::XML::Node const *sp_repr_lookup_name(Inkscape::XML::Node const *repr,
 
164
                                               gchar const *name,
 
165
                                               gint maxdepth = -1);
 
166
 
146
167
Inkscape::XML::Node *sp_repr_lookup_child(Inkscape::XML::Node *repr,
147
168
                                          gchar const *key,
148
169
                                          gchar const *value);
152
173
    return const_cast<Inkscape::XML::Node *>(doc->firstChild());
153
174
}
154
175
 
155
 
#endif
 
176
#endif // SEEN_SP_REPR_H
156
177
/*
157
178
  Local Variables:
158
179
  mode:c++
162
183
  fill-column:99
163
184
  End:
164
185
*/
165
 
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
 
186
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :