<chapter id="zoom">
- <!-- $Id: zoom.xml,v 1.3 2002-10-09 09:07:10 mike Exp $ -->
+ <!-- $Id: zoom.xml,v 1.4 2002-10-09 11:44:44 mike Exp $ -->
<title>ZOOM-C++</title>
<sect1 id="zoom.introduction">
<!-- ### there must be a better way to mark up a book title? -->
<emphasis>The Complete Dinosaur</emphasis>
from the Library of Congress's Z39.50 server:
- <screen>
+ </para>
+ <synopsis>
#include <iostream>
#include <yaz++/zoom.h>
const record *rec = rs.getRecord(0);
cout << rec->render() << endl;
}
- </screen>
+ </synopsis>
+ <para>
(Note that, for the sake of simplicity, this does not check for
errors: we show a more realistic version of this program later.)
</para>
</para>
<para>
The class has this declaration:
- <screen>
+ </para>
+ <synopsis>
class connection {
public:
connection (const char *hostname, int portnum);
const char *option (const char *key) const;
const char *option (const char *key, const char *val);
};
- </screen>
- </para>
+ </synopsis>
<para>
### discusson
</para>
<title><literal>ZOOM::prefixQuery</literal></title>
<para>
The class has this declaration:
- <screen>
+ </para>
+ <synopsis>
class prefixQuery : public query {
public:
prefixQuery (const char *pqn);
~prefixQuery ();
};
- </screen>
- </para>
+ </synopsis>
</sect2>
<sect2>
<title><literal>ZOOM::CCLQuery</literal></title>
<para>
The class has this declaration:
- <screen>
+ </para>
+ <synopsis>
class CCLQuery : public query {
public:
CCLQuery (const char *ccl, void *qualset);
~CCLQuery ();
};
- </screen>
- </para>
+ </synopsis>
</sect2>
<sect2>
</para>
<para>
The class has this declaration:
- <screen>
+ </para>
+ <synopsis>
class resultSet {
public:
resultSet (connection &c, const query &q);
size_t size () const;
const record *getRecord (size_t i) const;
};
- </screen>
- </para>
+ </synopsis>
<para>
### discusson
</para>
</para>
<para>
The class has this declaration:
- <screen>
+ </para>
+ <synopsis>
class record {
public:
~record ();
const char *render () const;
const char *rawdata () const;
};
- </screen>
- </para>
+ </synopsis>
<para>
### discusson
</para>
The <literal>ZOOM::exception</literal> class is a virtual base
class, representing a diagnostic generated by the ZOOM-C++ library
or returned from a server. ###
- <screen>
+ </para>
+ <synopsis>
class exception {
public:
exception (int code);
int errcode () const;
const char *errmsg () const;
};
- </screen>
+ </synopsis>
+ <para>
This class has three (so far) concrete subclasses:
</para>
<title><literal>ZOOM::systemException</literal></title>
<para>
The class has this declaration:
- <screen>
+ </para>
+ <synopsis>
class systemException: public exception {
public:
systemException ();
int errcode () const;
const char *errmsg () const;
};
- </screen>
- </para>
+ </synopsis>
</sect2>
<sect2>
<title><literal>ZOOM::bib1Exception</literal></title>
<para>
The class has this declaration:
- <screen>
+ </para>
+ <synopsis>
class bib1Exception: public exception {
public:
bib1Exception (int errcode, const char *addinfo);
const char *errmsg () const;
const char *addinfo () const;
};
- </screen>
- </para>
+ </synopsis>
</sect2>
<sect2>
<title><literal>ZOOM::queryException</literal></title>
<para>
The class has this declaration:
- <screen>
+ </para>
+ <synopsis>
class queryException: public exception {
public:
static const int PREFIX = 1;
const char *errmsg () const;
const char *addinfo () const;
};
- </screen>
- </para>
+ </synopsis>
</sect2>
<sect2>