topicstarprocessor.h
来自「J-Alice是一个用C++实现的Ailcebot的克隆。它可以做为一个mini」· C头文件 代码 · 共 37 行
H
37 行
/**
* TopicstarProcessor - Retrieves nth * of <topic>
*
* @author Jonathan Roewen
*/
#ifndef TOPICSTAR_PROCESSOR_H
#define TOPICSTAR_PROCESSOR_H
#include "AimlProcessor.h"
#include "Kernel.h"
#include <string>
using namespace std;
class TopicstarProcessor : public AimlProcessor
{
public:
~TopicstarProcessor() { }
string getName() const {
return "topicstar";
}
string getVersion() const {
return "1.0";
}
string process(Match *m, PElement e, Responder *, const string &) {
string index = e->getAttribute("index");
if (index.empty()) {
index = "1";
}
return m->getTopicStar(index[0] - '0');
}
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?