PlainWord Class Reference

Used by other inner template Tags to be able to add plain text as a InnerTemplate Tag. More...

#include <PlainWord.h>

Inheritance diagram for PlainWord:

InnerTemplate InnerCategory InnerTopic InnerAIML Tag List of all members.

Public Member Functions

virtual StringPimpl getString () const throw (InternalProgrammerErrorException &)
 Returns the internal string with no transformations.
 PlainWord (const StringPimpl &word) throw (InternalProgrammerErrorException &)
 Initalizes the private implementation (m_pimpl) data and sets the internal string with value given in the constructor.
 PlainWord () throw (InternalProgrammerErrorException &)
 Initalizes the private implementation (m_pimpl) data.
virtual ~PlainWord ()
 Default virtual destructor.

Private Attributes

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

Detailed Description

Used by other inner template Tags to be able to add plain text as a InnerTemplate Tag.

This is important to be able to add plain text as an inner template and be treated as such.

For example, when <template>Hi <person>frank</person> how are you</template> is encountered it is important to be able to store the plain text, "Hi", "how are you" as PlainWords. This enables the plain text to be added to the internal data structures as InnerTemplate Tags. Latter when the the internal data structure of InnerTemplate Tags is traversed and InnerTemplate::getString() is called on the PlainWord it will return the plain text with no transformations.

When an unimplemented tag is encountered a PlainWord object can be used to perserve the text inbetween the tag too. For example, <html:br>blah</html:br>, <html:br> is not implemented. However, if we still want the text of "blah" to be treated as plain text we can return a PlainWord object instead of a NonImplemented Tag which would not return any text what so ever.


Constructor & Destructor Documentation

PlainWord  )  throw (InternalProgrammerErrorException &)
 

Initalizes the private implementation (m_pimpl) data.

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

PlainWord const StringPimpl word  )  throw (InternalProgrammerErrorException &)
 

Initalizes the private implementation (m_pimpl) data and sets the internal string with value given in the constructor.

Parameters:
word The string to initialize the PlainWord with.
Exceptions:
InternalProgrammerErrorException is thrown only if the error is so grave that the entire AIML engine has to be shut down.

virtual ~PlainWord  )  [virtual]
 

Default virtual destructor.

Destroys the private implementation (m_pimpl) data.


Member Function Documentation

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

Returns the internal string with no transformations.

Returns:
The internal plain string with no transformations.
Exceptions:
InternalProgrammerErrorException is thrown only if the error is so grave that the entire AIML engine has to be shut down.

Reimplemented from InnerTemplate.


Member Data Documentation

shared_ptr<PlainWordImpl> 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 InnerTemplate.


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