[ZOOM] C++ bindings

Heikki Levanto heikki at indexdata.dk
Thu Nov 1 12:46:41 CET 2001


I have just had my first look at the C++ bindings, after Adam suggested I'd
do so. Here are some first impressions:

There are problems with error handling. If I wish to make two connections,
both in their own threads, and both of them fail, how can I get the error
codes for them both?

Why do you have those fine error classes? Nobody seems to be using them?
Every class seems to have their own int errcode() and a corresponding

I do not see how I can pass options to a connection before connecting. I
need to pass authentication information and proxies to them. You don't mean
that I should use global options for that? What if I want to connect to two
different targets, using different passwords?

The available options are carefully undocumented here. That is all right,
but I want to have *some* way to get a list of them. How about a convention
that if you ask for the value of option named "", you get back a
comma-separated list of available options??

How do I actually get to the resulting data? The record class' method
rawdata() returns a pointer not to raw data, but to a virtual class which
may or may not have a method to actually get something out of it. If I want
to see the bytes that make up that MARC record, or what ever, how do I get
to it?

If I work with XML records, I suppose the spec parameter to record.field()
defines the tagpath I want to access. If that is the case, it should be
documented here. If not, something else should be documented.

Should there be a more generic MARC format (ISO-something?), so that we do
not have to define new classes for DANMARC and AFGHANI-MARC, and so on?

Generally, I think it would be useful to have a comment at the end of the
interface file with a simplified example of how to use it: connect. search,
get record, and do something with it. All in all I am disappointed at the
amount of comments in the file. Most of the comments I could see explained
what a virtual base class is. Not exactly Z39.50 specific stuff.

These are my first impressions, probably showing more faults in my
understanding than in the design in itself. 

Heikki Levanto            heikki at indexdata.dk            "In Murphy We Turst"

More information about the ZOOM mailing list