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

📄 floatattribute.h

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

#ifndef __FLOATATTRIBUTE_H__
#define __FLOATATTRIBUTE_H__

#include <copyright.h>

#include <kernel/structures/attribute.h>

//-------------------------------------------------------------------
// Class.........: FloatAttribute
// Author........: Aleksander 豩rn
// Date..........: 960630
// Description...: For floating point values, n maps to "n" / m and
//                 "n" maps to n * m, m being a suitable scaling factor.
//
//                 Examples (scaling factor 100):
//
//                   "0.34"    <-> 34
//                   "3.45"    <-> 345
//                   "123.459" <-> 12346
//
// Comments......:
// Revisions.....:
//===================================================================

class FloatAttribute : public Attribute {
private:

	//- Private member variables.......................................
	int exponent_;  // Exponent of 10^n for scaling (determines resolution).

protected:

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

public:

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

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

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

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

  //- Methods inherited from Attribute...............................
	virtual int                       GetEntry(const String &text) const;
	virtual const String             &GetEntry(int value) const;
	virtual int                       SuggestEntry(const String &text) const;
	virtual bool                      SetEntry(int value, const String &text);

	virtual Attribute::Type           GetType() const;
	virtual int                       GetScalingExponent() const;
	virtual bool                      SetScalingExponent(int exponent);

};

#endif

⌨️ 快捷键说明

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