managerlist.h

来自「一个用mfc开发的基于文本数据库的学生信息管理系统」· C头文件 代码 · 共 62 行

H
62
字号
// ManagerList.h: interface for the CManagerList class.
//
//////////////////////////////////////////////////////////////////////
#include "ManagerNode.h"
#include <fstream.h>


#if !defined(AFX_MANAGERLIST_H__226D009C_B6EF_4046_9410_027AB7D0A274__INCLUDED_)
#define AFX_MANAGERLIST_H__226D009C_B6EF_4046_9410_027AB7D0A274__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CManagerList  
{
public:
	CManagerList();
	virtual ~CManagerList();

	bool Append(char ManagerName[],char Pwd[]);//在链表末尾加入数据项(从文件中读取),使所有数据方便用户方便查找
	bool find(CString ManagerName,CManagerNode &Manager);//根据用户名返回其余详细信息
	bool remove(CManagerNode &manager);
	bool Append(CString account,CString password);

	bool setBegin(){fence = head;return true;}

	bool setData(CManagerNode &manager);
	bool IsAtEnd()
	{
		if(fence == tail)
		{
			return true;
		}
		else
		{
			return false;
		}
	}

	bool next()
	{
		if(fence->next != NULL)
		{
			fence = fence->next;
			return true;
		}
		return false;
	}
	bool GetData(CManagerNode &manager);//获取fence处的数据

private:
	CManagerNode* head;
	CManagerNode* fence;
	CManagerNode* tail;
	
	

};

#endif // !defined(AFX_MANAGERLIST_H__226D009C_B6EF_4046_9410_027AB7D0A274__INCLUDED_)

⌨️ 快捷键说明

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