diff --git a/src/rcldb/searchdata.cpp b/src/rcldb/searchdata.cpp index 2cd646c3..1df4d867 100644 --- a/src/rcldb/searchdata.cpp +++ b/src/rcldb/searchdata.cpp @@ -1,5 +1,5 @@ #ifndef lint -static char rcsid[] = "@(#$Id: searchdata.cpp,v 1.25 2008-09-29 11:33:55 dockes Exp $ (C) 2006 J.F.Dockes"; +static char rcsid[] = "@(#$Id: searchdata.cpp,v 1.26 2008-10-14 07:50:13 dockes Exp $ (C) 2006 J.F.Dockes"; #endif /* * This program is free software; you can redistribute it and/or modify @@ -636,4 +636,11 @@ bool SearchDataClauseSub::toNativeQuery(Rcl::Db &db, void *p, const string&) return m_sub->toNativeQuery(db, p); } +bool SearchDataClauseSub::getTerms(vector& terms, + vector >& groups, + vector& gslks) const +{ + return m_sub.getconstptr()->getTerms(terms, groups, gslks); +} + } // Namespace Rcl diff --git a/src/rcldb/searchdata.h b/src/rcldb/searchdata.h index 27e6ce15..2d0eff1a 100644 --- a/src/rcldb/searchdata.h +++ b/src/rcldb/searchdata.h @@ -16,7 +16,7 @@ */ #ifndef _SEARCHDATA_H_INCLUDED_ #define _SEARCHDATA_H_INCLUDED_ -/* @(#$Id: searchdata.h,v 1.20 2008-09-29 11:33:55 dockes Exp $ (C) 2004 J.F.Dockes */ +/* @(#$Id: searchdata.h,v 1.21 2008-10-14 07:50:13 dockes Exp $ (C) 2004 J.F.Dockes */ /** * Structures to hold data coming almost directly from the gui @@ -139,8 +139,8 @@ public: bool isFileName() const {return m_tp == SCLT_FILENAME ? true: false;} virtual string getReason() const {return m_reason;} virtual bool getTerms(vector&, vector >&, - vector&) const - {return true;} + vector&) const = 0; + // {return true;} SClType getTp() {return m_tp;} void setParent(SearchData *p) {m_parentSearch = p;} virtual void setModifiers(Modifier mod) {m_modifiers = mod;} @@ -247,7 +247,8 @@ public: : SearchDataClause(tp), m_sub(sub) {} virtual ~SearchDataClauseSub() {} virtual bool toNativeQuery(Rcl::Db &db, void *, const string& stemlang); - + virtual bool getTerms(vector&, vector >&, + vector&) const; protected: RefCntr m_sub; }; diff --git a/src/utils/refcntr.h b/src/utils/refcntr.h index af2909a5..ea567b7a 100644 --- a/src/utils/refcntr.h +++ b/src/utils/refcntr.h @@ -40,8 +40,9 @@ public: } } X *operator->() {return rep;} - int getcnt() const {return pcount ? *pcount : 0;} X *getptr() const {return rep;} + const X *getconstptr() const {return rep;} + int getcnt() const {return pcount ? *pcount : 0;} bool isNull() const {return rep == 0;} };