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

affect.cpp

Go to the documentation of this file.
00001 //
00002 //
00003 // C++ Implementation: $MODULE$
00004 //
00005 // Description:
00006 //
00007 //
00008 // Author: Yann Hodique <Yann.Hodique@lifl.fr>, (C) 2003
00009 //
00010 // Copyright: See COPYING file that comes with this distribution
00011 //
00012 //
00013 
00014 #include <qregexp.h>
00015 
00016 #include "affect.h"
00017 
00018 PLUGIN_FACTORY(Affect,"affect");
00019 
00020 Affect::Affect(QWidget */*parent*/, const char *name, Master * session) : Page(0, name, session) {}
00021 
00022 Affect::~Affect() {}
00023 
00024 void Affect::append(const QString& msg) {
00025     QRegExp re("(\\w+)=(\\w+)");
00026     if(re.exactMatch(msg)) {
00027   getMaster()->context()->setVar(re.cap(1),re.cap(2));
00028   getMaster()->displayStderr("Setting " + re.cap(1) + " to " + re.cap(2));
00029     }
00030 }
00031 

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