* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: cql2rpn.h,v 1.1 2006-03-29 13:14:15 adam Exp $
+ * $Id: cql2rpn.h,v 1.2 2007-01-12 10:09:25 adam Exp $
*/
#include <yaz/cql.h>
Yaz_cql2rpn();
~Yaz_cql2rpn();
void set_pqf_file(const char *fname);
+ bool parse_spec_file(const char *fname, int *error);
int query_transform(const char *cql, Z_RPNQuery **rpnquery, ODR o,
char **addinfop);
private:
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-cql2rpn.cpp,v 1.10 2006-09-11 23:06:28 adam Exp $
+ * $Id: yaz-cql2rpn.cpp,v 1.11 2007-01-12 10:09:25 adam Exp $
*/
#include <yaz/log.h>
m_transform = cql_transform_open_fname(fname);
}
+
+bool Yaz_cql2rpn::parse_spec_file(const char *fname, int *error)
+{
+ *error = 0;
+ cql_transform_close(m_transform);
+ m_transform = cql_transform_open_fname(fname);
+ return m_transform ? true : false;
+}
+
int Yaz_cql2rpn::query_transform(const char *cql_query,
Z_RPNQuery **rpnquery, ODR o,
char **addinfop)