CustomTopic Class Reference

AIML class that represents the AIML XML tag "topic". More...

#include <CustomTopic.h>

List of all members.

Public Member Functions

 CustomTopic (GraphBuilderFramework &builder, Html &htmlPage) throw (InternalProgrammerErrorException &)
 Set the internal GraphBuilderFramework and the internal Html object references which this class requires to operate.
void handleInnerTag (const shared_ptr< Tag > &tag) throw (InternalProgrammerErrorException &)
 Recieves Category objects in which it adds to the Html object, m_htmlPage.
void setAttribute (const StringPimpl &name, const StringPimpl &value) throw (InternalProgrammerErrorException &)
 Sets the attribute "name" to a value.

Private Types

typedef map< string, ofstream * > fileStringMap
 Typedef a map of strings and file stream to a easier to use reference.

Private Attributes

GraphBuilderFramework & m_builder
 A reference to the graph builder framework that can be used to set and get information from the AIML engine.
Htmlm_htmlPage
 Html Object to manipulate and add information for the web pages.
string m_topic
 The topic.


Detailed Description

AIML class that represents the AIML XML tag "topic".

Every time a XML Tag of Topic is encountered, an instance of this class will be created. All text inbetween the begin and end tag, all attributes, and all inner Tags will go through methods of this class.

This is my custom version of the AIML XML Tag Topic. I use this custom version to write the information that normally goes to the Internal AIML data strucuture for the AIML brain to web pages instead.


Member Typedef Documentation

typedef map<string, ofstream *> fileStringMap [private]
 

Typedef a map of strings and file stream to a easier to use reference.


Constructor & Destructor Documentation

CustomTopic GraphBuilderFramework &  builder,
Html htmlPage
throw (InternalProgrammerErrorException &)
 

Set the internal GraphBuilderFramework and the internal Html object references which this class requires to operate.

Also initialized the default Topic, m_topic to "*"

Parameters:
builder A reference to the graph builder framework that can be used to set and get information from the AIML engine.
htmlPage A reference to the Html page object used to set and get information on html pages.
Exceptions:
InternalProgrammerErrorException is thrown only if the error is so grave that the entire AIML engine has to be shut down.


Member Function Documentation

void handleInnerTag const shared_ptr< Tag > &  tag  )  throw (InternalProgrammerErrorException &)
 

Recieves Category objects in which it adds to the Html object, m_htmlPage.

This method first checks tag through Tag::instanceOf() to ensure it is an object of type Category. If it is not, it will throw a rebecca::impl::InternalProgrammerErrorException. Otherwise it will manipulate and add the object to the Html Object.

Parameters:
tag The Category tag which is added to the Html object.
Exceptions:
InternalProgrammerErrorException is thrown if the tag is not an instance of Category.

void setAttribute const StringPimpl &  name,
const StringPimpl &  value
throw (InternalProgrammerErrorException &)
 

Sets the attribute "name" to a value.

The name value attribute determines what type of Topic this is. If no attribute is given and this object is instantiated without a name value pair, it will default to "*" according to the AIML specification.

This is overriden to gain access to the value of the name attribute.

Parameters:
name The name of the AIML XML attribute
value The value of the AIML XML attribute
Exceptions:
InternalProgrammerErrorException is thrown if the name attribute is not that of "name"


Member Data Documentation

GraphBuilderFramework& m_builder [private]
 

A reference to the graph builder framework that can be used to set and get information from the AIML engine.

Html& m_htmlPage [private]
 

Html Object to manipulate and add information for the web pages.

string m_topic [private]
 

The topic.

By default it is "*" by the AIML specification.


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