Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
QgsSearchString Class Reference

A class to represent a search string. More...

#include <qgssearchstring.h>

Collaboration diagram for QgsSearchString:
Collaboration graph
[legend]

Public Member Functions

 QgsSearchString ()
 construct an empty string More...
 
 QgsSearchString (const QString &str)
 construct and parse a string More...
 
 QgsSearchString (const QgsSearchString &str)
 copy constructor - makes also copy of search tree More...
 
 ~QgsSearchString ()
 destructor - deletes node tree More...
 
QgsSearchStringoperator= (const QgsSearchString &str)
 assignment operator takes care to copy search tree correctly More...
 
bool setString (QString str)
 sets search string and parses search tree on success returns true and sets member variables to the new values More...
 
bool setTree (QgsSearchTreeNode *tree)
 
QgsSearchTreeNodetree ()
 getter functions More...
 
QString string ()
 
const QString & parserErrorMsg ()
 returns parser error message - valid only after unsuccessfull parsing More...
 
bool isEmpty ()
 returns true if no string is set More...
 
void clear ()
 clear search string More...
 

Private Attributes

QgsSearchTreeNodemTree
 search string and coresponding tree More...
 
QString mString
 
QString mParserErrorMsg
 error message from parser More...
 

Detailed Description

A class to represent a search string.

Definition at line 35 of file qgssearchstring.h.

Constructor & Destructor Documentation

QgsSearchString::QgsSearchString ( )

construct an empty string

Definition at line 28 of file qgssearchstring.cpp.

References mTree.

QgsSearchString::QgsSearchString ( const QString &  str)

construct and parse a string

Note
added in v1.6

Definition at line 33 of file qgssearchstring.cpp.

References mTree, and setString().

QgsSearchString::QgsSearchString ( const QgsSearchString str)

copy constructor - makes also copy of search tree

Definition at line 39 of file qgssearchstring.cpp.

References mString, and mTree.

QgsSearchString::~QgsSearchString ( )

destructor - deletes node tree

Definition at line 62 of file qgssearchstring.cpp.

References mTree.

Member Function Documentation

void QgsSearchString::clear ( )

clear search string

Definition at line 113 of file qgssearchstring.cpp.

References mString, and mTree.

Referenced by operator=(), setString(), and setTree().

bool QgsSearchString::isEmpty ( )

returns true if no string is set

Definition at line 108 of file qgssearchstring.cpp.

References mTree.

QgsSearchString & QgsSearchString::operator= ( const QgsSearchString str)

assignment operator takes care to copy search tree correctly

Definition at line 48 of file qgssearchstring.cpp.

References clear(), mString, and mTree.

const QString& QgsSearchString::parserErrorMsg ( )
inline

returns parser error message - valid only after unsuccessfull parsing

Definition at line 67 of file qgssearchstring.h.

Referenced by QgsSearchQueryBuilder::countRecords(), and QgsSearchQueryBuilder::loadQuery().

bool QgsSearchString::setString ( QString  str)

sets search string and parses search tree on success returns true and sets member variables to the new values

Definition at line 68 of file qgssearchstring.cpp.

References clear(), mParserErrorMsg, mString, mTree, parseSearchString(), and tree().

Referenced by QgsSearchQueryBuilder::countRecords(), QgsSearchQueryBuilder::loadQuery(), and QgsSearchString().

bool QgsSearchString::setTree ( QgsSearchTreeNode tree)

Definition at line 93 of file qgssearchstring.cpp.

References clear(), QgsSearchTreeNode::makeSearchString(), mString, and mTree.

QString QgsSearchString::string ( )
inline

Definition at line 64 of file qgssearchstring.h.

QgsSearchTreeNode* QgsSearchString::tree ( )
inline

getter functions

Definition at line 63 of file qgssearchstring.h.

Referenced by QgsSearchQueryBuilder::countRecords(), QgsSearchQueryBuilder::loadQuery(), and setString().

Member Data Documentation

QString QgsSearchString::mParserErrorMsg
private

error message from parser

Definition at line 81 of file qgssearchstring.h.

Referenced by setString().

QString QgsSearchString::mString
private

Definition at line 78 of file qgssearchstring.h.

Referenced by clear(), operator=(), QgsSearchString(), setString(), and setTree().

QgsSearchTreeNode* QgsSearchString::mTree
private

search string and coresponding tree

Definition at line 77 of file qgssearchstring.h.

Referenced by clear(), isEmpty(), operator=(), QgsSearchString(), setString(), setTree(), and ~QgsSearchString().


The documentation for this class was generated from the following files: