Quantum GIS API Documentation
1.8
|
00001 /*************************************************************************** 00002 qgssearchstring.h 00003 interface for parsing and evaluation of search strings 00004 -------------------- 00005 begin : 2005-07-26 00006 copyright : (C) 2005 by Martin Dobias 00007 email : won.der at centrum.sk 00008 ***************************************************************************/ 00009 00010 /*************************************************************************** 00011 * * 00012 * This program is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU General Public License as published by * 00014 * the Free Software Foundation; either version 2 of the License, or * 00015 * (at your option) any later version. * 00016 * * 00017 ***************************************************************************/ 00018 00019 #ifndef QGSSEARCHSTRING_H 00020 #define QGSSEARCHSTRING_H 00021 00022 #include <QString> 00023 00024 class QgsSearchTreeNode; 00025 00034 class CORE_EXPORT QgsSearchString 00035 { 00036 public: 00038 QgsSearchString(); 00039 00042 QgsSearchString( const QString & str ); 00043 00045 QgsSearchString( const QgsSearchString& str ); 00046 00048 ~QgsSearchString(); 00049 00051 QgsSearchString& operator=( const QgsSearchString& str ); 00052 00055 bool setString( QString str ); 00056 00057 /* copies tree and makes search string for it 00058 on success returns true and sets member variables to the new values */ 00059 bool setTree( QgsSearchTreeNode* tree ); 00060 00062 QgsSearchTreeNode* tree() { return mTree; } 00063 QString string() { return mString; } 00064 00066 const QString& parserErrorMsg() { return mParserErrorMsg; } 00067 00069 bool isEmpty(); 00070 00072 void clear(); 00073 00074 private: 00076 QgsSearchTreeNode* mTree; 00077 QString mString; 00078 00080 QString mParserErrorMsg; 00081 }; 00082 00083 #endif