Updated footer comment
[yazpp-moved-to-github.git] / zoom / zquery.cpp
1 // $Header: /home/cvsroot/yaz++/zoom/zquery.cpp,v 1.7 2005-06-25 15:53:21 adam Exp $
2
3 // Z39.50 Query classes
4
5 #include "zoom.h"
6
7
8 namespace ZOOM {
9     query::query() : q(ZOOM_query_create()) {
10     }
11     query::~query() {
12         ZOOM_query_destroy(q);
13     }
14
15     prefixQuery::prefixQuery(const std::string &pqn) {
16         if (ZOOM_query_prefix(q, pqn.c_str()) == -1) {
17             throw queryException(queryException::PREFIX, pqn);
18         }
19     }
20
21     // The binding specification says we have to have destructors for
22     // the query subclasses, so in they go -- even though they don't
23     // actually _do_ anything that inheriting the base query type's
24     // destructor wouldn't do.  It's an irritant of C++ that the
25     // declaration of a subclass has to express explicitly the
26     // implementation detail of whether destruction is implemented
27     // by a specific destructor or by inheritance.  Oh well.
28     //
29     // ### Not sure whether I need to do nothing at all, and the
30     // superclass destructor gets called anyway (I think that only
31     // works when you _don't_ define a destructor so that the default
32     // one pertains) or whether I need to duplicate the functionality
33     // of that destructor.  Let's play safe by assuming the latter and
34     // zeroing what we free so that we get bitten if we're wrong.
35     //
36     prefixQuery::~prefixQuery() {
37     }
38
39
40
41     CCLQuery::CCLQuery(const std::string &, void *) {
42         throw "Oops.  No CCL support in ZOOM-C yet.  Sorry.";
43     }
44
45     CCLQuery::~CCLQuery() {
46     }
47 }
48 /*
49  * Local variables:
50  * c-basic-offset: 4
51  * c-file-style: "Stroustrup"
52  * indent-tabs-mode: nil
53  * End:
54  * vim: shiftwidth=4 tabstop=8 expandtab
55  */
56