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

📄 uofid.h

📁 遗传算法vc++语言版源程序,台湾大学编写。
💻 H
字号:
#ifndef _UOFID_
#define _UOFID_
#include <ostream>

using namespace std;

//! Basic class
/*! All classes in UOF are inherited from this class. Each class from UOFId is assigned to a unique id for identification*/
class UOFId
{public:
	//! This function examine the input class is the same with this class
	/*!return 1 if class b is the same with this, return 0 else	  \param b the UOFId class for comparison	*/	int sameClass(const UOFId &b) const {return(classID() == b.classID());} 
	//! This function returns the name of this class
	/*!Classes inherited from this class should override this funciton to get correct name*/	virtual const char * className() const {return "base uofid class";}
	//! This function returns the ID of this class
	/*!Classes inherited from this class should override this funciton to get correct ID*/	virtual int classID() const {return 0;}
	//! This function output the LogHeader of this class to output stream
	/*!Classes inherited from this class should override this funciton to output the correct LogHeader.
	The LogHeader function should output the necessary information of this class such as current setting.
	*/
	virtual void LogHeader(ostream&){}
};
#define UOFIdentity(name,id) \     const char * className() const {return name;} \     int classID() const {return id;}#define UOFDeclareIdentity() \     const char * className() const; \     int classID() const#define UOFDefineIdentitySRC(clss,name,id) \const char * clss :: className() const {return name;} \int clss :: classID() const {return id;}

#endif


⌨️ 快捷键说明

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