CustomTagsImpl Class Reference

Implementation of the CustomTags class that produces a Tag object for each AIML XML string. More...

#include <CustomTagsImpl.h>

List of all members.

Public Member Functions

virtual shared_ptr< TagcreateTagClass (const char *const className, GraphBuilderFramework &builder) throw (InternalProgrammerErrorException &)
 Method in which I return a shared_ptr<Tag> for each of the AIML XML tags I want to override.
 CustomTagsImpl () throw (InternalProgrammerErrorException &)
 I use this to set m_templateSideThat to false to start with.
virtual ~CustomTagsImpl ()
 I call m_htmlPage write web pages to finally write out all the web pages.

Private Attributes

Html m_htmlPage
 My internal html page object which I use to write out all the pages with.
bool m_templateSideThat
 We use this to figure out if we are within a template and should use a templateSideThat when we see the string "template".


Detailed Description

Implementation of the CustomTags class that produces a Tag object for each AIML XML string.

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 the Tag I 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.

All the AIML XML tags I wish to override I do through this class. When I encounter an AIML XML Tag I do not want to override I return an empty shared_ptr<>.


Constructor & Destructor Documentation

CustomTagsImpl  )  throw (InternalProgrammerErrorException &)
 

I use this to set m_templateSideThat to false to start with.

Exceptions:
InternalProgrammerErrorException is thrown only if the error is so grave that the entire AIML engine has to be shut down.

~CustomTagsImpl  )  [virtual]
 

I call m_htmlPage write web pages to finally write out all the web pages.

Once this class is destroyed the program is getting ready to exit. Which means I should finally write out all the web pages.


Member Function Documentation

shared_ptr< Tag > createTagClass const char *const   className,
GraphBuilderFramework &  builder
throw (InternalProgrammerErrorException &) [virtual]
 

Method in which I return a shared_ptr<Tag> for each of the AIML XML tags I want to override.

I 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 my 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.

For the tags I do not wish to override I return an empty shared_ptr. When the AIML engine sees that an empty shared_ptr is returned it will use its default AIML Tag.

Parameters:
className The AIML Tag string name I return an instance of my custom AIML Tag to.
builder The AIML engine associated with my Custom Tag I return.
Returns:
Either my custom aiml Tag instance or an empty shared_ptr if I do not wish to override that particular AIML Tag.
Exceptions:
InternalProgrammerErrorException is thrown only if the error is so grave that the entire AIML engine has to be shut down.


Member Data Documentation

Html m_htmlPage [private]
 

My internal html page object which I use to write out all the pages with.

bool m_templateSideThat [private]
 

We use this to figure out if we are within a template and should use a templateSideThat when we see the string "template".

Otherwise we will let rebecca use her default pattern side that


The documentation for this class was generated from the following files:
Generated on Thu Sep 7 22:05:52 2006 for RebeccaAIML by  doxygen 1.4.5