X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=include%2Fyaz%2B%2B%2Fz-query.h;h=6e762b147f844c2aaf322fd1037cf66f964c842c;hb=76d66b222afff97cf367a3e7b8bfe045a62d0d57;hp=336776958bda0acda402fa83fc190243e6f8e528;hpb=02873e733a979cc98c13b24c934a8082adf27812;p=yazpp-moved-to-github.git diff --git a/include/yaz++/z-query.h b/include/yaz++/z-query.h index 3367769..6e762b1 100644 --- a/include/yaz++/z-query.h +++ b/include/yaz++/z-query.h @@ -1,13 +1,17 @@ /* - * Copyright (c) 1998-2000, Index Data. + * Copyright (c) 1998-2005, Index Data. * See the file LICENSE for details. * - * $Id: z-query.h,v 1.3 2003-10-03 13:01:42 adam Exp $ + * $Id: z-query.h,v 1.8 2006-03-28 19:51:38 adam Exp $ */ +#ifndef YAZPP_Z_QUERY_INCLUDED +#define YAZPP_Z_QUERY_INCLUDED + #include #include +namespace yazpp_1 { /** Z39.50 Query RPN, etc. */ @@ -27,14 +31,25 @@ class YAZ_EXPORT Yaz_Z_Query : public Yaz_Query { void print(char *str, int len); /// match query int match(Yaz_Z_Query *other); + /// Copy + Yaz_Z_Query &operator=(const Yaz_Z_Query &); + /// Assign RPN string to it + Yaz_Z_Query& operator=(const char *rpn); private: char *m_buf; int m_len; ODR odr_decode; ODR odr_encode; ODR odr_print; - void oid2str(Odr_oid *o, WRBUF buf); - int rpn2pquery(Z_RPNStructure *s, WRBUF buf); WRBUF zquery2pquery(Z_Query *q); - void pr_term(WRBUF wbuf, char *buf, int len); }; +}; +#endif +/* + * Local variables: + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim: shiftwidth=4 tabstop=8 expandtab + */ +