C++ Binding: changes for version 1.3b
25th November 2002
The following changes were made between versions
1.3a
and
1.3b
of the ZOOM C++ binding:
General Changes
- Change char* to std::string everywhere:
string objects are passed by reference when used as a method
argument, are are non-const when returned from a
method. Accordingly, add #include <string>
- Change the return-type of all option-setting methods to a
bool, indicating whether or not the option was
recognised and therefore accepted.
- This anticipates a forthcoming change to the ZOOM
Abstract API.
- Add some new comments, and clarify some existing ones.
Specific Changes
- Remove the global option() functions.
- Add a private copy-constructor and assignment operator to the
connection class, thereby making connections
uncopyable.
- Add a default (no arguments) connection constructor
which does not forge a network connection; accordingly, add a
new connect() method, so that the connection may be
forged after options have been set - for example, to allow
server authentication parameters to be specified.
- This anticipates a forthcoming change to the ZOOM
Abstract API.
- Add a private copy-constructor and assignment operator to the
resultSet class, thereby making result sets
uncopyable.
- Remove getRecord() from the resultSet class:
records are now retrieved by the record class's
constructor.
- Remove the clone() method from the record
class. It was a wart that afforded some opportunity for
optimisation; but clever reference-counting and suchlike will
do that transparently.
- Promote the record::syntax enumeration to a class:
methods are provided to translate between the enumeration
(enum value) and the record syntax name strings that
must be passed into option().
- Make the errcode() and errmsg() methods
virtual in exception, as they should always have
been; add a virtual destructor; remove the redundant
redeclarations of the errmsg() method from the
systemException and bib1Exception classes.
- Add an extra systemException constructor with an
explicit int code argument; the old one, which uses
the value of the system errno, is also retained.
- Change the name of the bib1Exception constructor's
int argument from errcode to code,
for consistency with other exception classes.