CallBacks.h

00001 #ifndef REBECCA_CALLBACKS_H
00002 #define REBECCA_CALLBACKS_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 //To get the REBECA_EXPORT macro
00027 #include <rebecca/exports.h>
00028 
00029 //See AimlFacade for the explanation of this namespace
00030 namespace rebecca
00031 {
00032 //See AimlFacade for the explanation of this namespace
00033 namespace impl
00034 {
00035 
00036 //Forward decleration of StringPimpl
00037 class StringPimpl;
00038 
00064 class REBECCA_EXPORT CallBacks
00065 {
00066     public:
00067 
00068         /*
00069          * Informative callbacks
00070          *
00071          */
00072 
00097         virtual void storeGossip(const StringPimpl &gossip,
00098                                  const StringPimpl &userId,
00099                                  const StringPimpl &botId,
00100                                  const StringPimpl &endUserId) 
00101         { }
00102         
00123         virtual void categoryLoaded(const StringPimpl &userId,
00124                                     const StringPimpl &botId,
00125                                     const StringPimpl &endUserId) 
00126 
00127         { }
00128 
00152         virtual void filePreLoad(const StringPimpl &fileName,
00153                                  const StringPimpl &userId,
00154                                  const StringPimpl &botId,
00155                                  const StringPimpl &endUserId) 
00156         { }
00157 
00181         virtual void filePostLoad(const StringPimpl &fileName,
00182                                   const StringPimpl &userId,
00183                                   const StringPimpl &botId,
00184                                   const StringPimpl &endUserId) 
00185         { }
00186 
00213         virtual void symbolicReduction(const StringPimpl &symbol,
00214                                        const StringPimpl &userId,
00215                                        const StringPimpl &botId,
00216                                        const StringPimpl &endUserId) 
00217         { }
00218         
00240         virtual void infiniteSymbolicReduction(const StringPimpl &userId,
00241                                                const StringPimpl &botId,
00242                                                const StringPimpl &endUserId) 
00243         { } 
00244 
00245         /*
00246          * XML Parse Errors
00247          *
00248          */
00249 
00267         virtual void XMLParseError(const StringPimpl &message,
00268                                    const StringPimpl &userId,
00269                                    const StringPimpl &botId,
00270                                    const StringPimpl &endUserId) 
00271         { } 
00272 
00290         virtual void XMLParseWarning(const StringPimpl &message,
00291                                      const StringPimpl &userId,
00292                                      const StringPimpl &botId,
00293                                      const StringPimpl &endUserId) 
00294         { } 
00295 
00313         virtual void XMLParseFatalError(const StringPimpl &message,
00314                                         const StringPimpl &userId,
00315                                         const StringPimpl &botId,
00316                                         const StringPimpl &endUserId) 
00317         { } 
00318 
00319         /*
00320          * AIML tag Errors
00321          *
00322          */
00323 
00343         virtual void thatStarTagSizeExceeded(const StringPimpl &userId,
00344                                              const StringPimpl &botId,
00345                                              const StringPimpl &endUserId) 
00346         { }
00347 
00367         virtual void topicStarTagSizeExceeded(const StringPimpl &userId,
00368                                               const StringPimpl &botId,
00369                                               const StringPimpl &endUserId) 
00370         { }
00371 
00391         virtual void starTagSizeExceeded(const StringPimpl &userId,
00392                                          const StringPimpl &botId,
00393                                          const StringPimpl &endUserId) 
00394         { }
00395 
00419         virtual void inputTagNumericConversionError(const StringPimpl &message,
00420                                                     const StringPimpl &userId,
00421                                                     const StringPimpl &botId,
00422                                                     const StringPimpl &endUserId) 
00423         { }
00424 
00444         virtual void inputTagSizeExceeded(const StringPimpl &userId,
00445                                           const StringPimpl &botId,
00446                                           const StringPimpl &endUserId) 
00447         { } 
00448 
00472         virtual void starTagNumericConversionError(const StringPimpl &message,
00473                                                    const StringPimpl &userId,
00474                                                    const StringPimpl &botId,
00475                                                    const StringPimpl &endUserId) 
00476         { } 
00477 
00497         virtual void thatTagSizeExceeded(const StringPimpl &userId,
00498                                          const StringPimpl &botId,
00499                                          const StringPimpl &endUserId) 
00500         { }
00501 
00525         virtual void thatTagNumericConversionError(const StringPimpl &message,
00526                                                    const StringPimpl &userId,
00527                                                    const StringPimpl &botId,
00528                                                    const StringPimpl &endUserId) 
00529         { } 
00530 
00554         virtual void topicStarTagNumericConversionError(const StringPimpl &message,
00555                                                         const StringPimpl &userId,
00556                                                         const StringPimpl &botId,
00557                                                         const StringPimpl &endUserId) 
00558         { } 
00559 
00583         virtual void thatStarTagNumericConversionError(const StringPimpl &message,
00584                                                        const StringPimpl &userId,
00585                                                        const StringPimpl &botId,
00586                                                        const StringPimpl &endUserId) 
00587         { }
00588         
00607         virtual void learnTagFileNotFound(const StringPimpl &message,
00608                                           const StringPimpl &userId,
00609                                           const StringPimpl &botId,
00610                                           const StringPimpl &endUserId) 
00611         { } 
00612 
00618         virtual ~CallBacks() { }
00619 };
00620 
00621 
00622 } //end namespace impl
00623 
00624 //expose CallBacks to Rebecca namespace 
00625 using rebecca::impl::CallBacks;
00626 
00627 } //end namespace rebecca
00628 
00629 #endif
00630 

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