1 // Z39.50 Result Set class
7 resultSet::resultSet(connection &c, const query &q) : owner(c) {
8 ZOOM_connection yazc = c._getYazConnection();
9 rs = ZOOM_connection_search(yazc, q._getYazQuery());
11 const char *errmsg; // unused: carries same info as `errcode'
14 if ((errcode = ZOOM_connection_error(yazc, &errmsg, &addinfo)) != 0) {
15 ZOOM_resultset_destroy(rs);
16 throw bib1Exception(errcode, addinfo);
20 resultSet::~resultSet() {
21 ZOOM_resultset_destroy(rs);
24 std::string resultSet::option(const std::string &key) const {
25 return ZOOM_resultset_option_get(rs, key.c_str());
28 bool resultSet::option(const std::string &key, const std::string &val) {
29 ZOOM_resultset_option_set(rs, key.c_str(), val.c_str());
33 size_t resultSet::size() const {
34 return ZOOM_resultset_size(rs);
40 * c-file-style: "Stroustrup"
41 * indent-tabs-mode: nil
43 * vim: shiftwidth=4 tabstop=8 expandtab