AIMLEngine.h

00001 #ifndef QTGUI_AIMLENGINE_H
00002 #define QTGUI_AIMLENGINE_H
00003 
00004 /*
00005  * RebeccaAIML, Artificial Intelligence Markup Language 
00006  * C++ api and engine.
00007  *
00008  * Copyright (C) 2005 Frank Hassanabad
00009  *
00010  * This library is free software; you can redistribute it and/or
00011  * modify it under the terms of the GNU Lesser General Public
00012  * License as published by the Free Software Foundation; either
00013  * version 2.1 of the License, or (at your option) any later version.
00014  *
00015  * This library is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018  * Lesser General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU Lesser General Public
00021  * License along with this library; if not, write to the Free Software
00022  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00023  */
00024 
00025 //Qt includes
00026 #include <QObject>
00027 #include <QDir>
00028 
00029 //Rebecca includes
00030 #include <rebecca/all.h>
00031 #include "QtGuiCallBacks.h"
00032 
00033 
00039 namespace qtgui
00040 {
00041 using namespace rebecca;
00042 
00043 
00048 class AIMLEngine : public QObject
00049 {
00050     Q_OBJECT
00051 
00052     public:
00053 
00058         void initAIML();
00059         
00071         AIMLEngine()
00072             : m_aiml(0)
00073         { 
00074             bool b = connect(&m_callback, SIGNAL(addText(const QString &)),
00075                 this, SIGNAL(addText(const QString &)));            
00076         }
00077     
00078     signals:
00079 
00087         void addText(const QString &text);
00088 
00097         void addBotText(const QString &text);
00098         
00106         void addBotName(const QString &text);
00107         
00112         void loading();
00113 
00118         void doneLoading();
00119 
00120     public slots:
00121         
00129         void userInput(const QString &text);
00130         
00134         void clearAIML();
00135         
00142         void addFile(const QString &fileName);
00143         
00152         void addDirectory(const QString &directoryName);
00153 
00154     private:    
00155         
00163         QtGuiCallBacks m_callback;
00164 
00169         AimlFacade *m_aiml;
00170 };
00171 
00172 
00173 } //end of namespace qtgui
00174 
00175 #endif

Generated on Mon Apr 10 00:40:01 2006 for RebeccaAIML by  doxygen 1.4.5