⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exporter.h

📁 粗糙集应用软件
💻 H
字号:
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================

#ifndef __EXPORTER_H__
#define __EXPORTER_H__

#include <copyright.h>

#include <kernel/algorithms/algorithm.h>

#include <kernel/structures/decisiontable.h>

//-------------------------------------------------------------------
// Class prototypes.
//===================================================================

class ofstream;

//-------------------------------------------------------------------
// Class.........: Exporter
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Base class for algorithms dealing with exporting
//                 structural objects to alien formats.
// Revisions.....:
//===================================================================

class Exporter : public Algorithm {
private:

  //- Private member variables.......................................
	String                     filename_; // Export location.
	Handle<DecisionTable>      table_;    // Dictionary to use (if any).

protected:

  //- Export methods.................................................
	virtual bool               ExportPrologue(ofstream &stream, const Structure &structure) const;
	virtual bool               ExportData(ofstream &stream, const Structure &structure) const;
	virtual bool               ExportEpilogue(ofstream &stream, const Structure &structure) const;

  //- Table (dictionary) access......................................
	const DecisionTable       *GetDecisionTable() const;
	bool                       SetDecisionTable(const DecisionTable *table);

public:

  //- Constructors/destructor........................................
  Exporter();
  virtual ~Exporter();

  //- Methods inherited from Identifier..............................
	DECLAREIDMETHODS()

  //- Methods inherited from Algorithm...............................
	virtual String             GetParameters() const;
	virtual bool               GetOutputFilenames(Vector(String) &filenames) const;
	virtual bool               SetParameter(const String &keyword, const String &value);
  virtual Structure         *Apply(Structure &structure) const;

	//- Parameter management...........................................
	virtual bool               SetFilename(const String &filename);
	virtual const String      &GetFilename() const;

};

//-------------------------------------------------------------------
// Inlined methods.
//===================================================================

inline const DecisionTable *
Exporter::GetDecisionTable() const {
	return table_.GetPointer();
}

inline bool
Exporter::SetDecisionTable(const DecisionTable *table) {
	table_ = table;
	return true;
}

#endif

⌨️ 快捷键说明

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