Essentially identical to the canonical ZOOM client listed on the
authorMike Taylor <mike@indexdata.com>
Mon, 8 Dec 2003 14:37:23 +0000 (14:37 +0000)
committerMike Taylor <mike@indexdata.com>
Mon, 8 Dec 2003 14:37:23 +0000 (14:37 +0000)
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 [new file with mode: 0644]

diff --git a/zoom/canonical.cpp b/zoom/canonical.cpp
new file mode 100644 (file)
index 0000000..940ae6a
--- /dev/null
@@ -0,0 +1,16 @@
+/* g++ -g -o canonical canonical.cpp -lyaz++ -lyaz -lxml2 */
+
+#include <iostream>
+#include <yaz++/zoom.h>
+
+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;
+}