textfile.h

来自「粗糙集应用软件」· C头文件 代码 · 共 70 行

H
70
字号
//-------------------------------------------------------------------
// Author........: Aleksander 豩rn
// Date..........:
// Description...:
// Revisions.....:
//===================================================================

#ifndef __TEXTFILE_H__
#define __TEXTFILE_H__

#include <copyright.h>

#include <kernel/structures/annotatedstructure.h>

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

class ifstream;
class ofstream;

//-------------------------------------------------------------------
// Class.........: TextFile
// Author........: Aleksander 豩rn
// Date..........:
// Description...: Enables the GUI to represent text files in the
//                 project tree.
// Revisions.....:
//===================================================================

class TextFile : public AnnotatedStructure {
public:

  //- Type definitions...............................................
	typedef Vector(Handle<TextFile>) Handles;

private:

  //- Member variables..............................................
	String                filename_;

protected:

	//- Constructors...................................................
  TextFile(const TextFile &in);

public:

  //- Constructor and destructor....................................
	TextFile();
  virtual ~TextFile();

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

	//- Methods inherited from Persistent.............................
  virtual bool          Load(ifstream &stream);
  virtual bool          Save(ofstream &stream) const;

  //- Methods inherited from Structure..............................
  virtual Structure    *Duplicate() const;
  virtual void          Clear();

  //- Local methods.................................................
	const String         &GetFilename() const {return filename_;}
	bool                  SetFilename(const String &filename) {filename_ = filename; return true;}

};

#endif

⌨️ 快捷键说明

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