#include <InnerTemplate.h>
Inheritance diagram for InnerTemplate:
Public Member Functions | |
virtual void | add (const shared_ptr< InnerTemplate > &tag) throw (InternalProgrammerErrorException &) |
Add an InnerTemplate AIML XML Tag object to the underlying data structure. | |
virtual StringPimpl | getString () const throw (InternalProgrammerErrorException &) |
Return the results of what the AIML XML InnerTemplate Tag is suppose to return according to the AIML specification. | |
virtual void | handleInnerTag (const shared_ptr< Tag > &tag) throw (InternalProgrammerErrorException &) |
Calls InnerTemplate::add with the Tag object. | |
InnerTemplate () throw (InternalProgrammerErrorException &) | |
Default constructor to initalize the private implementation (m_pimpl) data. | |
virtual | ~InnerTemplate () |
Default virtual destructor. | |
Private Attributes | |
shared_ptr< InnerTemplateImpl > | m_pimpl |
The private implementation in which you cannot get access to. |
This class adds the operations needed by AIML XML Tag classes that are inside of the <template> AIML XML tag.
If you write a AIML XML tag class such as Li, Srai, LowerCase, etc... which reside inside of <InnerTemplate> you should either inherit from this class or from another class which already inherits from this class.
|
Default constructor to initalize the private implementation (m_pimpl) data.
|
|
Default virtual destructor. Destroys the private implementation (m_pimpl) data. |
|
Add an InnerTemplate AIML XML Tag object to the underlying data structure. This method goes hand-in-hand with InnerTemplate::getString(). When a Inner Tag object is "added" it is put into a data structure for latter retrieval by InnerTemplate::getString(). This method is a no-ops (No operations) method and does nothing by its self. It is up to the inheriting class to determine how to add the Tag as well as latter retrieve it by InnerTemplate::getString(). For example if <think><person>blah</person></think> is encountered, the Tag object Person will be sent to the Think object through this method after the end element of Person (</person>) is encountered. It is up to the Think object's implementation of this method to "add" or keep track of the person object. When Think's Think::getString() method is called it is up to Think to retrieve and call Person's Person::getString() and retrieve the string of Person before returning Think's string. One more example would be: <formal><person><sentence>blah</sentence></person></formal> Here when </sentence> is encountered the Person object will be sent a shared_ptr to the Sentece object through this method. Next, </person> will be encountered and the Formal object will be sent a shared_ptr to the Person object through this method. When Formal's method Formal::getString() is called, it will in turn call Person's Person::getString(). Person in turn will call Sentence's Sentence::getString(). Sentence returns to Person "blah" as "Blah" according to what the AIML XML Sentence Tag is suppose to do. The Person object gets Setence's string, transforms it according to what the AIML XML Person Tag is suppose to do and returns it to Formal. Formal's call to Person::getString() finally returns and it transforms it according to what the AIML XML Formal Tag is suppose to transform it to and returns it.
Reimplemented in Condition, InnerTemplateListImpl, and Random. |
|
Return the results of what the AIML XML InnerTemplate Tag is suppose to return according to the AIML specification. This method goes hand-in-hand with InnerTemplate::add(). When this method is called the string representation of the AIML XML InnerTemplate Tag is returned. Any string transformations that are to be applied to the AIML XML InnerTemplate Tag are applied during this call. This method is a no-ops (No operations) method and does nothing by its self. A simple example would be when the InnerTemplate <formal>blah</formal> is encountered a Formal Object is created. When Formal's method Formal::getString() is called, Formal returns the string blah tansformed into "Blah". For more complex examples see InnerTemplate::add().
Implements InnerCategory. Reimplemented in Bot, Condition, Date, Formal, Gender, Get, Gossip, Id, InnerTemplateListImpl, Input, Learn, LowerCase, Person, Person2, PlainWord, Random, Sentence, Set, Size, Srai, Star, System, TemplateSideThat, ThatStar, Think, TopicStar, UpperCase, and Version. |
|
Calls InnerTemplate::add with the Tag object. First using Tag::instanceOf() it checks that the AIML XML Tag is an instance of InnerTemplate. If it is it calls InnerTemplate::add() with the object, otherwise it throws a rebecca::impl::InternalProgrammerErrorException which would shut down the AIML engine altogether.
Reimplemented from Tag. |
|
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 InnerCategory. Reimplemented in Bot, Condition, Date, Formal, Gender, Get, Gossip, Id, InnerTemplateListImpl, Input, Learn, Li, LowerCase, NonImplemented, Person, Person2, PlainWord, Random, Sentence, Set, Size, Srai, Star, System, TemplateSideThat, ThatStar, Think, TopicStar, UpperCase, and Version. |