quotes.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00029 #ifndef CLASS_H
00030 #define CLASS_H
00031 #include "../plugin.h"
00032 #include "../botkernel.h"
00033
00034 #ifndef HAVE_TINYXML
00035 #include "../tinyxml/tinyxml.h"
00036 #else
00037 #include <tinyxml.h>
00038 #endif
00039
00040
00041 #include "admin.h"
00042 #include <iostream>
00043 using namespace std;
00044
00050 class Quotes : public Plugin
00051 {
00052 private:
00054 TiXmlDocument * doc ;
00056 TiXmlNode* root;
00058 unsigned int nbQuotes;
00060 unsigned int getNbChilds(TiXmlNode*);
00061 public:
00063 Quotes(BotKernel*);
00065 void addQuote(string,string);
00067 string getQuote(unsigned int);
00069 string getRandomQuote();
00071 vector<string> searchQuote(string);
00073 bool delQuote(unsigned int);
00075 string getLastQuote();
00077 string quoteInfos(unsigned int);
00078 };
00079
00080
00081 #endif
00082