資源簡介
根據離散點畫等值線,使用OpenGL等方法進行填充的源程序
代碼片段和文件信息
/*
**?appFactory.cpp?-?
**
**?This?program?is?free?software.?You?can?use?copy?and?modify?it?under
**?the?terms?of?the?GPL.?See?the?file?COPYING?for?the?full?GPL?license.
**
**?(c)?2001?Aquilon?Technology?Systems?Inc.
**
**?DPT?12.12.98
*/
#include?“appFactory.h“
#include?“gtkApp.h“
#include?
//statics
AppFactory?*?AppFactory::mInstance?=?NULL;
AppFactory::AppFactory()
{
mInstance?=?NULL;
mCurrentApp?=?NULL;
}
AppFactory::~AppFactory()
{
}
AppFactory?*?AppFactory::GetInstance()
{
if?(!mInstance)
mInstance?=?new?AppFactory();
return?mInstance;
}
/*
**?GetApp?-?As?we?get?more?application?frameworks?we?may
** wish?to?return?different?ones?here.
*/
BathApp?*?AppFactory::GetApp(int?argc?char?**argv)
{
//all?we?do?is?gtk...
mCurrentApp?=?new?GtkApp;
mCurrentApp->Initialize(argcargv);
return?mCurrentApp;
}
/*
**?GetApp?-?Call?this?without?params?if?you?need?to?get?ahold
** of?the?App?object.
*/
BathApp?*?AppFactory::GetApp()
{
return(mCurrentApp);
}
評論
共有 條評論