C++ Binding: changes for version 1.0g

22nd November 2001

The following changes were made between versions 1.0f and 1.0g of the ZOOM C++ binding:

  1. Removed the data class.
  2. Removed the search() method from the connection, despite what it says in section 3.2.4 of the Abstract API - see below for a rationale.
  3. Removed the ``no public constructor'' comment from the resultSet class, and ...
  4. Added a public constructor to the resultSet class, replacing connection::search() - again, see below.
  5. Renamed the size_t num argument of the resultSet class's record() method to i.
  6. Removed the friend class connection declaration from the resultSet class (hurrah!)
  7. Removed the ``abstract base class'' comment from the record class, on the assumption that programmers will work that out from all the virtual foo() = 0 declarations!
  8. Changed the rawdata() method of the record class to return const char* instead of a data object.
  9. Removed the ``abstract base class'' comment from the error class.

Discussion

data class removed

The data class has been removed completely - and, by implication, so have all its subclasses. We felt that the complexity of having a data subclass hierarchy parallel to the record subclass hierarchy was too much, given that the sole purpose of data objects was to have something on which to invoke record syntax-specific data-related methods which can in fact be defined on the record syntax-specific record subclasses instead.

The rawdata() method now really does return the raw data of the record where that's available. For some record syntaxes - SUTRS, XML, the various MARC formats - this is very useful. For others, notably GRS-1, it's not very useful, and implementations should feel free just to return a null pointer from GRS1Record::rawdata().

Searching now done with resultSet constructor

The search() method has been removed from the connection class, and replaced by an explicit public constructor for resultSets. This constructor should be understood as standing in for the search() method: it is the way of doing searches.

However, in C++ it turns out that it's more convenient for searching to be done by a constructor for several reasons:

Feedback to <mike@indexdata.com> is welcome!