Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

GlobalFilter.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2002 by Yann Hodique                                    *
00003  *   Yann.Hodique@lifl.fr                                                  *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  ***************************************************************************/
00010 
00011 #include "GlobalFilter.h"
00012 
00013 
00014 GlobalFilter::GlobalFilter(const QString & name, MtpContext* ctxt) : Filter(name,ctxt) {}
00015 
00016 
00017 GlobalFilter::~GlobalFilter() {}
00018 
00019 bool GlobalFilter::applyTo(QString & msg) {
00020     MtpRegExp re(".*");
00021 
00022     bool match = re.exactMatch(msg);
00023 
00024     if (match)
00025         setResult(applyProcessedRegexpToPattern(re,pattern));
00026 
00027     return match;
00028 }
00029 
00030 void GlobalFilter::setResultPattern(const QString & pat) {
00031     pattern = pat;
00032 }
00033 
00034 QString GlobalFilter::getResultPattern() const {
00035     return pattern;
00036 }

Generated on Sat May 10 15:09:26 2003 for qnet by doxygen1.3