/home/jon/Projects/gibberish/src/include/Questions.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  * This file is part of Gibberish.
00004  *
00005  * Gibberish 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  * Gibberish is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU General Public License
00016  * along with Foobar; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018  *
00019  *****************************************************************************/
00020 
00026 #ifndef _H_QUESTIONS
00027 #define _H_QUESTIONS
00028 
00029 #include <QList>
00030 #include <QString>
00031 
00044 class Questions
00045 {
00046         public:
00047                 Questions();
00048 
00049                 void addQuestion( QString question );
00050                 void addAnswer( QString answer );
00051                 void reset();
00052                 int getQuestionNumberCount();
00053                 int getQuestionNumberLiteral();
00054                 int getQuestionNumberTotal();
00055 
00056                 int getNextQuestion( QString& question );
00057                 int getNextAnswer( QString& answer );
00058                 int getAnyQuestion( QString& question );
00059                 int getAnyAnswer( QString& answer );
00060 
00061                 QList<QString> getQuestions();
00062                 QList<QString> getAnswers();
00063                 QList<int> getQuestionsAsked();
00064 
00065                 int generateRandomNumber( int min, int max ); // TODO Move to a utility class??
00066 
00067         private:
00068                 int questionNumberLiteral;      
00069                 int questionNumberCount;                
00070                 QList<QString> questions;               
00071                 QList<QString> answers;                 
00072                 QList<int> questionsAsked;      
00073 
00074                 int generateQuestionNumber();
00075 
00076 };
00077 
00078 #endif

Generated on Sat Sep 16 21:02:41 2006 for Gibberish by  doxygen 1.4.6