Re: SQL parser ready to hook up to Dia



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 -- please see my
recent announce post. One interesting effect is that you'll be able to *NOT*
know what the internal structure of UML - Class (or whatever) is doing.
What you'll be able to do is just pass a list of property values, and call
        class_object->ops->set_props(class_object,props). 
This is what xfig and dxf are already doing ; unfortunately, my rewrite
completely changes the interface to do this (struct Property and the ways to
access its data members changes).... I expect it to be committed, or at
least in a visible and useable state by monday (the version I posted does
not work -- I've fixed a few bugs since, and I can now proudly announce that
it loads all samples and passes running under Electric Fence -- but I must
fix the plug-ins ASAP so you can see how they do. And of course, I must use
the shiny new "nested array" property types to let you modify the Class
object through the StdProp interface).

        -- Cyrille

-- 
Grumpf.





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