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