From: Mike Taylor Date: Thu, 10 Oct 2002 22:47:51 +0000 (+0000) Subject: Move "secret methods" into "private:" part of classes, X-Git-Tag: YAZPP.0.5~48 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=020de855bf3592a675caa3bc3e43c337b146b339;p=yazpp-moved-to-github.git Move "secret methods" into "private:" part of classes, and add "friend" declarations (ugh!) to make them visible. --- diff --git a/zoom/master-header b/zoom/master-header index 4e331f9..7d004f4 100644 --- a/zoom/master-header +++ b/zoom/master-header @@ -1,4 +1,4 @@ -// $Header: /home/cvsroot/yaz++/zoom/master-header,v 1.3 2002-08-09 10:45:30 mike Exp $ +// $Header: /home/cvsroot/yaz++/zoom/master-header,v 1.4 2002-10-10 22:47:51 mike Exp $ // // ZOOM C++ Binding. // The ZOOM homepage is at http://zoom.z3950.org/ @@ -32,21 +32,23 @@ namespace ZOOM { class 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); ~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 { @@ -76,9 +78,10 @@ namespace ZOOM { class 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