www.pudn.com > MyProject.rar > DataBase.h


#ifndef _DATABASE_H 
#define _DATABASE_H 
#define WIN32 
#include "DataRecord.h" 
#include "RecordFormat.h" 
 
class CDataBase:public GUtSafeVector 
{ 
public: 
	CDataBase(void); 
	CDataBase(GUtString name); 
	~CDataBase(void); 
	bool SetFormat(CRecordFormat &format); 
	CRecordFormat GetFormat(); 
	bool AddRecord(CDataRecord &record); 
	bool DeleteRecord(int index); 
	bool InsertRecord(int index,CDataRecord &record); 
	bool SetRecord(int index); 
	GUtString GetName(); 
	bool operator==(CDataBase &dataBase)const; 
	void AddFormatCell(GUtString &cell); 
	void AddRecordCell(GUtString &cell); 
 
protected: 
	GUtString m_sName; 
	CRecordFormat m_Format; 
}; 
 
#endif