Category Class Reference

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

#include <Category.h>

Inheritance diagram for Category:

InnerTopic InnerAIML Tag List of all members.

Public Member Functions

 Category (GraphBuilderFramework &builder) throw (InternalProgrammerErrorException &)
 Initalizes the private implementation (m_pimpl) data and sets the private implementation with a reference to the GraphBuilderFramework.
virtual const StringPimplgetPatternString () throw (InternalProgrammerErrorException &)
 Returns the internal Pattern reference's string reference through Pattern::getStringConstRef().
virtual const shared_ptr<
Template > & 
getTemplate () throw (InternalProgrammerErrorException &)
 Returns a reference to the internal Template.
virtual const StringPimpl getTemplateString () throw (InternalProgrammerErrorException &)
 Returns the internal Template reference's string through Template::getString().
virtual const StringPimplgetThatString () throw (InternalProgrammerErrorException &)
 Returns the internal That reference's string reference through That::getStringConstRef().
virtual void handleInnerTag (const shared_ptr< Tag > &tag) throw (InternalProgrammerErrorException &)
 If the Tag is a PatternSideThat, Template, or Pattern it adds the reference to its self, otherwise it throws a rebecca::impl::InternalProgrammerErrorException.
virtual ~Category ()
 Default virtual destructor.

Private Attributes

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

Detailed Description

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

Every time a XML Tag of AIML 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

Category 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 ~Category  )  [virtual]
 

Default virtual destructor.

Destroys the private implementation (m_pimpl) data.


Member Function Documentation

virtual const StringPimpl& getPatternString  )  throw (InternalProgrammerErrorException &) [virtual]
 

Returns the internal Pattern reference's string reference through Pattern::getStringConstRef().

This class holds a reference to a Pattern object it recieved through Category::handleInnerTag(). When this method is called, it will in turn call its reference's getStringConstRef (Pattern::getStringConstRef()). This calls the getStringConstRef for efficiency reasons to get a reference instead of making a copy.

Returns:
Returns the string of the internal Pattern object's Pattern::getStringConstRef()
Exceptions:
InternalProgrammerErrorException is thrown only if the error is so grave that the entire AIML engine has to be shut down.

virtual const shared_ptr<Template>& getTemplate  )  throw (InternalProgrammerErrorException &) [virtual]
 

Returns a reference to the internal Template.

This is used to grab a reference to the internal Template and call it's Template::getString() method. However, Category retains ownership over the object.

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

virtual const StringPimpl getTemplateString  )  throw (InternalProgrammerErrorException &) [virtual]
 

Returns the internal Template reference's string through Template::getString().

This class holds a reference to a Template object it recieved through Category::handleInnerTag(). When this method is called, it will in turn call its reference's getString (Template::getString())

Returns:
Returns the string of the internal Template object's Template::getString()
Exceptions:
InternalProgrammerErrorException is thrown only if the error is so grave that the entire AIML engine has to be shut down.

virtual const StringPimpl& getThatString  )  throw (InternalProgrammerErrorException &) [virtual]
 

Returns the internal That reference's string reference through That::getStringConstRef().

This class holds a reference to a That object it recieved through Category::handleInnerTag(). When this method is called, it will in turn call its reference's getStringConstRef (That::getStringConstRef()). This calls the getStringConstRef for efficiency reasons to get a reference instead of making a copy.

Returns:
Returns the string of the internal That object's That::getStringConstRef()
Exceptions:
InternalProgrammerErrorException is thrown only if the error is so grave that the entire AIML engine has to be shut down.

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

If the Tag is a PatternSideThat, Template, or Pattern it adds the reference to its self, otherwise it throws a rebecca::impl::InternalProgrammerErrorException.

The tag is checked with Tag::instanceOf() to determine if it is an instance of one of the above mentioned classes. If it is not, an rebecca::impl::InternalProgrammerErrorException will be thrown. Otherwise the tag will be downcast using a static_cast<> to the appropriate subclass Tag and the reference added to this class.

Parameters:
tag PatternSideThat, Template, or Pattern Tag
Exceptions:
InternalProgrammerErrorException is thrown if Tag is not PatternSideThat, Template, or Pattern.

Reimplemented from Tag.


Member Data Documentation

shared_ptr<CategoryImpl> 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 InnerTopic.


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