#include <CustomTags.h>
Public Member Functions | |
virtual shared_ptr< Tag > | createTagClass (const char *const className, GraphBuilderFramework &builder)=0 throw (InternalProgrammerErrorException &) |
Contract in which you will return a shared_ptr<Tag> of your custom Tag class when given the string of the Tag name. | |
virtual | ~CustomTags () |
Default virtual destructor. |
Inherit from this class within your dll or shared object and flush out createTagClass to return your custom Tags. Register your dll or shared object GraphBuilder::addCustomTagLibrary()
The .dll or .so that has the custom AIML tags must conform to the proper format. The proper format is that the .dll/.so should have a class that inherits from this class. Also the two global C functions of CustomTags *rebeccaAIMLLoadCustomTags() and rebeccaAIMLRemoveCustomTags(CustomTagsImpl *customTags) must be present in your dll or shared objecct. rebeccaAIMLLoadCustomTags returns a new instance of the class that inherits from this class and rebeccaAIMLRemoveCustomTags takes a CustomTags argument and deletes the object. If both of these C functions cannot be found, the dll or shared object will not be loaded.
|
Default virtual destructor.
|
|
Contract in which you will return a shared_ptr<Tag> of your custom Tag class when given the string of the Tag name. You will recieve the className of every Tag encountered during the parsing of AIML. For example, when the Tag <think> is encountered "think" in all lowercase will be sent to this method. Along with the name of the Tag a GraphBuilderFramework reference will be sent. This reference is the AIML engine associated with your Tag you will return. The reference is sent because a lot of AIML tags rely on it to set and retrieve information from the AIML engine during runtime. If you do not wish to override the tag who's name is sent to this method you must return an empty shared_ptr. When the AIML engine sees that an empty shared_ptr is returned it will use its default AIML Tag.
|