Re: SQL parser ready to hook up to Dia



On Fri, 10 Aug 2001, Cyrille Chepelov wrote:

Le ven, aoû 10, 2001, à 08:54:01 -0700, Andrew Halper a écrit:

Many many segfaults and bus errors later, the SQL/92 parser I'm writing
for the SQL plug-in is ready to hook up to Dia.  I was wondering if
anyone could give me some tips on the recommended way to do this?  All
the import function needs to do is create UML classes for each SQL table
it parses.  Is calling umlclass_create() in objects/UML/class.c the
proper way to do this?  umlclass_create() is prototyped in the .c file,
so I think maybe it's not intended to be called directly?

Mmmhhh... You're probably better off using
      object_get_type("UML - class")->ops->create(....)
(with the proper checking on object_get_type()'s return left as an
exercise). This lets you avoid linking to class.c directly.

Also, your module is likely to set the properties of "this or that"
object (UML classes, certainly). I'm currently rewriting the StdProp
code, so that UML class and UML association become simple StdProp objects
[...]

One problem for importers is that there is no generic way to set the
coordinates of objects.  I hacked around it in the xfig import by calling
the handle move functions, but you can't really do polylines/polygons at
all.  We should use the userdata in CreateFunc functions, to the point
where you'd only ever need to use userdata and call property setters to
create any object.

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause) | Hårdgrim of Numenor
"I do not agree with a word that you say, but I    | Retainer of Sir Kegg
will defend to the death your right to say it."    |   of Westfield
    --Evelyn Beatrice Hall paraphrasing Voltaire   | Chaos Berserker of Khorne




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]