📄 sraiprocessor.h
字号:
/**
* SraiProcessor - Symbolic Reduction!
*
* @author Jonathan Roewen
*/
#ifndef SRAI_PROCESSOR_H
#define SRAI_PROCESSOR_H
#include "AimlProcessor.h"
#include "Kernel.h"
#include "Utils.h"
#include <string>
#include <iostream>
using namespace std;
class SraiProcessor : public AimlProcessor
{
public:
~SraiProcessor() { }
string getName() const {
return "srai";
}
string getVersion() const {
return "1.0";
}
string process(Match *m, PElement e, Responder *r, const string &id) {
string srai;
if (e->hasChildren()) {
srai = Kernel::process(m, e, r, id), id;
} else {
srai = e->getText(), id;
}
// Need to lowercase the <srai> input as getting some
// funky output (uppercase text in <star/> etc).
return Kernel::respond(toLower(srai), id, true);
}
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -