X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=zoom%2Fmaster-header;h=09a6b70df5324ca9be34d58e6db6e406db1b4560;hb=1e60b3fc076789fcfb65c936f83f25a2a09fc835;hp=c573e33f1522b84a1247311b222594fa7899d5ab;hpb=8e0f7888835eb1a84882b440209ec125ce5856c1;p=yazpp-moved-to-github.git diff --git a/zoom/master-header b/zoom/master-header index c573e33..09a6b70 100644 --- a/zoom/master-header +++ b/zoom/master-header @@ -1,4 +1,4 @@ -// $Header: /home/cvsroot/yaz++/zoom/master-header,v 1.1 2002-08-08 13:31:54 mike Exp $ +// $Header: /home/cvsroot/yaz++/zoom/master-header,v 1.7 2002-11-04 23:08:49 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::error)'' 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(); + ~prefixQuery (); }; - class CCLQuery : public query { + class YAZ_EXPORT CCLQuery : public query { public: CCLQuery (const char *ccl, void *qualset); - ~CCLQuery(); + ~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; +* friend class resultSet; // so it can use this constructor +* record::record (const resultSet *rs, ZOOM_record rec): +* owner (rs), r (rec) {} public: -* record::record(const resultSet *rs, ZOOM_record rec): -* owner(rs), r(rec) {} ~record (); enum syntax { UNKNOWN, GRS1, SUTRS, USMARC, UKMARC, XML @@ -91,39 +92,41 @@ namespace ZOOM { const char *rawdata () const; }; - class error { + class YAZ_EXPORT exception { * protected: * int code; public: - error (int code); + exception (int code); int errcode () const; const char *errmsg () const; }; - class systemError: public error { + class YAZ_EXPORT systemException: public exception { public: - systemError (); + systemException (); int errcode () const; const char *errmsg () const; }; - class bib1Error: public error { + class YAZ_EXPORT bib1Exception: public exception { * const char *info; public: -* ~bib1Error(); - bib1Error (int errcode, const char *addinfo); +* ~bib1Exception (); + bib1Exception (int errcode, const char *addinfo); int errcode () const; const char *errmsg () const; const char *addinfo () const; }; - class queryError: public error { + class YAZ_EXPORT queryException: public exception { * const char *q; public: -* ~queryError(); - static const int PREFIX = 1; - static const int CCL = 2; - queryError (int qtype, const char *source); +* ~queryException (); + enum { + PREFIX = 1, + CCL = 2 + }; + queryException (int qtype, const char *source); int errcode () const; const char *errmsg () const; const char *addinfo () const;