1 // $Header: /home/cvsroot/yaz++/zoom/zquery.cpp,v 1.3 2002-10-09 09:07:10 mike Exp $
3 // Z39.50 Query classes
10 ZOOM_query_destroy(q);
16 prefixQuery::prefixQuery(const char *pqn) {
17 q = ZOOM_query_create();
18 if (ZOOM_query_prefix(q, pqn) == -1) {
19 ZOOM_query_destroy(q);
20 throw queryException(queryException::PREFIX, pqn);
24 // The binding specification says we have to have destructors for
25 // the query subclasses, so in they go -- even though they don't
26 // actually _do_ anything that inheriting the base query type's
27 // destructor wouldn't do. It's an irritant of C++ that the
28 // declaration of a subclass has to express explicitly the
29 // implementation detail of whether destruction is implemented
30 // by a specific destructor or by inheritance. Oh well.
32 // ### Not sure whether I need to do nothing at all, and the
33 // superclass destructor gets called anyway (I think that only
34 // works when you _don't_ define a destructor so that the default
35 // one pertains) or whether I need to duplicate the functionality
36 // of that destructor. Let's play safe by assuming the latter and
37 // zeroing what we free so that we get bitten if we're wrong.
39 prefixQuery::~prefixQuery() {
40 ZOOM_query_destroy(q);
46 CCLQuery::CCLQuery(const char *ccl, void *qualset) {
47 throw "Oops. No CCL support in ZOOM-C yet. Sorry.";
50 CCLQuery::~CCLQuery() {
51 ZOOM_query_destroy(q);