www.pudn.com > classSystem(c++).rar > ManagerList.h


// ManagerList.h: interface for the CManagerList class. 
// 
////////////////////////////////////////////////////////////////////// 
#include "ManagerNode.h" 
#include  
 
 
#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_)