From e66e1480f40a782000c79c76815ac25a691b661d Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Mon, 8 Dec 2003 14:37:23 +0000 Subject: [PATCH] Essentially identical to the canonical ZOOM client listed on the ZOOM web-site's C++ Binding page. Apart from formatting tweaks, the only different is the use of the stupid "std::" prefix in front of all the strings, couts, etc. --- zoom/canonical.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 zoom/canonical.cpp diff --git a/zoom/canonical.cpp b/zoom/canonical.cpp new file mode 100644 index 0000000..940ae6a --- /dev/null +++ b/zoom/canonical.cpp @@ -0,0 +1,16 @@ +/* g++ -g -o canonical canonical.cpp -lyaz++ -lyaz -lxml2 */ + +#include +#include + +using namespace ZOOM; + +int main(int argc, char **argv) +{ + connection conn("z3950.loc.gov", 7090); + conn.option("databaseName", "Voyager"); + conn.option("preferredRecordSyntax", "USMARC"); + resultSet rs(conn, prefixQuery("@attr 1=7 0253333490")); + const record rec(rs, 0); + std::cout << rec.render() << std::endl; +} -- 1.7.10.4