~zorba-coders/zorba/feature-setvar-typed--graphviz

« back to all changes in this revision

Viewing changes to src/com/zorba-xquery/www/modules/image/graphviz.xq.src/graphviz.h

  • Committer: Tarmac
  • Author(s): Ghislain Fourny
  • Date: 2012-06-21 12:23:53 UTC
  • mfrom: (47.1.1 image-module)
  • Revision ID: tarmac-20120621122353-ldn6d069zbvixnta
Fixing some errors (== vs. !=) as well as fixing throwErrorWithQName in graphviz. Approved: Chris Hillery, Matthias Brantner

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
namespace zorba
28
28
{
29
 
  namespace graphvizmodule
30
 
  {
31
 
    class GraphvizModule;
 
29
namespace graphvizmodule
 
30
{
 
31
 
 
32
class GraphvizModule;
 
33
 
32
34
/******************************************************************************
33
35
 *****************************************************************************/
34
36
class GraphvizFunction : public ContextualExternalFunction
40
42
    : theModule(aModule) {}
41
43
 
42
44
    static std::string
43
 
    getGraphvizTmpFileName(const zorba::DynamicContext*  aDctx);
 
45
    getGraphvizTmpFileName(zorba::ItemFactory* aFactory);
44
46
 
45
47
    static bool
46
48
    getAttribute(zorba::ItemFactory* aFactory,
49
51
        zorba::Item& attr);
50
52
 
51
53
    static void
52
 
    printTypeAndAttr(const zorba::DynamicContext*  aDctx,
53
 
                     zorba::ItemFactory* aFactory,
 
54
    printTypeAndAttr(zorba::ItemFactory* aFactory,
54
55
                     const zorba::Item& in,
55
56
                     std::fstream& os);
56
57
 
57
58
    static void
58
 
    visitNode(const zorba::DynamicContext*  aDctx,
59
 
              zorba::ItemFactory* aFactory,
60
 
              const zorba::Item& in, std::fstream& os);
61
 
 
62
 
    static void
63
 
    visitEdge(const zorba::DynamicContext*  aDctx,
64
 
              zorba::ItemFactory* aFactory,
65
 
              const zorba::Item& in, std::fstream& os);
66
 
 
67
 
    static void
68
 
    printGraph(const zorba::DynamicContext*  aDctx,
69
 
               zorba::ItemFactory* aFactory,
 
59
    visitNode(zorba::ItemFactory* aFactory,
 
60
              const zorba::Item& in, std::fstream& os);
 
61
 
 
62
    static void
 
63
    visitEdge(zorba::ItemFactory* aFactory,
 
64
              const zorba::Item& in, std::fstream& os);
 
65
 
 
66
    static void
 
67
    printGraph(zorba::ItemFactory* aFactory,
70
68
               const zorba::Item& in, std::fstream& os);
71
69
 
72
70
    static void
73
 
    gxl2dot(const zorba::DynamicContext*  aDctx,
74
 
            zorba::ItemFactory* aFactory,
 
71
    gxl2dot(zorba::ItemFactory* aFactory,
75
72
            const zorba::Item& in, std::fstream& os);
76
73
 
77
74
    static void
78
 
    throwErrorWithQName (const DynamicContext* aDynamicContext,
 
75
    throwErrorWithQName (zorba::ItemFactory* aFactory,
79
76
                         const String& aLocalName,
80
77
                         const String& aMessage);
81
78
 
122
119
    };
123
120
    public:
124
121
      LazyDotSequence(const DotFunction*,
125
 
                      ItemSequence* aArg,
126
 
                      const zorba::DynamicContext*  aDctx);
 
122
                      ItemSequence* aArg);
127
123
 
128
124
      virtual Iterator_t    getIterator();
129
125
 
130
 
      const zorba::DynamicContext* getDctx() {return theDctx;};
131
 
 
132
126
    protected:
133
127
      const DotFunction*            theFunc;
134
128
      ItemSequence*                 theArg;
135
 
      const zorba::DynamicContext*  theDctx;
136
129
  };
137
130
};
138
131
 
173
166
    };
174
167
    public:
175
168
      LazyGxlSequence(const GxlFunction*,
176
 
                      ItemSequence* aArg,
177
 
                      const zorba::DynamicContext*  aDctx);
 
169
                      ItemSequence* aArg);
178
170
 
179
171
      Iterator_t  getIterator();
180
172
 
181
 
      const zorba::DynamicContext* getDctx() {return theDctx;};
182
 
 
183
173
    protected:
184
174
      const GxlFunction*            theFunc;
185
175
      ItemSequence*                 theArg;
186
 
      const zorba::DynamicContext*  theDctx;
187
176
  };
188
177
};
189
178
 
239
228
  }
240
229
};
241
230
 
242
 
  } /* namespace zorba */
 
231
} /* namespace zorba */
243
232
} /* namespace graphvizmodule */
244
233
 
245
234
#endif