CallBacks Class Reference

Inherit from this class and override some or all of the methods for informative and error handling callbacks. More...

#include <CallBacks.h>

Inheritance diagram for CallBacks:

QtGuiCallBacks

List of all members.

Public Member Functions

virtual void categoryLoaded (const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 During the load time of AIML data this is called after each AIML category is loaded.
virtual void filePostLoad (const StringPimpl &fileName, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 During the load time of AIML data this is called after a file is parsed for AIML tags.
virtual void filePreLoad (const StringPimpl &fileName, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 During the load time of AIML data this is called before a file is parsed for AIML tags.
virtual void infiniteSymbolicReduction (const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When srai AIML tags cause an infinite recursion, the infinite recursion is automatically terminated and this method is called.
virtual void inputTagNumericConversionError (const StringPimpl &message, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag Input has a value inside of its index attribute which is not a numeric value, this method is called.
virtual void inputTagSizeExceeded (const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag Input's index exceeds its size, this method is called.
virtual void learnTagFileNotFound (const StringPimpl &message, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag Learn points to a file that cannot be found this method is called.
virtual void starTagNumericConversionError (const StringPimpl &message, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag Star has a value inside of its index attribute which is not a numeric value, this method is called.
virtual void starTagSizeExceeded (const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag Star's index exceeds its size, this method is called.
virtual void storeGossip (const StringPimpl &gossip, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 Stores gossip from the aiml gossip tag.
virtual void symbolicReduction (const StringPimpl &symbol, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 After text in between srai tags is constructed, the text is sent to this callback.
virtual void thatStarTagNumericConversionError (const StringPimpl &message, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag ThatStar has a value inside of its index attribute which is not a numeric value, this method is called.
virtual void thatStarTagSizeExceeded (const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag ThatStar's index exceeds its size, this method is called.
virtual void thatTagNumericConversionError (const StringPimpl &message, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag That has a value inside of its index attribute which is not a numeric value, this method is called.
virtual void thatTagSizeExceeded (const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag That's index exceeds its size, this method is called.
virtual void topicStarTagNumericConversionError (const StringPimpl &message, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag Topic has a value inside of its index attribute which is not a numeric value, this method is called.
virtual void topicStarTagSizeExceeded (const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When the AIML tag TopicStar's index exceeds its size, this method is called.
virtual void XMLParseError (const StringPimpl &message, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When a XML Parse Error is encountered during the parsing of the AIML tags this method will be called.
virtual void XMLParseFatalError (const StringPimpl &message, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When a XML Parse Fatal Error is encountered during the parsing of the AIML tags this method will be called.
virtual void XMLParseWarning (const StringPimpl &message, const StringPimpl &userId, const StringPimpl &botId, const StringPimpl &endUserId)
 When a XML Parse Warning is encountered during the parsing of the AIML tags this method will be called.
virtual ~CallBacks ()
 No operations Destructor.


Detailed Description

Inherit from this class and override some or all of the methods for informative and error handling callbacks.

You can pick and choose which callbacks you want to do something about by only overriding the callback methods that you feel like doing something about. The remaining methods you do not override will then just remain the default no-ops (no operations) and do nothing.

After you create your custom subclass of CallBacks, you instantiate it and call GraphBuilder's method setCallBacks GraphBuilder::setCallBacks() giving it the address of your custom subclass of CallBacks. GraphBuilder will NOT try to delete your subclass. You are responsible for the memory management of your CallBacks subclass.

If you do not override this class and call GraphBuilder's setCallBacks with the address of your instance, then the default one inside GraphBuilder will be used. The default CallBacks is an instantiation of this no-ops (No operations) class. Therefore nothing will happen when each method is called and is thus the default behavior.


Constructor & Destructor Documentation

virtual ~CallBacks (  )  [inline, virtual]

No operations Destructor.

Put what you need in here when you subclass CallBacks.


Member Function Documentation

virtual void categoryLoaded ( const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

During the load time of AIML data this is called after each AIML category is loaded.

This enables an action to be performed after each category is loaded such as counting the categories and periodically outputting that "x" number of categories has been loaded so far.

This callback will only be called during a call to GraphBuilder::createGraph().

Parameters:
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void filePostLoad ( const StringPimpl fileName,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

During the load time of AIML data this is called after a file is parsed for AIML tags.

This enables an action to be performed after each file is loaded such as outputting that "file x" was loaded or to count the amount of time a file takes to load using CallBacks::filePreLoad in conjunction.

This callback will only be called during a call to GraphBuilder::createGraph().

Parameters:
fileName The name of the file that was just parsed for AIML tags.
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void filePreLoad ( const StringPimpl fileName,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

During the load time of AIML data this is called before a file is parsed for AIML tags.

This enables an action to be performed before each file is loaded such as outputting that "file x" is loading or to count the amount of time a file takes to load using CallBacks::filePostLoad in conjunction.

This callback will only be called during a call to GraphBuilder::createGraph().

Parameters:
fileName The name of the file that is about to be parsed for AIML tags.
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void infiniteSymbolicReduction ( const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When srai AIML tags cause an infinite recursion, the infinite recursion is automatically terminated and this method is called.

This method can be used to send an informative message that the AIML tags have infinite recursion with the srai tags or to just detect the issue. You DO NOT have to worry about trying to terminate the recursion yourself. The recursion is automatically terminated.

This callback will only be called during a call to GraphBuilder::getResponse().

Parameters:
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void inputTagNumericConversionError ( const StringPimpl message,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag Input has a value inside of its index attribute which is not a numeric value, this method is called.

This is useful to output when the AIML tag Input during load time has invalid numeric values for its index.

This callback will only be called during a call to GraphBuilder::createGraph()

Parameters:
message A informative message of the error for humans
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void inputTagSizeExceeded ( const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag Input's index exceeds its size, this method is called.

This is useful to output when the AIML tag Input during runtime is exceeding its size for informational purposes or to aid in debugging AIML tags.

This callback will only be called during a call to GraphBuilder::getResponse()

Parameters:
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void learnTagFileNotFound ( const StringPimpl message,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag Learn points to a file that cannot be found this method is called.

This is useful to output when the AIML tag Learn cannot find the file it was searching for to load.

Parameters:
message A informative message of the error for humans
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void starTagNumericConversionError ( const StringPimpl message,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag Star has a value inside of its index attribute which is not a numeric value, this method is called.

This is useful to output when the AIML tag Star during load time has invalid numeric values for its index.

This callback will only be called during a call to GraphBuilder::createGraph()

Parameters:
message A informative message of the error for humans
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void starTagSizeExceeded ( const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag Star's index exceeds its size, this method is called.

This is useful to output when the AIML tag Star during runtime is exceeding its size for informational purposes or to aid in debugging AIML tags.

This callback will only be called during a call to GraphBuilder::getResponse()

Parameters:
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void storeGossip ( const StringPimpl gossip,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

Stores gossip from the aiml gossip tag.

Whenever the gossip tag is encountered during the runtime of rebecca aiml, this callback is called. This gives the opportunity to store gossip into a flat file, or something else deemed appropriate.

The possibility of this callback being called is only during a call to GraphBuilder::getResponse().

Parameters:
gossip The final constructed text between a gossip AIML tag.
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void symbolicReduction ( const StringPimpl symbol,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

After text in between srai tags is constructed, the text is sent to this callback.

Usually srai is used for symbolicReduction, hence the name of this callback method. This method is called before the GraphBuilder::getResponse() is called with the constructed srai text. This method is mostly useful for informative purposes of seeing what the AIML is recalling its self with during calls to GraphBuilder::getResponse().

This callback will only be called during a call to GraphBuilder::getResponse().

Parameters:
symbol The final constructed text that was constructed from between a srai AIML tag encountered.
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void thatStarTagNumericConversionError ( const StringPimpl message,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag ThatStar has a value inside of its index attribute which is not a numeric value, this method is called.

This is useful to output when the AIML tag ThatStar during load time has invalid numeric values for its index.

This callback will only be called during a call to GraphBuilder::createGraph()

Parameters:
message A informative message of the error for humans
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void thatStarTagSizeExceeded ( const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag ThatStar's index exceeds its size, this method is called.

This is useful to output when the AIML tag ThatStar during runtime is exceeding its size for informational purposes or to aid in debugging AIML tags.

This callback will only be called during a call to GraphBuilder::getResponse()

Parameters:
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void thatTagNumericConversionError ( const StringPimpl message,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag That has a value inside of its index attribute which is not a numeric value, this method is called.

This is useful to output when the AIML tag That during load time has invalid numeric values for its index.

This callback will only be called during a call to GraphBuilder::createGraph()

Parameters:
message A informative message of the error for humans
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void thatTagSizeExceeded ( const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag That's index exceeds its size, this method is called.

This is useful to output when the AIML tag That during runtime is exceeding its size for informational purposes or to aid in debugging AIML tags.

This callback will only be called during a call to GraphBuilder::getResponse()

Parameters:
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void topicStarTagNumericConversionError ( const StringPimpl message,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag Topic has a value inside of its index attribute which is not a numeric value, this method is called.

This is useful to output when the AIML tag Topic during load time has invalid numeric values for its index.

This callback will only be called during a call to GraphBuilder::createGraph()

Parameters:
message A informative message of the error for humans
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void topicStarTagSizeExceeded ( const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When the AIML tag TopicStar's index exceeds its size, this method is called.

This is useful to output when the AIML tag TopicStar during runtime is exceeding its size for informational purposes or to aid in debugging AIML tags.

This callback will only be called during a call to GraphBuilder::getResponse()

Parameters:
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void XMLParseError ( const StringPimpl message,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When a XML Parse Error is encountered during the parsing of the AIML tags this method will be called.

Parameters:
message The XML Error Message
This callback will only be called during a call to GraphBuilder::createGraph().

Parameters:
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void XMLParseFatalError ( const StringPimpl message,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When a XML Parse Fatal Error is encountered during the parsing of the AIML tags this method will be called.

Parameters:
message The XML Fatal Error Message
This callback will only be called during a call to GraphBuilder::createGraph().

Parameters:
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.

virtual void XMLParseWarning ( const StringPimpl message,
const StringPimpl userId,
const StringPimpl botId,
const StringPimpl endUserId 
) [inline, virtual]

When a XML Parse Warning is encountered during the parsing of the AIML tags this method will be called.

Parameters:
message The XML Warning Message
This callback will only be called during a call to GraphBuilder::createGraph().

Parameters:
userId The user that caused this
botId The bot that caused this
endUserId The end user that caused this
Exceptions:
Any can be thrown.


The documentation for this class was generated from the following file:
Generated on Mon Aug 27 12:26:56 2007 for RebeccaAIML by  doxygen 1.5.3