customaiml.cpp

来自「AIML的实现」· C++ 代码 · 共 45 行

CPP
45
字号
//Custom tag includes#include "CustomAIML.h"#include "typedefs.h"namespace customTag{namespace impl{CustomAiml::CustomAiml(GraphBuilderFramework &builder, Html &htmlPage)	throw(InternalProgrammerErrorException &)	: AIML(builder), m_defaultStarTopic(builder, htmlPage){	/*	 * Add the name of this class.  Otherwise if I 	 * didn't do this I could not call Tag::instanceOf("CustomAiml")	 * on a CustomAiml object and get a true back.	 */	addInstanceOf("CustomAiml");}void CustomAiml::handleInnerTag(const shared_ptr<Tag> &tag)	throw(InternalProgrammerErrorException &){	if(tag->instanceOf("Topic"))	{		/*		 * Found instance of topic and am ignoring it.		 */	}	else	{       /*		* Send the tag to our CustomTopic class		*/		m_defaultStarTopic.handleInnerTag(tag);	}}} //end of namespace impl} //end namespace customTag

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?