[vtk-developers] Re: vtkSQLDatabase

David C Thompson dcthomp at sandia.gov
Tue Nov 27 19:57:14 EST 2007


Andy Wilson wrote:
> On 11/27/07 5:22 PM, "David C Thompson" <dcthomp at sandia.gov> wrote:
> > 1. Adding a URL parser to the vtkSQLDatabase class?
> 
> I don't mind having such a function available.  Should the method that does
> the heavy lifting (static void ParseURL) go in vtkSQLDatabase or is there a
> more suitable home for it?  Offhand I don't see an appropriate class for it
> (there are XMLUtilities, TimePointUtility, FreeTypeUtilities, but no
> StringUtilities).
The closest thing there is Utilities/kwsys/SystemTools.hxx.in. Since
ParseURL would only use the kwsys/RegularExpression class perhaps it
belongs in kwsys?

> > 2. Adding enums to represent the various basic column storage types?
> >    This is an area where SQL implementations vary significantly.
> 
> I think this is a good idea modulo wrapping concerns (see below).

I don't see any advantage that #define statements have over enums as far
as wrapping -- with the proper "//BTX ... //ETX" both get ignored by the
wrapper generate and anyone using Tcl, Python, etc. must have knowledge
of their values to use them. The only exceptions appear to be some
hand-coded values for the Python wrappers.

> ...
> > 4. Adding a uniform interface for creating and dropping databases
> >    and tables? 
> 
> This sounds useful as well.  My biggest concern with this and with #2 is how
> it will interact with wrapping.  Whatever the interface ends up looking
> like, it needs to work in Python, Tcl and Java as well as C++.

The only method that could not be easily wrapped is the creation of
tables. Shy of making each structure (column, index, trigger, table) a
full-blown descendant of vtkObject, I don't see a way to make
CreateTable() wrappable. That seems rather heavy to me.

	David




More information about the vtk-developers mailing list