Remove throw()-specification comment from master header.
[yazpp-moved-to-github.git] / zoom / master-header
1 // $Header: /home/cvsroot/yaz++/zoom/master-header,v 1.3 2002-08-09 10:45:30 mike Exp $
2 //
3 // ZOOM C++ Binding.
4 // The ZOOM homepage is at http://zoom.z3950.org/
5 //
6 // Derived from version 1.0g at
7 //      http://zoom.z3950.org/bind/cplusplus/zoom-1.0g.hh
8
9 #include <stddef.h>             // for size_t
10
11 */*
12 * * This is a bit stupid.  The fact that our ZOOM-C++ implementation is
13 * * based on the ZOOM-C implementation is our Dirty Little Secret, and
14 * * there is in principle no reason why client code need be bothered
15 * * with it.  Except of course that the public class declarations in
16 * * C++ have to lay their private parts out for the world to see
17 * * (oo-er).  Hence the inclusion of <yaz/zoom.h>
18 * */
19 *#include <yaz/zoom.h>
20 *
21 namespace ZOOM {
22   // Forward declarations for type names.
23   class query;
24   class resultSet;
25   class record;
26
27   const char *option (const char *key);
28   const char *option (const char *key, const char *val);
29   int errcode ();
30   char *errmsg ();
31   char *addinfo ();
32
33   class connection {
34 *   ZOOM_connection c;
35   public:
36     connection (const char *hostname, int portnum);
37     ~connection ();
38     const char *option (const char *key) const;
39     const char *option (const char *key, const char *val);
40 *   ZOOM_connection _getYazConnection () const { return c; } // package-private
41   };
42
43   class query {
44       // pure virtual class: derive concrete subclasses from it.
45 * protected:
46 *   ZOOM_query q;
47   public:
48     virtual ~query ();
49 *   ZOOM_query _getYazQuery () const { return q; } // package-private
50   };
51
52   class prefixQuery : public query {
53   public:
54     prefixQuery (const char *pqn);
55     ~prefixQuery ();
56   };
57
58   class CCLQuery : public query {
59   public:
60     CCLQuery (const char *ccl, void *qualset);
61     ~CCLQuery ();
62   };
63
64   class resultSet {
65 *   connection &owner;
66 *   ZOOM_resultset rs;
67   public:
68     resultSet (connection &c, const query &q);
69     ~resultSet ();
70     const char *option (const char *key) const;
71     const char *option (const char *key, const char *val);
72     size_t size () const;
73     const record *getRecord (size_t i) const;
74   };
75
76   class record {
77 *   const resultSet *owner;
78 *   ZOOM_record r;
79   public:
80 *   record::record (const resultSet *rs, ZOOM_record rec):
81 *       owner (rs), r (rec) {}
82     ~record ();
83     enum syntax {
84       UNKNOWN, GRS1, SUTRS, USMARC, UKMARC, XML
85     };
86     record *clone () const;
87     syntax recsyn () const;
88     const char *render () const;
89     const char *rawdata () const;
90   };
91
92   class exception {
93 * protected:
94 *   int code;
95   public:
96     exception (int code);
97     int errcode () const;
98     const char *errmsg () const;
99   };
100
101   class systemException: public exception {
102   public:
103     systemException ();
104     int errcode () const;
105     const char *errmsg () const;
106   };
107
108   class bib1Exception: public exception {
109 *   const char *info;
110   public:
111 *   ~bib1Exception ();
112     bib1Exception (int errcode, const char *addinfo);
113     int errcode () const;
114     const char *errmsg () const;
115     const char *addinfo () const;
116   };
117
118   class queryException: public exception {
119 *   const char *q;
120   public:
121 *   ~queryException ();
122     static const int PREFIX = 1;
123     static const int CCL = 2;
124     queryException (int qtype, const char *source);
125     int errcode () const;
126     const char *errmsg () const;
127     const char *addinfo () const;
128   };
129 }