dataset.h

来自「这是一个银行系统的管理软件」· C头文件 代码 · 共 62 行

H
62
字号
/**********************************************************************************
*                                                                                 *
*  Henry's DataBase Toolkit for C++ (Based on Dragon Project)                     *
*  Copyright (c) 2004 by Henry. All rights reserved.                              *
*                                                                                 *
*  Permission to use, copy, modify, and distribute this software for any purpose  *
*  is hereby granted without fee, provided that this copyright and permissions    *
*  notice appear in all copies and derivatives, and that no charge may be made    *
*  for the software and its documentation except to cover cost of distribution.   *
*                                                                                 *
*  This software is provided "as is" without express or implied warranty.         *
*                                                                                 *
**********************************************************************************/

/*
*  Description:
*
*    All common functions here.
*
*  Notes:
*
*    This code has been written to conform to standard C++ and STL. It has been
*    compiled successfully using Visual C++ 7.0.
*/
#ifndef GUARD_dataSet_h
#define GUARD_dataSet_h

#include <vector>
#include <string>
#include "delimited_file.h"
using namespace dragon;
using namespace std;

class DataSet
{
public:
	vector<string> dataRow;
public:
	DataSet();
	DataSet(string);
	void transact();
	void commit();
	void update();
	void append(vector<string> newRow);
	bool moveNext();
	bool movePrev();
	bool moveFirst();
	bool moveLast();
	bool moveTo(size_t row);
	bool query(size_t column, string value);
	bool Eof(), Bof();
	size_t getRowCount();
	size_t getRowId();
  
	virtual string toString()
	{
		return "DataSet Object";
	}
private:
	Delimited_file dataSource;
};
#endif

⌨️ 快捷键说明

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