Topic Class Reference

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

#include <Topic.h>

Inheritance diagram for Topic:

InnerAIML Tag List of all members.

Public Member Functions

virtual void handleInnerTag (const shared_ptr< Tag > &tag) throw (InternalProgrammerErrorException &)
 Recieves Category objects in which it adds to the node mapper internal data structure.
virtual void setAttribute (const StringPimpl &name, const StringPimpl &value) throw (InternalProgrammerErrorException &)
 Sets the attribute "name" to a value.
 Topic (GraphBuilderFramework &builder) throw (InternalProgrammerErrorException &)
 Initalizes the private implementation (m_pimpl) data and sets the private implementation with a reference to the GraphBuilderFramework.
virtual ~Topic ()
 Default virtual destructor.

Private Attributes

shared_ptr< TopicImpl > m_pimpl
 The private implementation in which you cannot get access to.

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.


Constructor & Destructor Documentation

Topic GraphBuilderFramework builder  )  throw (InternalProgrammerErrorException &)
 

Initalizes the private implementation (m_pimpl) data and sets the private implementation with a reference to the GraphBuilderFramework.

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

virtual ~Topic  )  [virtual]
 

Default virtual destructor.

Destroys the private implementation (m_pimpl) data.


Member Function Documentation

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

Recieves Category objects in which it adds to the node mapper internal data structure.

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 internal node mapper data structure. The node mapper data structure is the final step to adding information to the AIML brain.

If this class is inherited from and completely replaced, and yet this handleInnerTag is *never* called, no information will ever be added to the AIML brain. This method of this class has to be called with a Category object to have the information added to the AIML brain.

Parameters:
tag The Category tag which is added to the internal node mapper data structure.
Exceptions:
InternalProgrammerErrorException is thrown if the tag is not an instance of Category.

Reimplemented from Tag.

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

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.

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"

Reimplemented from Tag.


Member Data Documentation

shared_ptr<TopicImpl> m_pimpl [private]
 

The private implementation in which you cannot get access to.

This shared_ptr holds the private methods and private member variables of this class. This makes ABI (Application Binary Interface) more resilient to change. See the private implementation idiom on the internet for more information about this.

Reimplemented from InnerAIML.


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