classtree.h

来自「用来文本分类的」· C头文件 代码 · 共 47 行

H
47
字号
// lassTree.h: interface for the ClassTree class.
//
//////////////////////////////////////////////////////////////////////
#include "ClassTreeNode.h"
class ClassTree  
{
public:
//construct and deconstruct
	ClassTree();
	virtual ~ClassTree();
	// move along the tree 
	bool Parent();
	bool NextSibling();
	bool FirstChild();
	bool Root();
	//add and remove the tree
	void BuildRoot(CString strKindName);
	bool InsertChild(int nDimOfVector,CString strKindName);
	bool InsertSibling(int nDimOfVector,CString strKindName);
	void RemoveSubTree(ClassTreeNode *);
	bool RemoveTree();
	//visit
	void PostOrder();
	int GetChildNum();
	//check function
	bool CurrentIsNull()
	{
		if(current==NULL)
			return true;
		else
			return false;
	};
	//save and update tree
	void SaveTree(FILE *fp);
	void UpdateTree(FILE *fp);
private:
	void SavePreOrder(FILE *fp);
	void UpdatePreOrder(FILE *fp);
	void SaveNode(FILE *fp);
	void UpdateNode(FILE *fp);
public:
	ClassTreeNode * root;
	ClassTreeNode * current;
	CString strTree;
};

⌨️ 快捷键说明

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