Merge lp:~zorba-coders/zorba/image-module-fix into lp:zorba/image-module
- image-module-fix
- Merge into image-module
Proposed by
Ghislain Fourny
Status: | Merged |
---|---|
Approved by: | Ghislain Fourny |
Approved revision: | 48 |
Merged at revision: | 48 |
Proposed branch: | lp:~zorba-coders/zorba/image-module-fix |
Merge into: | lp:zorba/image-module |
Diff against target: |
493 lines (+76/-90) 2 files modified
src/com/zorba-xquery/www/modules/image/graphviz.xq.src/graphviz.cpp (+55/-58) src/com/zorba-xquery/www/modules/image/graphviz.xq.src/graphviz.h (+21/-32) |
To merge this branch: | bzr merge lp:~zorba-coders/zorba/image-module-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chris Hillery | Approve | ||
Matthias Brantner | Approve | ||
Review via email: mp+108746@code.launchpad.net |
Commit message
Fixing some errors (== vs. !=) as well as fixing throwErrorWithQName in graphviz.
Description of the change
Suggest fixing some errors (== vs. !=) as well as fixing throwErrorWithQName in graphviz, which crashed because it was looking for the QName in the dynamic context instead of just building it. Other parts of this module having a similar throwErrorWithQName implementation might need to be fixed too.
To post a comment you must log in.
Revision history for this message
Matthias Brantner (matthias-brantner) : | # |
review:
Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job image-module-
All tests succeeded!
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/com/zorba-xquery/www/modules/image/graphviz.xq.src/graphviz.cpp' |
2 | --- src/com/zorba-xquery/www/modules/image/graphviz.xq.src/graphviz.cpp 2012-03-10 01:09:45 +0000 |
3 | +++ src/com/zorba-xquery/www/modules/image/graphviz.xq.src/graphviz.cpp 2012-06-05 13:37:36 +0000 |
4 | @@ -57,12 +57,12 @@ |
5 | /****************************************************************************** |
6 | *****************************************************************************/ |
7 | std::string |
8 | -GraphvizFunction::getGraphvizTmpFileName(const zorba::DynamicContext* aDctx) { |
9 | +GraphvizFunction::getGraphvizTmpFileName(zorba::ItemFactory* aFactory) { |
10 | char lTmpDir[FILENAME_MAX]; |
11 | |
12 | if (!GetCurrentDir(lTmpDir, sizeof(lTmpDir))) |
13 | { |
14 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", "Test"); |
15 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", "Test"); |
16 | } |
17 | zorba::String test(lTmpDir); |
18 | std::ostringstream lTmpFileNameTemplate; |
19 | @@ -90,7 +90,7 @@ |
20 | while (lAttributes->next(attr)) { |
21 | Item lNodeName; |
22 | attr.getNodeName(lNodeName); |
23 | - if (lNodeName.getLocalName() != lIdQName.getLocalName()) { |
24 | + if (lNodeName.getLocalName() == lIdQName.getLocalName()) { |
25 | return true; |
26 | } |
27 | } |
28 | @@ -101,7 +101,7 @@ |
29 | /****************************************************************************** |
30 | *****************************************************************************/ |
31 | void |
32 | -GraphvizFunction::printTypeAndAttr(const zorba::DynamicContext* aDctx, |
33 | +GraphvizFunction::printTypeAndAttr( |
34 | ItemFactory* aFactory, |
35 | const Item& in, |
36 | std::fstream& os) |
37 | @@ -125,7 +125,7 @@ |
38 | if (lNodeName.getLocalName() != lAttrQName.getLocalName()) { |
39 | Item lNameAttr; |
40 | if (!getAttribute(aFactory, "name", lItem, lNameAttr)) { |
41 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", "GXL parse error: attr node does not have a name attribute"); |
42 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", "GXL parse error: attr node does not have a name attribute"); |
43 | } |
44 | |
45 | os << " \"" << lNameAttr.getStringValue() << "\"=\""; |
46 | @@ -152,7 +152,7 @@ |
47 | } else if (lNodeName.getStringValue() == lTypeQName.getStringValue()) { |
48 | Item lHRefAttr; |
49 | if (!getAttribute(aFactory, "href", lItem, lHRefAttr)) { |
50 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", "GXL parse error: type node does not have a href attribute"); |
51 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", "GXL parse error: type node does not have a href attribute"); |
52 | } |
53 | |
54 | os << " _gxl_type=\"" << lHRefAttr.getStringValue() << "\"" << std::endl; |
55 | @@ -163,19 +163,19 @@ |
56 | /****************************************************************************** |
57 | *****************************************************************************/ |
58 | void |
59 | -GraphvizFunction::visitNode(const zorba::DynamicContext* aDctx, |
60 | +GraphvizFunction::visitNode( |
61 | ItemFactory* aFactory, |
62 | const Item& in, std::fstream& os) |
63 | { |
64 | Item lItem; |
65 | if (!getAttribute(aFactory, "id", in, lItem)) { |
66 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", "GXL parse error: node does not have an id attribute"); |
67 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", "GXL parse error: node does not have an id attribute"); |
68 | } |
69 | |
70 | // start node with id attribute as name |
71 | os << " \"" << lItem.getStringValue() << "\" [ " << std::endl; |
72 | |
73 | - printTypeAndAttr(aDctx, aFactory, in, os); |
74 | + printTypeAndAttr(aFactory, in, os); |
75 | |
76 | // end of node |
77 | os << " ]" << std::endl; |
78 | @@ -185,7 +185,7 @@ |
79 | /****************************************************************************** |
80 | *****************************************************************************/ |
81 | void |
82 | -GraphvizFunction::visitEdge(const zorba::DynamicContext* aDctx, |
83 | +GraphvizFunction::visitEdge( |
84 | ItemFactory* aFactory, |
85 | const Item& in, std::fstream& os) |
86 | { |
87 | @@ -194,19 +194,19 @@ |
88 | Item lToAttr; |
89 | |
90 | if (!getAttribute(aFactory, "id", in, lIdAttr)) { |
91 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", "GXL parse error: edge does not have an 'id' attribute"); |
92 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", "GXL parse error: edge does not have an 'id' attribute"); |
93 | } |
94 | if (!getAttribute(aFactory, "to", in, lToAttr)) { |
95 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", "GXL parse error: edge does not have a 'to' attribute"); |
96 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", "GXL parse error: edge does not have a 'to' attribute"); |
97 | } |
98 | if (!getAttribute(aFactory, "from", in, lFromAttr)) { |
99 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", "GXL parse error: edge does not have a 'from' attribute"); |
100 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", "GXL parse error: edge does not have a 'from' attribute"); |
101 | } |
102 | |
103 | os << " \"" << lFromAttr.getStringValue() << "\" -> \"" << lToAttr.getStringValue() << "\" [ " << std::endl |
104 | << " _gxl_id=\"" << lIdAttr.getStringValue() << "\"" << std::endl; |
105 | |
106 | - printTypeAndAttr(aDctx,aFactory, in, os); |
107 | + printTypeAndAttr(aFactory, in, os); |
108 | |
109 | os << " ]" << std::endl; |
110 | } /* GraphvizFunction::visitEdge */ |
111 | @@ -214,7 +214,7 @@ |
112 | /****************************************************************************** |
113 | *****************************************************************************/ |
114 | void |
115 | -GraphvizFunction::printGraph(const zorba::DynamicContext* aDctx, |
116 | +GraphvizFunction::printGraph( |
117 | ItemFactory* aFactory, |
118 | const Item& in, std::fstream& os) |
119 | { |
120 | @@ -226,7 +226,7 @@ |
121 | // print the graph with all its children |
122 | Item lGraphId; |
123 | if (!getAttribute(aFactory, "id", in, lGraphId)) { |
124 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", "GXL parse error: edge does not have an 'id' attribute"); |
125 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", "GXL parse error: edge does not have an 'id' attribute"); |
126 | } |
127 | |
128 | os << "digraph \"" << lGraphId.getStringValue() << "\" {" << std::endl; |
129 | @@ -239,9 +239,9 @@ |
130 | Item lNodeName; |
131 | item.getNodeName(lNodeName); |
132 | if (lNodeName.getLocalName() == lNodeQName.getLocalName()) { |
133 | - visitNode(aDctx, aFactory, item, os); |
134 | + visitNode(aFactory, item, os); |
135 | } else if (lNodeName.getLocalName() == lEdgeQName.getLocalName()) { |
136 | - visitEdge(aDctx, aFactory, item, os); |
137 | + visitEdge(aFactory, item, os); |
138 | } |
139 | } |
140 | |
141 | @@ -251,7 +251,7 @@ |
142 | /****************************************************************************** |
143 | *****************************************************************************/ |
144 | void |
145 | -GraphvizFunction::gxl2dot(const zorba::DynamicContext* aDctx, |
146 | +GraphvizFunction::gxl2dot( |
147 | ItemFactory* aFactory, |
148 | const Item& in, std::fstream& os) |
149 | { |
150 | @@ -259,12 +259,12 @@ |
151 | Item lGraphQName = aFactory->createQName("", "", "graph"); |
152 | |
153 | if (!in.isNode()) { |
154 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", "GXL parse error: item is not a node"); |
155 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", "GXL parse error: item is not a node"); |
156 | } |
157 | |
158 | Item lNodeName; |
159 | in.getNodeName(lNodeName); |
160 | - if (lNodeName.getLocalName() == lGXLQName.getLocalName()) { |
161 | + if (lNodeName.getLocalName() != lGXLQName.getLocalName()) { |
162 | Item lNodeName; |
163 | in.getNodeName(lNodeName); |
164 | |
165 | @@ -272,7 +272,7 @@ |
166 | lErrorMsg << "GXL parse error: only element with name " |
167 | << lGXLQName.getStringValue() << " allowed (got " << lNodeName.getStringValue() |
168 | << ")."; |
169 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", lErrorMsg.str()); |
170 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", lErrorMsg.str()); |
171 | } |
172 | |
173 | Iterator_t lGraphs = in.getChildren(); |
174 | @@ -281,11 +281,11 @@ |
175 | Item lGraph; |
176 | while(lGraphs->next(lGraph)) { |
177 | if (!lGraph.isNode()) { |
178 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", "GXL parse error: item is not a node"); |
179 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", "GXL parse error: item is not a node"); |
180 | } |
181 | |
182 | lGraph.getNodeName(lNodeName); |
183 | - if (lNodeName.getLocalName() == lGraphQName.getLocalName()) { |
184 | + if (lNodeName.getLocalName() != lGraphQName.getLocalName()) { |
185 | std::ostringstream lErrorMsg; |
186 | Item lNodeName; |
187 | lGraph.getNodeName(lNodeName); |
188 | @@ -293,10 +293,10 @@ |
189 | lErrorMsg << "GXL parse error: only elements with name " |
190 | << lGraphQName.getStringValue() << " allowed (got " |
191 | << lNodeName.getLocalName() << ")."; |
192 | - GraphvizFunction::throwErrorWithQName(aDctx, "IM003", lErrorMsg.str()); |
193 | + GraphvizFunction::throwErrorWithQName(aFactory, "IM003", lErrorMsg.str()); |
194 | } |
195 | |
196 | - printGraph(aDctx, aFactory, lGraph, os); |
197 | + printGraph(aFactory, lGraph, os); |
198 | |
199 | } |
200 | |
201 | @@ -305,23 +305,21 @@ |
202 | /****************************************************************************** |
203 | *****************************************************************************/ |
204 | void |
205 | -GraphvizFunction::throwErrorWithQName (const DynamicContext* aDynamicContext, |
206 | +GraphvizFunction::throwErrorWithQName (ItemFactory* aFactory, |
207 | const String& aLocalName, |
208 | const String& aMessage) { |
209 | String lNamespace = "http://www.zorba-xquery.com/modules/image/error"; |
210 | - Item lQName; |
211 | - Iterator_t lDummyIterator; |
212 | - aDynamicContext->getVariable(lNamespace, aLocalName, lQName, lDummyIterator); |
213 | + Item lQName = aFactory->createQName(lNamespace, "", aLocalName); |
214 | throw USER_EXCEPTION(lQName, aMessage); |
215 | } |
216 | + |
217 | /****************************************************************************** |
218 | *****************************************************************************/ |
219 | -DotFunction::LazyDotSequence::LazyDotSequence(const DotFunction* aFunc, |
220 | - ItemSequence* aArg, |
221 | - const zorba::DynamicContext* aDctx) |
222 | +DotFunction::LazyDotSequence::LazyDotSequence( |
223 | + const DotFunction* aFunc, |
224 | + ItemSequence* aArg) |
225 | : theFunc(aFunc), |
226 | - theArg(aArg), |
227 | - theDctx(aDctx) |
228 | + theArg(aArg) |
229 | { |
230 | } |
231 | |
232 | @@ -360,7 +358,7 @@ |
233 | { |
234 | if(!is_open) |
235 | { |
236 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", "DotFunction::LazyDotSequence Iterator consumed without open"); |
237 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", "DotFunction::LazyDotSequence Iterator consumed without open"); |
238 | } |
239 | Item lItem; |
240 | Agraph_t *lGraph = 0; |
241 | @@ -378,18 +376,18 @@ |
242 | |
243 | lGraph = agmemread(const_cast<char*>(lGraphInput.c_str())); |
244 | if (!lGraph) { |
245 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", "could not read input"); |
246 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", "could not read input"); |
247 | } |
248 | |
249 | if ( gvLayout(lGvc, lGraph, const_cast<char*>("dot")) != 0 ) { |
250 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", "could not generate layout"); |
251 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", "could not generate layout"); |
252 | } |
253 | |
254 | - std::string lTmpFile = theItemSequence->theFunc->getGraphvizTmpFileName(theItemSequence->getDctx()); |
255 | + std::string lTmpFile = theItemSequence->theFunc->getGraphvizTmpFileName(theItemSequence->theFunc->theModule->getItemFactory()); |
256 | |
257 | if ( gvRenderFilename(lGvc, lGraph, const_cast<char*>("svg"), |
258 | const_cast<char*>(lTmpFile.c_str())) != 0 ) { |
259 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", "could not render graph"); |
260 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", "could not render graph"); |
261 | } |
262 | |
263 | lSVGFile.open(lTmpFile.c_str()); |
264 | @@ -397,7 +395,7 @@ |
265 | std::ostringstream lErrorMsg; |
266 | lErrorMsg << "could not read from file " |
267 | << lTmpFile.c_str(); |
268 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", lErrorMsg.str()); |
269 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", lErrorMsg.str()); |
270 | } |
271 | |
272 | aItem = Zorba::getInstance(0)->getXmlDataManager()->parseXML(lSVGFile); |
273 | @@ -456,7 +454,7 @@ |
274 | { |
275 | if(!is_open) |
276 | { |
277 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", "GxlFunction::LazyGxlSequence Iterator consumed without open"); |
278 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", "GxlFunction::LazyGxlSequence Iterator consumed without open"); |
279 | } |
280 | Item lItem; |
281 | Agraph_t *lGraph = 0; |
282 | @@ -471,42 +469,42 @@ |
283 | |
284 | try { |
285 | |
286 | - std::string lTmpFile = theItemSequence->theFunc->getGraphvizTmpFileName(theItemSequence->getDctx()); |
287 | + std::string lTmpFile = theItemSequence->theFunc->getGraphvizTmpFileName(theItemSequence->theFunc->theModule->getItemFactory()); |
288 | lSVGFile.open(lTmpFile.c_str(), |
289 | std::fstream::in | std::fstream::out | std::fstream::trunc); |
290 | |
291 | - gxl2dot(theItemSequence->getDctx(), theItemSequence->theFunc->theModule->getItemFactory(), lItem, lSVGFile); |
292 | + gxl2dot(theItemSequence->theFunc->theModule->getItemFactory(), lItem, lSVGFile); |
293 | lSVGFile.close(); |
294 | |
295 | lFile = fopen(lTmpFile.c_str(), "r"); |
296 | if (!lFile) { |
297 | std::ostringstream lErrorMsg; |
298 | lErrorMsg << "could not read from file " << lTmpFile.c_str(); |
299 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", lErrorMsg.str()); |
300 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", lErrorMsg.str()); |
301 | } |
302 | |
303 | lGraph = agread(lFile); |
304 | fclose(lFile); |
305 | |
306 | if (!lGraph) { |
307 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", "could not read input"); |
308 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", "could not read input"); |
309 | } |
310 | |
311 | int blub = gvLayout(lGvc, lGraph, const_cast<char*>("dot")); |
312 | if ( blub != 0 ) { |
313 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", "could not generate layout"); |
314 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", "could not generate layout"); |
315 | } |
316 | |
317 | if ( gvRenderFilename(lGvc, lGraph, const_cast<char*>("svg"), |
318 | const_cast<char*>(lTmpFile.c_str())) != 0 ) { |
319 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", "could not render graph"); |
320 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", "could not render graph"); |
321 | } |
322 | |
323 | lSVGFile.open(lTmpFile.c_str(), std::ifstream::in); |
324 | if (lSVGFile.bad()) { |
325 | std::ostringstream lErrorMsg; |
326 | lErrorMsg << "could not read from file " << lTmpFile.c_str(); |
327 | - GraphvizFunction::throwErrorWithQName(theItemSequence->getDctx(), "IM003", lErrorMsg.str()); |
328 | + GraphvizFunction::throwErrorWithQName(theItemSequence->theFunc->theModule->getItemFactory(), "IM003", lErrorMsg.str()); |
329 | } |
330 | |
331 | aItem = Zorba::getInstance(0)->getXmlDataManager()->parseXML(lSVGFile); |
332 | @@ -531,12 +529,11 @@ |
333 | |
334 | /****************************************************************************** |
335 | *****************************************************************************/ |
336 | -GxlFunction::LazyGxlSequence::LazyGxlSequence(const GxlFunction* aFunc, |
337 | - ItemSequence* aArg, |
338 | - const zorba::DynamicContext* aDctx) |
339 | +GxlFunction::LazyGxlSequence::LazyGxlSequence( |
340 | + const GxlFunction* aFunc, |
341 | + ItemSequence* aArg) |
342 | : theFunc(aFunc), |
343 | - theArg(aArg), |
344 | - theDctx(aDctx) |
345 | + theArg(aArg) |
346 | { |
347 | } |
348 | |
349 | @@ -546,9 +543,9 @@ |
350 | DotFunction::evaluate( |
351 | const Arguments_t& aArgs, |
352 | const zorba::StaticContext* aSctx, |
353 | - const zorba::DynamicContext* aDctx) const |
354 | + const zorba::DynamicContext *aDctx) const |
355 | { |
356 | - return ItemSequence_t(new LazyDotSequence(this, aArgs[0], aDctx)); |
357 | + return ItemSequence_t(new LazyDotSequence(this, aArgs[0])); |
358 | } /* DotFunction::evaluate */ |
359 | |
360 | /****************************************************************************** |
361 | @@ -557,9 +554,9 @@ |
362 | GxlFunction::evaluate( |
363 | const Arguments_t& aArgs, |
364 | const zorba::StaticContext* aSctx, |
365 | - const zorba::DynamicContext* aDctx) const |
366 | + const zorba::DynamicContext *aDctx) const |
367 | { |
368 | - return ItemSequence_t(new LazyGxlSequence(this, aArgs[0], aDctx)); |
369 | + return ItemSequence_t(new LazyGxlSequence(this, aArgs[0])); |
370 | } /* GxlFunction::evaluate */ |
371 | |
372 | /****************************************************************************** |
373 | |
374 | === modified file 'src/com/zorba-xquery/www/modules/image/graphviz.xq.src/graphviz.h' |
375 | --- src/com/zorba-xquery/www/modules/image/graphviz.xq.src/graphviz.h 2011-10-06 08:18:47 +0000 |
376 | +++ src/com/zorba-xquery/www/modules/image/graphviz.xq.src/graphviz.h 2012-06-05 13:37:36 +0000 |
377 | @@ -26,9 +26,11 @@ |
378 | |
379 | namespace zorba |
380 | { |
381 | - namespace graphvizmodule |
382 | - { |
383 | - class GraphvizModule; |
384 | +namespace graphvizmodule |
385 | +{ |
386 | + |
387 | +class GraphvizModule; |
388 | + |
389 | /****************************************************************************** |
390 | *****************************************************************************/ |
391 | class GraphvizFunction : public ContextualExternalFunction |
392 | @@ -40,7 +42,7 @@ |
393 | : theModule(aModule) {} |
394 | |
395 | static std::string |
396 | - getGraphvizTmpFileName(const zorba::DynamicContext* aDctx); |
397 | + getGraphvizTmpFileName(zorba::ItemFactory* aFactory); |
398 | |
399 | static bool |
400 | getAttribute(zorba::ItemFactory* aFactory, |
401 | @@ -49,33 +51,28 @@ |
402 | zorba::Item& attr); |
403 | |
404 | static void |
405 | - printTypeAndAttr(const zorba::DynamicContext* aDctx, |
406 | - zorba::ItemFactory* aFactory, |
407 | + printTypeAndAttr(zorba::ItemFactory* aFactory, |
408 | const zorba::Item& in, |
409 | std::fstream& os); |
410 | |
411 | static void |
412 | - visitNode(const zorba::DynamicContext* aDctx, |
413 | - zorba::ItemFactory* aFactory, |
414 | - const zorba::Item& in, std::fstream& os); |
415 | - |
416 | - static void |
417 | - visitEdge(const zorba::DynamicContext* aDctx, |
418 | - zorba::ItemFactory* aFactory, |
419 | - const zorba::Item& in, std::fstream& os); |
420 | - |
421 | - static void |
422 | - printGraph(const zorba::DynamicContext* aDctx, |
423 | - zorba::ItemFactory* aFactory, |
424 | + visitNode(zorba::ItemFactory* aFactory, |
425 | + const zorba::Item& in, std::fstream& os); |
426 | + |
427 | + static void |
428 | + visitEdge(zorba::ItemFactory* aFactory, |
429 | + const zorba::Item& in, std::fstream& os); |
430 | + |
431 | + static void |
432 | + printGraph(zorba::ItemFactory* aFactory, |
433 | const zorba::Item& in, std::fstream& os); |
434 | |
435 | static void |
436 | - gxl2dot(const zorba::DynamicContext* aDctx, |
437 | - zorba::ItemFactory* aFactory, |
438 | + gxl2dot(zorba::ItemFactory* aFactory, |
439 | const zorba::Item& in, std::fstream& os); |
440 | |
441 | static void |
442 | - throwErrorWithQName (const DynamicContext* aDynamicContext, |
443 | + throwErrorWithQName (zorba::ItemFactory* aFactory, |
444 | const String& aLocalName, |
445 | const String& aMessage); |
446 | |
447 | @@ -122,17 +119,13 @@ |
448 | }; |
449 | public: |
450 | LazyDotSequence(const DotFunction*, |
451 | - ItemSequence* aArg, |
452 | - const zorba::DynamicContext* aDctx); |
453 | + ItemSequence* aArg); |
454 | |
455 | virtual Iterator_t getIterator(); |
456 | |
457 | - const zorba::DynamicContext* getDctx() {return theDctx;}; |
458 | - |
459 | protected: |
460 | const DotFunction* theFunc; |
461 | ItemSequence* theArg; |
462 | - const zorba::DynamicContext* theDctx; |
463 | }; |
464 | }; |
465 | |
466 | @@ -173,17 +166,13 @@ |
467 | }; |
468 | public: |
469 | LazyGxlSequence(const GxlFunction*, |
470 | - ItemSequence* aArg, |
471 | - const zorba::DynamicContext* aDctx); |
472 | + ItemSequence* aArg); |
473 | |
474 | Iterator_t getIterator(); |
475 | |
476 | - const zorba::DynamicContext* getDctx() {return theDctx;}; |
477 | - |
478 | protected: |
479 | const GxlFunction* theFunc; |
480 | ItemSequence* theArg; |
481 | - const zorba::DynamicContext* theDctx; |
482 | }; |
483 | }; |
484 | |
485 | @@ -239,7 +228,7 @@ |
486 | } |
487 | }; |
488 | |
489 | - } /* namespace zorba */ |
490 | +} /* namespace zorba */ |
491 | } /* namespace graphvizmodule */ |
492 | |
493 | #endif |
Changes look fine. I wish we didn't have hard-coded English error messages, but that's a different problem.
This merge proposal will need a commit message to go through the queue.