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,2006,2007 Frank Hassanabad
00009  *
00010  * This file is part of RebeccaAIML.
00011  *
00012  * RebeccaAIML 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 3 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * RebeccaAIML is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00024  */
00025 
00026 //Qt includes
00027 #include <QObject>
00028 #include <QDir>
00029 
00030 //Rebecca includes
00031 #include <rebecca/all.h>
00032 #include "QtGuiCallBacks.h"
00033 
00034 
00040 namespace qtgui
00041 {
00042 using namespace rebecca;
00043 
00044 
00049 class AIMLEngine : public QObject
00050 {
00051     Q_OBJECT
00052 
00053     public:
00054 
00059         void initAIML();
00060         
00072         AIMLEngine()
00073             : m_aiml(0)
00074         { 
00075             bool b = connect(&m_callback, SIGNAL(addText(const QString &)),
00076                 this, SIGNAL(addText(const QString &)));            
00077         }
00078     
00079     signals:
00080 
00088         void addText(const QString &text);
00089 
00098         void addBotText(const QString &text);
00099         
00107         void addBotName(const QString &text);
00108         
00113         void loading();
00114 
00119         void doneLoading();
00120 
00121     public slots:
00122         
00130         void userInput(const QString &text);
00131         
00135         void clearAIML();
00136         
00143         void addFile(const QString &fileName);
00144         
00153         void addDirectory(const QString &directoryName);
00154 
00155     private:    
00156         
00164         QtGuiCallBacks m_callback;
00165 
00170         AimlFacade *m_aiml;
00171 };
00172 
00173 
00174 } //end of namespace qtgui
00175 
00176 #endif

Generated on Mon Aug 27 12:26:53 2007 for RebeccaAIML by  doxygen 1.5.3