rulechain.h
来自「基于专家系统应用的程序代码 使用vc编程,access为数据库的程序」· C头文件 代码 · 共 42 行
H
42 行
// RuleChain.h: interface for the RuleChain class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_RULECHAIN_H__23CF5793_1289_4FF5_8A3A_7405D81E3AA3__INCLUDED_)
#define AFX_RULECHAIN_H__23CF5793_1289_4FF5_8A3A_7405D81E3AA3__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class RuleNode
{
//friend class RuleChain;
//private:
public:
RuleNode(CString name,CString premise,CString con,bool flag);
CString name,premise,conclusion;
bool flag;//true表示触发过,false表示没触发
int type;
RuleNode* next;
};
class RuleChain
{//链表没有头结点
private:RuleNode* head;
public:
RuleNode* getFirstRule();
RuleNode* nextRule(RuleNode* node);
CString findCon(CString* facts);
RuleChain();
virtual ~RuleChain();
bool isEmpty();
void deleteRule(CString* name);
void appendRule(CString& name,CString& pre,CString& con,bool flag);
void DestroyChain();
};
#endif // !defined(AFX_RULECHAIN_H__23CF5793_1289_4FF5_8A3A_7405D81E3AA3__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?