Merge lp:~liampwhite/inkscape/spfactory-gperf into lp:~inkscape.dev/inkscape/trunk

Proposed by Liam P. White
Status: Needs review
Proposed branch: lp:~liampwhite/inkscape/spfactory-gperf
Merge into: lp:~inkscape.dev/inkscape/trunk
Diff against target: 1080 lines (+826/-215)
2 files modified
src/sp-factory.cpp (+466/-215)
src/sp-factory.gperf (+360/-0)
To merge this branch: bzr merge lp:~liampwhite/inkscape/spfactory-gperf
Reviewer Review Type Date Requested Status
Krzysztof Kosinski Needs Fixing
Review via email: mp+285286@code.launchpad.net

Description of the change

Converts SPFactory's strcmp chain to a constant-time hash table lookup.

Should improve loading performance by small amounts in complex documents.

To post a comment you must log in.
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

I am skeptical about this.

1. Do we have any evidence that the strcmp chain is a performance problem?

2. At a minimum, this must be integrated with the build system, so that sp-factory.cpp is automatically rebuilt whenever sp-factory.gperf is modified.

3. I'd rather see something based on a trie initialized at runtime, since it would be more generally useful; for instance, we could reuse it for ID lookup.

review: Needs Fixing
Revision history for this message
Liam P. White (liampwhite) wrote :

1. No. strcmp is fast enough that most of the time you won't even notice the difference, especially for comparing small strings like these typenames.

2. That is the pain point of this merge proposal. IIRC win32 does not have gperf in its binaries. It might not be necessary but for pedanticism we would want to implement that (in both build systems, sigh.)

3. A trie has comparable or worse performance than a perfect hash table.

Revision history for this message
jazzynico (jazzynico) wrote :

2. Gperf was added in the win32 devlibs rev. 55.But it's still missing in de win64 devlibs.

Unmerged revisions

14636. By Liam P. White

