1 // Z39.50 Query classes
7 query::query() : q(ZOOM_query_create()) {
10 ZOOM_query_destroy(q);
13 prefixQuery::prefixQuery(const std::string &pqn) {
14 if (ZOOM_query_prefix(q, pqn.c_str()) == -1) {
15 throw queryException(queryException::PREFIX, pqn);
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.
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.
34 prefixQuery::~prefixQuery() {
39 CCLQuery::CCLQuery(const std::string &, void *) {
40 throw "Oops. No CCL support in ZOOM-C yet. Sorry.";
43 CCLQuery::~CCLQuery() {
49 * c-file-style: "Stroustrup"
50 * indent-tabs-mode: nil
52 * vim: shiftwidth=4 tabstop=8 expandtab