inputstream.h

来自「一个简单灵活的数据挖掘实验平台」· C头文件 代码 · 共 33 行

H
33 行
字号
#ifndef _MINING_INPUTSTREAM_
#define _MINING_INPUTSTREAM_
#include <string>

#include "..\\Core\\Data.h"
#include "..\\Core\\MetaData.h"
#include "..\\Core\\Exception.h"
using namespace std;

class  InputStream
{
public:
	InputStream(MetaData* metaData=0);
    virtual ~InputStream();
public:
	Data& data() const; //: gets the current read data
	MetaData& metaData() const; //: gets the meta data 
    int data_size() const;
	int count() const;
public:
	virtual void open()  = 0;     //: open the input stream
	virtual void close() = 0;     //: close the input stream
	virtual bool next()  = 0;     //: get next mining vector,return false if none
	virtual void reset() = 0;     //: reset the input stream, if not support throws MiningException
    virtual void recognize() = 0; //: recognize the metadata
protected:
	int _cursor;     //: cursor of the current reading value
	int _data_size; //: size of the record data obtained
	bool _recognized;//: marked wether the metadata has been recognized or not
	MetaData* _metaData; //:mining data settings
	Data* _data;     //: current data
};
#endif

⌨️ 快捷键说明

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