Remove vacuous redeclarations and redefinitions of the errcode()
[yazpp-moved-to-github.git] / zoom / master-header
index a66b089..1424db8 100644 (file)
@@ -1,4 +1,4 @@
-// $Header: /home/cvsroot/yaz++/zoom/master-header,v 1.2 2002-08-08 16:06:08 mike Exp $
+// $Id: master-header,v 1.9 2002-11-12 22:43:56 mike Exp $
 //
 // ZOOM C++ Binding.
 // The ZOOM homepage is at http://zoom.z3950.org/
@@ -20,9 +20,9 @@
 *
 namespace ZOOM {
   // Forward declarations for type names.
-  class query;
-  class resultSet;
-  class record;
+  class YAZ_EXPORT query;
+  class YAZ_EXPORT resultSet;
+  class YAZ_EXPORT record;
 
   const char *option (const char *key);
   const char *option (const char *key, const char *val);
@@ -30,40 +30,40 @@ namespace ZOOM {
   char *errmsg ();
   char *addinfo ();
 
-  class connection {
+  class YAZ_EXPORT connection {
 *   ZOOM_connection c;
+*   friend class resultSet; // so it can use _getYazConnection()
+*   ZOOM_connection _getYazConnection () const { return c; }
   public:
     connection (const char *hostname, int portnum);
-    // ### I would like to add a ``throw (ZOOM::exception)'' clause
-    // here, but it looks like G++ 2.95.2 doesn't recognise it.
     ~connection ();
     const char *option (const char *key) const;
     const char *option (const char *key, const char *val);
-*   ZOOM_connection _getYazConnection () const { return c; } // package-private
   };
 
   class query {
       // pure virtual class: derive concrete subclasses from it.
+*   friend class resultSet; // so it can use _getYazQuery()
+*   ZOOM_query _getYazQuery () const { return q; }
 * protected:
 *   ZOOM_query q;
   public:
     virtual ~query ();
-*   ZOOM_query _getYazQuery () const { return q; } // package-private
   };
 
-  class prefixQuery : public query {
+  class YAZ_EXPORT prefixQuery : public query {
   public:
     prefixQuery (const char *pqn);
     ~prefixQuery ();
   };
 
-  class CCLQuery : public query {
+  class YAZ_EXPORT CCLQuery : public query {
   public:
     CCLQuery (const char *ccl, void *qualset);
     ~CCLQuery ();
   };
 
-  class resultSet {
+  class YAZ_EXPORT resultSet {
 *   connection &owner;
 *   ZOOM_resultset rs;
   public:
@@ -75,12 +75,13 @@ namespace ZOOM {
     const record *getRecord (size_t i) const;
   };
 
-  class record {
+  class YAZ_EXPORT record {
 *   const resultSet *owner;
 *   ZOOM_record r;
-  public:
+*   friend class resultSet; // so it can use this constructor
 *   record::record (const resultSet *rs, ZOOM_record rec):
 *      owner (rs), r (rec) {}
+  public:
     ~record ();
     enum syntax {
       UNKNOWN, GRS1, SUTRS, USMARC, UKMARC, XML
@@ -91,7 +92,7 @@ namespace ZOOM {
     const char *rawdata () const;
   };
 
-  class exception {
+  class YAZ_EXPORT exception {
 * protected:
 *   int code;
   public:
@@ -100,31 +101,30 @@ namespace ZOOM {
     const char *errmsg () const;
   };
 
-  class systemException: public exception {
+  class YAZ_EXPORT systemException: public exception {
   public:
     systemException ();
-    int errcode () const;
     const char *errmsg () const;
   };
 
-  class bib1Exception: public exception {
+  class YAZ_EXPORT bib1Exception: public exception {
 *   const char *info;
   public:
 *   ~bib1Exception ();
     bib1Exception (int errcode, const char *addinfo);
-    int errcode () const;
     const char *errmsg () const;
     const char *addinfo () const;
   };
 
-  class queryException: public exception {
+  class YAZ_EXPORT queryException: public exception {
 *   const char *q;
   public:
 *   ~queryException ();
-    static const int PREFIX = 1;
-    static const int CCL = 2;
+    enum {
+     PREFIX = 1,
+     CCL = 2
+    };
     queryException (int qtype, const char *source);
-    int errcode () const;
     const char *errmsg () const;
     const char *addinfo () const;
   };