convert SPFactory to a gperf table
undo some earlier stupidity

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/sp-factory.cpp'
--- src/sp-factory.cpp 2015-08-23 07:08:26 +0000
+++ src/sp-factory.cpp 2016-02-07 03:42:29 +0000
@@ -1,16 +1,50 @@
1/* ANSI-C code produced by gperf version 3.0.4 */
2/* Command-line: gperf -CGD -t sp-factory.gperf */
3/* Computed positions: -k'5,7,$' */
4
5#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
6 && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
7 && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
8 && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
9 && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
10 && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
11 && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
12 && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
13 && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
14 && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
15 && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
16 && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
17 && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
18 && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
19 && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
20 && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
21 && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
22 && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
23 && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
24 && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
25 && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
26 && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
27 && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
28/* The character set is not based on ISO-646. */
29#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
30#endif
31
32#line 1 "sp-factory.gperf"
33
1/*34/*
2 * Factory for SPObject tree35 * Factory for SPObject tree
3 *36 *
4 * Authors:37 * Authors:
5 * Markus Engel38 * Markus Engel
39 * Liam P. White
6 *40 *
7 * Copyright (C) 2013 Authors41 * Copyright (C) 2013-2016 Authors
8 * Released under GNU GPL, read the file 'COPYING' for more information42 * Released under GNU GPL, read the file 'COPYING' for more information
9 */43 */
1044
11#include "sp-factory.h"45#include "sp-factory.h"
1246
13// primary47// objects
14#include "box3d.h"48#include "box3d.h"
15#include "box3d-side.h"49#include "box3d-side.h"
16#include "color-profile.h"50#include "color-profile.h"
@@ -94,214 +128,28 @@
94#include "filters/tile.h"128#include "filters/tile.h"
95#include "filters/turbulence.h"129#include "filters/turbulence.h"
96130
131#define NEW_OBJECT_FUNC(derived) \
132 static SPObject *create_##derived() { return new derived; }
133
134struct factory_object {
135 char const *name;
136 SPObject *(*create_func)();
137};
138
139factory_object const *get_object_create_func(char const *str, unsigned int len);
140
97SPObject *SPFactory::createObject(std::string const& id)141SPObject *SPFactory::createObject(std::string const& id)
98{142{
99 SPObject *ret = NULL;143 SPObject *ret = NULL;
100144 if (id.empty()) return ret;
101 if (id == "inkscape:box3d")145
102 ret = new SPBox3D;146 factory_object const *obj = get_object_create_func(id.c_str(), id.length());
103 else if (id == "inkscape:box3dside")147 if (obj) {
104 ret = new Box3DSide;148 ret = obj->create_func();
105 else if (id == "svg:color-profile")149 } else {
106 ret = new Inkscape::ColorProfile;
107 else if (id == "inkscape:persp3d")
108 ret = new Persp3D;
109 else if (id == "svg:a")
110 ret = new SPAnchor;
111 else if (id == "svg:clipPath")
112 ret = new SPClipPath;
113 else if (id == "svg:defs")
114 ret = new SPDefs;
115 else if (id == "svg:desc")
116 ret = new SPDesc;
117 else if (id == "svg:ellipse") {
118 SPGenericEllipse *e = new SPGenericEllipse;
119 e->type = SP_GENERIC_ELLIPSE_ELLIPSE;
120 ret = e;
121 } else if (id == "svg:circle") {
122 SPGenericEllipse *c = new SPGenericEllipse;
123 c->type = SP_GENERIC_ELLIPSE_CIRCLE;
124 ret = c;
125 } else if (id == "arc") {
126 SPGenericEllipse *a = new SPGenericEllipse;
127 a->type = SP_GENERIC_ELLIPSE_ARC;
128 ret = a;
129 }
130 else if (id == "svg:filter")
131 ret = new SPFilter;
132 else if (id == "svg:flowDiv")
133 ret = new SPFlowdiv;
134 else if (id == "svg:flowSpan")
135 ret = new SPFlowtspan;
136 else if (id == "svg:flowPara")
137 ret = new SPFlowpara;
138 else if (id == "svg:flowLine")
139 ret = new SPFlowline;
140 else if (id == "svg:flowRegionBreak")
141 ret = new SPFlowregionbreak;
142 else if (id == "svg:flowRegion")
143 ret = new SPFlowregion;
144 else if (id == "svg:flowRegionExclude")
145 ret = new SPFlowregionExclude;
146 else if (id == "svg:flowRoot")
147 ret = new SPFlowtext;
148 else if (id == "svg:font")
149 ret = new SPFont;
150 else if (id == "svg:font-face")
151 ret = new SPFontFace;
152 else if (id == "svg:glyph")
153 ret = new SPGlyph;
154 else if (id == "svg:hkern")
155 ret = new SPHkern;
156 else if (id == "svg:vkern")
157 ret = new SPVkern;
158 else if (id == "sodipodi:guide")
159 ret = new SPGuide;
160 else if (id == "svg:hatch")
161 ret = new SPHatch;
162 else if (id == "svg:hatchPath")
163 ret = new SPHatchPath;
164 else if (id == "svg:image")
165 ret = new SPImage;
166 else if (id == "svg:g")
167 ret = new SPGroup;
168 else if (id == "svg:line")
169 ret = new SPLine;
170 else if (id == "svg:linearGradient")
171 ret = new SPLinearGradient;
172 else if (id == "svg:marker")
173 ret = new SPMarker;
174 else if (id == "svg:mask")
175 ret = new SPMask;
176 else if (id == "svg:mesh")
177 ret = new SPMesh;
178 else if (id == "svg:meshpatch")
179 ret = new SPMeshpatch;
180 else if (id == "svg:meshrow")
181 ret = new SPMeshrow;
182 else if (id == "svg:metadata")
183 ret = new SPMetadata;
184 else if (id == "svg:missing-glyph")
185 ret = new SPMissingGlyph;
186 else if (id == "sodipodi:namedview")
187 ret = new SPNamedView;
188 else if (id == "inkscape:offset")
189 ret = new SPOffset;
190 else if (id == "svg:path")
191 ret = new SPPath;
192 else if (id == "svg:pattern")
193 ret = new SPPattern;
194 else if (id == "svg:polygon")
195 ret = new SPPolygon;
196 else if (id == "svg:polyline")
197 ret = new SPPolyLine;
198 else if (id == "svg:radialGradient")
199 ret = new SPRadialGradient;
200 else if (id == "svg:rect")
201 ret = new SPRect;
202 else if (id == "svg:svg")
203 ret = new SPRoot;
204 else if (id == "svg:script")
205 ret = new SPScript;
206 else if (id == "svg:solidColor")
207 ret = new SPSolidColor;
208 else if (id == "spiral")
209 ret = new SPSpiral;
210 else if (id == "star")
211 ret = new SPStar;
212 else if (id == "svg:stop")
213 ret = new SPStop;
214 else if (id == "string")
215 ret = new SPString;
216 else if (id == "svg:style")
217 ret = new SPStyleElem;
218 else if (id == "svg:switch")
219 ret = new SPSwitch;
220 else if (id == "svg:symbol")
221 ret = new SPSymbol;
222 else if (id == "inkscape:tag")
223 ret = new SPTag;
224 else if (id == "inkscape:tagref")
225 ret = new SPTagUse;
226 else if (id == "svg:text")
227 ret = new SPText;
228 else if (id == "svg:title")
229 ret = new SPTitle;
230 else if (id == "svg:tref")
231 ret = new SPTRef;
232 else if (id == "svg:tspan")
233 ret = new SPTSpan;
234 else if (id == "svg:textPath")
235 ret = new SPTextPath;
236 else if (id == "svg:use")
237 ret = new SPUse;
238 else if (id == "inkscape:path-effect")
239 ret = new LivePathEffectObject;
240
241
242 // filters
243 else if (id == "svg:feBlend")
244 ret = new SPFeBlend;
245 else if (id == "svg:feColorMatrix")
246 ret = new SPFeColorMatrix;
247 else if (id == "svg:feComponentTransfer")
248 ret = new SPFeComponentTransfer;
249 else if (id == "svg:feFuncR")
250 ret = new SPFeFuncNode(SPFeFuncNode::R);
251 else if (id == "svg:feFuncG")
252 ret = new SPFeFuncNode(SPFeFuncNode::G);
253 else if (id == "svg:feFuncB")
254 ret = new SPFeFuncNode(SPFeFuncNode::B);
255 else if (id == "svg:feFuncA")
256 ret = new SPFeFuncNode(SPFeFuncNode::A);
257 else if (id == "svg:feComposite")
258 ret = new SPFeComposite;
259 else if (id == "svg:feConvolveMatrix")
260 ret = new SPFeConvolveMatrix;
261 else if (id == "svg:feDiffuseLighting")
262 ret = new SPFeDiffuseLighting;
263 else if (id == "svg:feDisplacementMap")
264 ret = new SPFeDisplacementMap;
265 else if (id == "svg:feDistantLight")
266 ret = new SPFeDistantLight;
267 else if (id == "svg:feFlood")
268 ret = new SPFeFlood;
269 else if (id == "svg:feGaussianBlur")
270 ret = new SPGaussianBlur;
271 else if (id == "svg:feImage")
272 ret = new SPFeImage;
273 else if (id == "svg:feMerge")
274 ret = new SPFeMerge;
275 else if (id == "svg:feMergeNode")
276 ret = new SPFeMergeNode;
277 else if (id == "svg:feMorphology")
278 ret = new SPFeMorphology;
279 else if (id == "svg:feOffset")
280 ret = new SPFeOffset;
281 else if (id == "svg:fePointLight")
282 ret = new SPFePointLight;
283 else if (id == "svg:feSpecularLighting")
284 ret = new SPFeSpecularLighting;
285 else if (id == "svg:feSpotLight")
286 ret = new SPFeSpotLight;
287 else if (id == "svg:feTile")
288 ret = new SPFeTile;
289 else if (id == "svg:feTurbulence")
290 ret = new SPFeTurbulence;
291 else if (id == "inkscape:grid")
292 ret = new SPObject; // TODO wtf
293 else if (id == "rdf:RDF") // no SP node yet
294 {}
295 else if (id == "inkscape:clipboard") // SP node not necessary
296 {}
297 else if (id == "inkscape:_templateinfo") // ?
298 {}
299 else if (id.empty()) // comments
300 {}
301 else {
302 fprintf(stderr, "WARNING: unknown type: %s\n", id.c_str());150 fprintf(stderr, "WARNING: unknown type: %s\n", id.c_str());
303 }151 }
304152
305 return ret;153 return ret;
306}154}
307155
@@ -332,13 +180,416 @@
332 return name;180 return name;
333}181}
334182
335/*183// objects
336 Local Variables:184
337 mode:c++185NEW_OBJECT_FUNC(SPBox3D);
338 c-file-style:"stroustrup"186NEW_OBJECT_FUNC(Box3DSide);
339 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))187NEW_OBJECT_FUNC(Persp3D);
340 indent-tabs-mode:nil188NEW_OBJECT_FUNC(SPAnchor);
341 fill-column:99189NEW_OBJECT_FUNC(SPClipPath);
342 End:190NEW_OBJECT_FUNC(SPDefs);
343*/191NEW_OBJECT_FUNC(SPDesc);
344// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :192NEW_OBJECT_FUNC(SPFilter);
193NEW_OBJECT_FUNC(SPFlowdiv);
194NEW_OBJECT_FUNC(SPFlowtspan);
195NEW_OBJECT_FUNC(SPFlowpara);
196NEW_OBJECT_FUNC(SPFlowline);
197NEW_OBJECT_FUNC(SPFlowregionbreak);
198NEW_OBJECT_FUNC(SPFlowregion);
199NEW_OBJECT_FUNC(SPFlowregionExclude);
200NEW_OBJECT_FUNC(SPFlowtext);
201NEW_OBJECT_FUNC(SPFont);
202NEW_OBJECT_FUNC(SPFontFace);
203NEW_OBJECT_FUNC(SPGlyph);
204NEW_OBJECT_FUNC(SPHkern);
205NEW_OBJECT_FUNC(SPVkern);
206NEW_OBJECT_FUNC(SPGuide);
207NEW_OBJECT_FUNC(SPHatch);
208NEW_OBJECT_FUNC(SPHatchPath);
209NEW_OBJECT_FUNC(SPImage);
210NEW_OBJECT_FUNC(SPGroup);
211NEW_OBJECT_FUNC(SPLine);
212NEW_OBJECT_FUNC(SPLinearGradient);
213NEW_OBJECT_FUNC(SPMarker);
214NEW_OBJECT_FUNC(SPMask);
215NEW_OBJECT_FUNC(SPMesh);
216NEW_OBJECT_FUNC(SPMeshpatch);
217NEW_OBJECT_FUNC(SPMeshrow);
218NEW_OBJECT_FUNC(SPMetadata);
219NEW_OBJECT_FUNC(SPMissingGlyph);
220NEW_OBJECT_FUNC(SPNamedView);
221NEW_OBJECT_FUNC(SPOffset);
222NEW_OBJECT_FUNC(SPPath);
223NEW_OBJECT_FUNC(SPPattern);
224NEW_OBJECT_FUNC(SPPolygon);
225NEW_OBJECT_FUNC(SPPolyLine);
226NEW_OBJECT_FUNC(SPRadialGradient);
227NEW_OBJECT_FUNC(SPRect);
228NEW_OBJECT_FUNC(SPRoot);
229NEW_OBJECT_FUNC(SPScript);
230NEW_OBJECT_FUNC(SPSolidColor);
231NEW_OBJECT_FUNC(SPSpiral);
232NEW_OBJECT_FUNC(SPStar);
233NEW_OBJECT_FUNC(SPStop);
234NEW_OBJECT_FUNC(SPString);
235NEW_OBJECT_FUNC(SPStyleElem);
236NEW_OBJECT_FUNC(SPSwitch);
237NEW_OBJECT_FUNC(SPSymbol);
238NEW_OBJECT_FUNC(SPTag);
239NEW_OBJECT_FUNC(SPTagUse);
240NEW_OBJECT_FUNC(SPText);
241NEW_OBJECT_FUNC(SPTitle);
242NEW_OBJECT_FUNC(SPTRef);
243NEW_OBJECT_FUNC(SPTSpan);
244NEW_OBJECT_FUNC(SPTextPath);
245NEW_OBJECT_FUNC(SPUse);
246NEW_OBJECT_FUNC(LivePathEffectObject);
247NEW_OBJECT_FUNC(SPObject);
248
249static SPObject *create_nothing() { return NULL; }
250static SPObject *create_ColorProfile() { return new Inkscape::ColorProfile; }
251static SPObject *create_ellipse() {
252 SPGenericEllipse *e = new SPGenericEllipse;
253 e->type = SP_GENERIC_ELLIPSE_ELLIPSE;
254 return e;
255}
256static SPObject *create_circle() {
257 SPGenericEllipse *e = new SPGenericEllipse;
258 e->type = SP_GENERIC_ELLIPSE_CIRCLE;
259 return e;
260}
261static SPObject *create_arc() {
262 SPGenericEllipse *e = new SPGenericEllipse;
263 e->type = SP_GENERIC_ELLIPSE_ARC;
264 return e;
265}
266
267// filters
268
269NEW_OBJECT_FUNC(SPFeBlend);
270NEW_OBJECT_FUNC(SPFeColorMatrix);
271NEW_OBJECT_FUNC(SPFeComponentTransfer);
272NEW_OBJECT_FUNC(SPFeComposite);
273NEW_OBJECT_FUNC(SPFeConvolveMatrix);
274NEW_OBJECT_FUNC(SPFeDiffuseLighting);
275NEW_OBJECT_FUNC(SPFeDisplacementMap);
276NEW_OBJECT_FUNC(SPFeDistantLight);
277NEW_OBJECT_FUNC(SPFeFlood);
278NEW_OBJECT_FUNC(SPGaussianBlur);
279NEW_OBJECT_FUNC(SPFeImage);
280NEW_OBJECT_FUNC(SPFeMerge);
281NEW_OBJECT_FUNC(SPFeMergeNode);
282NEW_OBJECT_FUNC(SPFeMorphology);
283NEW_OBJECT_FUNC(SPFeOffset);
284NEW_OBJECT_FUNC(SPFePointLight);
285NEW_OBJECT_FUNC(SPFeSpecularLighting);
286NEW_OBJECT_FUNC(SPFeSpotLight);
287NEW_OBJECT_FUNC(SPFeTile);
288NEW_OBJECT_FUNC(SPFeTurbulence);
289
290static SPObject *create_SPFeFuncNode_R() { return new SPFeFuncNode(SPFeFuncNode::R); }
291static SPObject *create_SPFeFuncNode_G() { return new SPFeFuncNode(SPFeFuncNode::G); }
292static SPObject *create_SPFeFuncNode_B() { return new SPFeFuncNode(SPFeFuncNode::B); }
293static SPObject *create_SPFeFuncNode_A() { return new SPFeFuncNode(SPFeFuncNode::A); }
294#line 265 "sp-factory.gperf"
295struct factory_object;
296
297#define TOTAL_KEYWORDS 94
298#define MIN_WORD_LENGTH 3
299#define MAX_WORD_LENGTH 23
300#define MIN_HASH_VALUE 3
301#define MAX_HASH_VALUE 151
302/* maximum key range = 149, duplicates = 0 */
303
304#ifdef __GNUC__
305__inline
306#else
307#ifdef __cplusplus
308inline
309#endif
310#endif
311static unsigned int
312hash (register const char *str, register unsigned int len)
313{
314 static const unsigned char asso_values[] =
315 {
316 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
317 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
318 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
319 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
320 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
321 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
322 152, 152, 152, 152, 152, 90, 60, 40, 35, 152,
323 0, 70, 152, 75, 152, 152, 152, 35, 152, 25,
324 70, 152, 5, 25, 55, 152, 152, 152, 152, 152,
325 152, 152, 152, 152, 152, 152, 152, 55, 152, 0,
326 45, 5, 35, 40, 60, 10, 152, 50, 15, 0,
327 10, 0, 10, 152, 20, 40, 0, 0, 20, 30,
328 5, 10, 152, 152, 152, 152, 152, 152, 152, 152,
329 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
330 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
331 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
332 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
333 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
334 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
335 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
336 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
337 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
338 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
339 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
340 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
341 152, 152, 152, 152, 152, 152
342 };
343 register int hval = len;
344
345 switch (hval)
346 {
347 default:
348 hval += asso_values[(unsigned char)str[6]];
349 /*FALLTHROUGH*/
350 case 6:
351 case 5:
352 hval += asso_values[(unsigned char)str[4]];
353 /*FALLTHROUGH*/
354 case 4:
355 case 3:
356 break;
357 }
358 return hval + asso_values[(unsigned char)str[len - 1]];
359}
360
361static const struct factory_object wordlist[] =
362 {
363#line 277 "sp-factory.gperf"
364 {"arc", create_arc},
365#line 358 "sp-factory.gperf"
366 {"rdf:RDF", create_nothing},
367#line 326 "sp-factory.gperf"
368 {"svg:text", create_SPText},
369#line 327 "sp-factory.gperf"
370 {"svg:title", create_SPTitle},
371#line 331 "sp-factory.gperf"
372 {"svg:use", create_SPUse},
373#line 318 "sp-factory.gperf"
374 {"star", create_SPStar},
375#line 307 "sp-factory.gperf"
376 {"inkscape:offset", create_SPOffset},
377#line 313 "sp-factory.gperf"
378 {"svg:rect", create_SPRect},
379#line 329 "sp-factory.gperf"
380 {"svg:tspan", create_SPTSpan},
381#line 332 "sp-factory.gperf"
382 {"inkscape:path-effect", create_LivePathEffectObject},
383#line 309 "sp-factory.gperf"
384 {"svg:pattern", create_SPPattern},
385#line 360 "sp-factory.gperf"
386 {"inkscape:_templateinfo", create_nothing},
387#line 268 "sp-factory.gperf"
388 {"inkscape:box3dside", create_Box3DSide},
389#line 276 "sp-factory.gperf"
390 {"svg:circle", create_circle},
391#line 275 "sp-factory.gperf"
392 {"svg:ellipse", create_ellipse},
393#line 270 "sp-factory.gperf"
394 {"svg:color-profile", create_ColorProfile},
395#line 297 "sp-factory.gperf"
396 {"svg:line", create_SPLine},
397#line 311 "sp-factory.gperf"
398 {"svg:polyline", create_SPPolyLine},
399#line 298 "sp-factory.gperf"
400 {"svg:linearGradient", create_SPLinearGradient},
401#line 291 "sp-factory.gperf"
402 {"svg:vkern", create_SPVkern},
403#line 310 "sp-factory.gperf"
404 {"svg:polygon", create_SPPolygon},
405#line 286 "sp-factory.gperf"
406 {"svg:flowRoot", create_SPFlowtext},
407#line 328 "sp-factory.gperf"
408 {"svg:tref", create_SPTRef},
409#line 299 "sp-factory.gperf"
410 {"svg:marker", create_SPMarker},
411#line 336 "sp-factory.gperf"
412 {"svg:feFuncR", create_SPFeFuncNode_R},
413#line 282 "sp-factory.gperf"
414 {"svg:flowLine", create_SPFlowline},
415#line 287 "sp-factory.gperf"
416 {"svg:font", create_SPFont},
417#line 320 "sp-factory.gperf"
418 {"string", create_SPString},
419#line 280 "sp-factory.gperf"
420 {"svg:flowSpan", create_SPFlowtspan},
421#line 319 "sp-factory.gperf"
422 {"svg:stop", create_SPStop},
423#line 283 "sp-factory.gperf"
424 {"svg:flowRegion", create_SPFlowregion},
425#line 325 "sp-factory.gperf"
426 {"inkscape:tagref", create_SPTagUse},
427#line 285 "sp-factory.gperf"
428 {"svg:flowRegionExclude", create_SPFlowregionExclude},
429#line 324 "sp-factory.gperf"
430 {"inkscape:tag", create_SPTag},
431#line 288 "sp-factory.gperf"
432 {"svg:font-face", create_SPFontFace},
433#line 321 "sp-factory.gperf"
434 {"svg:style", create_SPStyleElem},
435#line 323 "sp-factory.gperf"
436 {"svg:symbol", create_SPSymbol},
437#line 279 "sp-factory.gperf"
438 {"svg:flowDiv", create_SPFlowdiv},
439#line 304 "sp-factory.gperf"
440 {"svg:metadata", create_SPMetadata},
441#line 357 "sp-factory.gperf"
442 {"inkscape:grid", create_SPObject},
443#line 267 "sp-factory.gperf"
444 {"inkscape:box3d", create_SPBox3D},
445#line 315 "sp-factory.gperf"
446 {"svg:script", create_SPScript},
447#line 269 "sp-factory.gperf"
448 {"inkscape:persp3d", create_Persp3D},
449#line 351 "sp-factory.gperf"
450 {"svg:feOffset", create_SPFeOffset},
451#line 359 "sp-factory.gperf"
452 {"inkscape:clipboard", create_nothing},
453#line 292 "sp-factory.gperf"
454 {"sodipodi:guide", create_SPGuide},
455#line 354 "sp-factory.gperf"
456 {"svg:feSpotLight", create_SPFeSpotLight},
457#line 317 "sp-factory.gperf"
458 {"spiral", create_SPSpiral},
459#line 330 "sp-factory.gperf"
460 {"svg:textPath", create_SPTextPath},
461#line 308 "sp-factory.gperf"
462 {"svg:path", create_SPPath},
463#line 295 "sp-factory.gperf"
464 {"svg:image", create_SPImage},
465#line 278 "sp-factory.gperf"
466 {"svg:filter", create_SPFilter},
467#line 303 "sp-factory.gperf"
468 {"svg:meshrow", create_SPMeshrow},
469#line 272 "sp-factory.gperf"
470 {"svg:clipPath", create_SPClipPath},
471#line 312 "sp-factory.gperf"
472 {"svg:radialGradient", create_SPRadialGradient},
473#line 290 "sp-factory.gperf"
474 {"svg:hkern", create_SPHkern},
475#line 296 "sp-factory.gperf"
476 {"svg:g", create_SPGroup},
477#line 348 "sp-factory.gperf"
478 {"svg:feMerge", create_SPFeMerge},
479#line 344 "sp-factory.gperf"
480 {"svg:feDistantLight", create_SPFeDistantLight},
481#line 316 "sp-factory.gperf"
482 {"svg:solidColor", create_SPSolidColor},
483#line 349 "sp-factory.gperf"
484 {"svg:feMergeNode", create_SPFeMergeNode},
485#line 345 "sp-factory.gperf"
486 {"svg:feFlood", create_SPFeFlood},
487#line 274 "sp-factory.gperf"
488 {"svg:desc", create_SPDesc},
489#line 340 "sp-factory.gperf"
490 {"svg:feComposite", create_SPFeComposite},
491#line 350 "sp-factory.gperf"
492 {"svg:feMorphology", create_SPFeMorphology},
493#line 334 "sp-factory.gperf"
494 {"svg:feColorMatrix", create_SPFeColorMatrix},
495#line 300 "sp-factory.gperf"
496 {"svg:mask", create_SPMask},
497#line 341 "sp-factory.gperf"
498 {"svg:feConvolveMatrix", create_SPFeConvolveMatrix},
499#line 343 "sp-factory.gperf"
500 {"svg:feDisplacementMap", create_SPFeDisplacementMap},
501#line 281 "sp-factory.gperf"
502 {"svg:flowPara", create_SPFlowpara},
503#line 306 "sp-factory.gperf"
504 {"sodipodi:namedview", create_SPNamedView},
505#line 284 "sp-factory.gperf"
506 {"svg:flowRegionBreak", create_SPFlowregionbreak},
507#line 355 "sp-factory.gperf"
508 {"svg:feTile", create_SPFeTile},
509#line 338 "sp-factory.gperf"
510 {"svg:feFuncB", create_SPFeFuncNode_B},
511#line 301 "sp-factory.gperf"
512 {"svg:mesh", create_SPMesh},
513#line 356 "sp-factory.gperf"
514 {"svg:feTurbulence", create_SPFeTurbulence},
515#line 302 "sp-factory.gperf"
516 {"svg:meshpatch", create_SPMeshpatch},
517#line 271 "sp-factory.gperf"
518 {"svg:a", create_SPAnchor},
519#line 337 "sp-factory.gperf"
520 {"svg:feFuncG", create_SPFeFuncNode_G},
521#line 305 "sp-factory.gperf"
522 {"svg:missing-glyph", create_SPMissingGlyph},
523#line 335 "sp-factory.gperf"
524 {"svg:feComponentTransfer", create_SPFeComponentTransfer},
525#line 289 "sp-factory.gperf"
526 {"svg:glyph", create_SPGlyph},
527#line 322 "sp-factory.gperf"
528 {"svg:switch", create_SPSwitch},
529#line 352 "sp-factory.gperf"
530 {"svg:fePointLight", create_SPFePointLight},
531#line 353 "sp-factory.gperf"
532 {"svg:feSpecularLighting", create_SPFeSpecularLighting},
533#line 347 "sp-factory.gperf"
534 {"svg:feImage", create_SPFeImage},
535#line 314 "sp-factory.gperf"
536 {"svg:svg", create_SPRoot},
537#line 273 "sp-factory.gperf"
538 {"svg:defs", create_SPDefs},
539#line 293 "sp-factory.gperf"
540 {"svg:hatch", create_SPHatch},
541#line 342 "sp-factory.gperf"
542 {"svg:feDiffuseLighting", create_SPFeDiffuseLighting},
543#line 294 "sp-factory.gperf"
544 {"svg:hatchPath", create_SPHatchPath},
545#line 339 "sp-factory.gperf"
546 {"svg:feFuncA", create_SPFeFuncNode_A},
547#line 346 "sp-factory.gperf"
548 {"svg:feGaussianBlur", create_SPGaussianBlur},
549#line 333 "sp-factory.gperf"
550 {"svg:feBlend", create_SPFeBlend}
551 };
552
553static const signed char lookup[] =
554 {
555 -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, 1, 2,
556 3, -1, -1, 4, -1, -1, -1, -1, -1, -1, 5, 6, -1, -1,
557 7, 8, 9, 10, 11, 12, -1, 13, 14, 15, 16, -1, -1, -1,
558 17, 18, 19, -1, 20, 21, 22, -1, 23, 24, 25, 26, -1, -1,
559 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
560 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
561 55, 56, 57, -1, 58, 59, 60, 61, -1, 62, -1, 63, 64, 65,
562 66, -1, 67, 68, 69, 70, 71, 72, 73, -1, 74, -1, -1, 75,
563 -1, 76, -1, 77, 78, 79, 80, 81, 82, 83, 84, -1, -1, -1,
564 85, 86, 87, 88, -1, 89, -1, 90, -1, -1, 91, -1, -1, -1,
565 -1, -1, -1, 92, -1, -1, -1, -1, -1, -1, -1, 93
566 };
567
568#ifdef __GNUC__
569__inline
570#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
571__attribute__ ((__gnu_inline__))
572#endif
573#endif
574const struct factory_object *
575get_object_create_func (register const char *str, register unsigned int len)
576{
577 if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
578 {
579 register int key = hash (str, len);
580
581 if (key <= MAX_HASH_VALUE && key >= 0)
582 {
583 register int index = lookup[key];
584
585 if (index >= 0)
586 {
587 register const char *s = wordlist[index].name;
588
589 if (*str == *s && !strcmp (str + 1, s + 1))
590 return &wordlist[index];
591 }
592 }
593 }
594 return 0;
595}
345596
=== added file 'src/sp-factory.gperf'
--- src/sp-factory.gperf 1970-01-01 00:00:00 +0000
+++ src/sp-factory.gperf 2016-02-07 03:42:29 +0000
@@ -0,0 +1,360 @@
1%{
2/*
3 * Factory for SPObject tree
4 *
5 * Authors:
6 * Markus Engel
7 * Liam P. White
8 *
9 * Copyright (C) 2013-2016 Authors
10 * Released under GNU GPL, read the file 'COPYING' for more information
11 */
12
13#include "sp-factory.h"
14
15// objects
16#include "box3d.h"
17#include "box3d-side.h"
18#include "color-profile.h"
19#include "persp3d.h"
20#include "sp-anchor.h"
21#include "sp-clippath.h"
22#include "sp-defs.h"
23#include "sp-desc.h"
24#include "sp-ellipse.h"
25#include "sp-filter.h"
26#include "sp-flowdiv.h"
27#include "sp-flowregion.h"
28#include "sp-flowtext.h"
29#include "sp-font.h"
30#include "sp-font-face.h"
31#include "sp-glyph.h"
32#include "sp-glyph-kerning.h"
33#include "sp-guide.h"
34#include "sp-hatch.h"
35#include "sp-hatch-path.h"
36#include "sp-image.h"
37#include "sp-item-group.h"
38#include "sp-line.h"
39#include "sp-linear-gradient.h"
40#include "sp-marker.h"
41#include "sp-mask.h"
42#include "sp-mesh.h"
43#include "sp-mesh-patch.h"
44#include "sp-mesh-row.h"
45#include "sp-metadata.h"
46#include "sp-missing-glyph.h"
47#include "sp-namedview.h"
48#include "sp-object.h"
49#include "sp-offset.h"
50#include "sp-path.h"
51#include "sp-pattern.h"
52#include "sp-polygon.h"
53#include "sp-polyline.h"
54#include "sp-radial-gradient.h"
55#include "sp-rect.h"
56#include "sp-root.h"
57#include "sp-script.h"
58#include "sp-solid-color.h"
59#include "sp-spiral.h"
60#include "sp-star.h"
61#include "sp-stop.h"
62#include "sp-string.h"
63#include "sp-style-elem.h"
64#include "sp-switch.h"
65#include "sp-symbol.h"
66#include "sp-tag.h"
67#include "sp-tag-use.h"
68#include "sp-text.h"
69#include "sp-textpath.h"
70#include "sp-title.h"
71#include "sp-tref.h"
72#include "sp-tspan.h"
73#include "sp-use.h"
74#include "live_effects/lpeobject.h"
75
76// filters
77#include "filters/blend.h"
78#include "filters/colormatrix.h"
79#include "filters/componenttransfer.h"
80#include "filters/componenttransfer-funcnode.h"
81#include "filters/composite.h"
82#include "filters/convolvematrix.h"
83#include "filters/diffuselighting.h"
84#include "filters/displacementmap.h"
85#include "filters/distantlight.h"
86#include "filters/flood.h"
87#include "filters/gaussian-blur.h"
88#include "filters/image.h"
89#include "filters/merge.h"
90#include "filters/mergenode.h"
91#include "filters/morphology.h"
92#include "filters/offset.h"
93#include "filters/pointlight.h"
94#include "filters/specularlighting.h"
95#include "filters/spotlight.h"
96#include "filters/tile.h"
97#include "filters/turbulence.h"
98
99#define NEW_OBJECT_FUNC(derived) \
100 static SPObject *create_##derived() { return new derived; }
101
102struct factory_object {
103 char const *name;
104 SPObject *(*create_func)();
105};
106
107factory_object const *get_object_create_func(char const *str, unsigned int len);
108
109SPObject *SPFactory::createObject(std::string const& id)
110{
111 SPObject *ret = NULL;
112 if (id.empty()) return ret;
113
114 factory_object const *obj = get_object_create_func(id.c_str(), id.length());
115 if (obj) {
116 ret = obj->create_func();
117 } else {
118 fprintf(stderr, "WARNING: unknown type: %s\n", id.c_str());
119 }
120
121 return ret;
122}
123
124std::string NodeTraits::get_type_string(Inkscape::XML::Node const &node)
125{
126 std::string name;
127
128 switch (node.type()) {
129 case Inkscape::XML::TEXT_NODE:
130 name = "string";
131 break;
132
133 case Inkscape::XML::ELEMENT_NODE: {
134 char const *const sptype = node.attribute("sodipodi:type");
135
136 if (sptype) {
137 name = sptype;
138 } else {
139 name = node.name();
140 }
141 break;
142 }
143 default:
144 name = "";
145 break;
146 }
147
148 return name;
149}
150
151// objects
152
153NEW_OBJECT_FUNC(SPBox3D);
154NEW_OBJECT_FUNC(Box3DSide);
155NEW_OBJECT_FUNC(Persp3D);
156NEW_OBJECT_FUNC(SPAnchor);
157NEW_OBJECT_FUNC(SPClipPath);
158NEW_OBJECT_FUNC(SPDefs);
159NEW_OBJECT_FUNC(SPDesc);
160NEW_OBJECT_FUNC(SPFilter);
161NEW_OBJECT_FUNC(SPFlowdiv);
162NEW_OBJECT_FUNC(SPFlowtspan);
163NEW_OBJECT_FUNC(SPFlowpara);
164NEW_OBJECT_FUNC(SPFlowline);
165NEW_OBJECT_FUNC(SPFlowregionbreak);
166NEW_OBJECT_FUNC(SPFlowregion);
167NEW_OBJECT_FUNC(SPFlowregionExclude);
168NEW_OBJECT_FUNC(SPFlowtext);
169NEW_OBJECT_FUNC(SPFont);
170NEW_OBJECT_FUNC(SPFontFace);
171NEW_OBJECT_FUNC(SPGlyph);
172NEW_OBJECT_FUNC(SPHkern);
173NEW_OBJECT_FUNC(SPVkern);
174NEW_OBJECT_FUNC(SPGuide);
175NEW_OBJECT_FUNC(SPHatch);
176NEW_OBJECT_FUNC(SPHatchPath);
177NEW_OBJECT_FUNC(SPImage);
178NEW_OBJECT_FUNC(SPGroup);
179NEW_OBJECT_FUNC(SPLine);
180NEW_OBJECT_FUNC(SPLinearGradient);
181NEW_OBJECT_FUNC(SPMarker);
182NEW_OBJECT_FUNC(SPMask);
183NEW_OBJECT_FUNC(SPMesh);
184NEW_OBJECT_FUNC(SPMeshpatch);
185NEW_OBJECT_FUNC(SPMeshrow);
186NEW_OBJECT_FUNC(SPMetadata);
187NEW_OBJECT_FUNC(SPMissingGlyph);
188NEW_OBJECT_FUNC(SPNamedView);
189NEW_OBJECT_FUNC(SPOffset);
190NEW_OBJECT_FUNC(SPPath);
191NEW_OBJECT_FUNC(SPPattern);
192NEW_OBJECT_FUNC(SPPolygon);
193NEW_OBJECT_FUNC(SPPolyLine);
194NEW_OBJECT_FUNC(SPRadialGradient);
195NEW_OBJECT_FUNC(SPRect);
196NEW_OBJECT_FUNC(SPRoot);
197NEW_OBJECT_FUNC(SPScript);
198NEW_OBJECT_FUNC(SPSolidColor);
199NEW_OBJECT_FUNC(SPSpiral);
200NEW_OBJECT_FUNC(SPStar);
201NEW_OBJECT_FUNC(SPStop);
202NEW_OBJECT_FUNC(SPString);
203NEW_OBJECT_FUNC(SPStyleElem);
204NEW_OBJECT_FUNC(SPSwitch);
205NEW_OBJECT_FUNC(SPSymbol);
206NEW_OBJECT_FUNC(SPTag);
207NEW_OBJECT_FUNC(SPTagUse);
208NEW_OBJECT_FUNC(SPText);
209NEW_OBJECT_FUNC(SPTitle);
210NEW_OBJECT_FUNC(SPTRef);
211NEW_OBJECT_FUNC(SPTSpan);
212NEW_OBJECT_FUNC(SPTextPath);
213NEW_OBJECT_FUNC(SPUse);
214NEW_OBJECT_FUNC(LivePathEffectObject);
215NEW_OBJECT_FUNC(SPObject);
216
217static SPObject *create_nothing() { return NULL; }
218static SPObject *create_ColorProfile() { return new Inkscape::ColorProfile; }
219static SPObject *create_ellipse() {
220 SPGenericEllipse *e = new SPGenericEllipse;
221 e->type = SP_GENERIC_ELLIPSE_ELLIPSE;
222 return e;
223}
224static SPObject *create_circle() {
225 SPGenericEllipse *e = new SPGenericEllipse;
226 e->type = SP_GENERIC_ELLIPSE_CIRCLE;
227 return e;
228}
229static SPObject *create_arc() {
230 SPGenericEllipse *e = new SPGenericEllipse;
231 e->type = SP_GENERIC_ELLIPSE_ARC;
232 return e;
233}
234
235// filters
236
237NEW_OBJECT_FUNC(SPFeBlend);
238NEW_OBJECT_FUNC(SPFeColorMatrix);
239NEW_OBJECT_FUNC(SPFeComponentTransfer);
240NEW_OBJECT_FUNC(SPFeComposite);
241NEW_OBJECT_FUNC(SPFeConvolveMatrix);
242NEW_OBJECT_FUNC(SPFeDiffuseLighting);
243NEW_OBJECT_FUNC(SPFeDisplacementMap);
244NEW_OBJECT_FUNC(SPFeDistantLight);
245NEW_OBJECT_FUNC(SPFeFlood);
246NEW_OBJECT_FUNC(SPGaussianBlur);
247NEW_OBJECT_FUNC(SPFeImage);
248NEW_OBJECT_FUNC(SPFeMerge);
249NEW_OBJECT_FUNC(SPFeMergeNode);
250NEW_OBJECT_FUNC(SPFeMorphology);
251NEW_OBJECT_FUNC(SPFeOffset);
252NEW_OBJECT_FUNC(SPFePointLight);
253NEW_OBJECT_FUNC(SPFeSpecularLighting);
254NEW_OBJECT_FUNC(SPFeSpotLight);
255NEW_OBJECT_FUNC(SPFeTile);
256NEW_OBJECT_FUNC(SPFeTurbulence);
257
258static SPObject *create_SPFeFuncNode_R() { return new SPFeFuncNode(SPFeFuncNode::R); }
259static SPObject *create_SPFeFuncNode_G() { return new SPFeFuncNode(SPFeFuncNode::G); }
260static SPObject *create_SPFeFuncNode_B() { return new SPFeFuncNode(SPFeFuncNode::B); }
261static SPObject *create_SPFeFuncNode_A() { return new SPFeFuncNode(SPFeFuncNode::A); }
262%}
263%language=ANSI-C
264%define lookup-function-name get_object_create_func
265struct factory_object
266%%
267inkscape:box3d, create_SPBox3D
268inkscape:box3dside, create_Box3DSide
269inkscape:persp3d, create_Persp3D
270svg:color-profile, create_ColorProfile
271svg:a, create_SPAnchor
272svg:clipPath, create_SPClipPath
273svg:defs, create_SPDefs
274svg:desc, create_SPDesc
275svg:ellipse, create_ellipse
276svg:circle, create_circle
277arc, create_arc
278svg:filter, create_SPFilter
279svg:flowDiv, create_SPFlowdiv
280svg:flowSpan, create_SPFlowtspan
281svg:flowPara, create_SPFlowpara
282svg:flowLine, create_SPFlowline
283svg:flowRegion, create_SPFlowregion
284svg:flowRegionBreak, create_SPFlowregionbreak
285svg:flowRegionExclude, create_SPFlowregionExclude
286svg:flowRoot, create_SPFlowtext
287svg:font, create_SPFont
288svg:font-face, create_SPFontFace
289svg:glyph, create_SPGlyph
290svg:hkern, create_SPHkern
291svg:vkern, create_SPVkern
292sodipodi:guide, create_SPGuide
293svg:hatch, create_SPHatch
294svg:hatchPath, create_SPHatchPath
295svg:image, create_SPImage
296svg:g, create_SPGroup
297svg:line, create_SPLine
298svg:linearGradient, create_SPLinearGradient
299svg:marker, create_SPMarker
300svg:mask, create_SPMask
301svg:mesh, create_SPMesh
302svg:meshpatch, create_SPMeshpatch
303svg:meshrow, create_SPMeshrow
304svg:metadata, create_SPMetadata
305svg:missing-glyph, create_SPMissingGlyph
306sodipodi:namedview, create_SPNamedView
307inkscape:offset, create_SPOffset
308svg:path, create_SPPath
309svg:pattern, create_SPPattern
310svg:polygon, create_SPPolygon
311svg:polyline, create_SPPolyLine
312svg:radialGradient, create_SPRadialGradient
313svg:rect, create_SPRect
314svg:svg, create_SPRoot
315svg:script, create_SPScript
316svg:solidColor, create_SPSolidColor
317spiral, create_SPSpiral
318star, create_SPStar
319svg:stop, create_SPStop
320string, create_SPString
321svg:style, create_SPStyleElem
322svg:switch, create_SPSwitch
323svg:symbol, create_SPSymbol
324inkscape:tag, create_SPTag
325inkscape:tagref, create_SPTagUse
326svg:text, create_SPText
327svg:title, create_SPTitle
328svg:tref, create_SPTRef
329svg:tspan, create_SPTSpan
330svg:textPath, create_SPTextPath
331svg:use, create_SPUse
332inkscape:path-effect, create_LivePathEffectObject
333svg:feBlend, create_SPFeBlend
334svg:feColorMatrix, create_SPFeColorMatrix
335svg:feComponentTransfer, create_SPFeComponentTransfer
336svg:feFuncR, create_SPFeFuncNode_R
337svg:feFuncG, create_SPFeFuncNode_G
338svg:feFuncB, create_SPFeFuncNode_B
339svg:feFuncA, create_SPFeFuncNode_A
340svg:feComposite, create_SPFeComposite
341svg:feConvolveMatrix, create_SPFeConvolveMatrix
342svg:feDiffuseLighting, create_SPFeDiffuseLighting
343svg:feDisplacementMap, create_SPFeDisplacementMap
344svg:feDistantLight, create_SPFeDistantLight
345svg:feFlood, create_SPFeFlood
346svg:feGaussianBlur, create_SPGaussianBlur
347svg:feImage, create_SPFeImage
348svg:feMerge, create_SPFeMerge
349svg:feMergeNode, create_SPFeMergeNode
350svg:feMorphology, create_SPFeMorphology
351svg:feOffset, create_SPFeOffset
352svg:fePointLight, create_SPFePointLight
353svg:feSpecularLighting, create_SPFeSpecularLighting
354svg:feSpotLight, create_SPFeSpotLight
355svg:feTile, create_SPFeTile
356svg:feTurbulence, create_SPFeTurbulence
357inkscape:grid, create_SPObject
358rdf:RDF, create_nothing
359inkscape:clipboard, create_nothing
360inkscape:_templateinfo, create_nothing