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

📄 complexfactory.cpp

📁 C语言库函数(包括所有的C语言库函数)
💻 CPP
字号:
// ComplexFactory.cpp: implementation of the ComplexFactory class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "PainterUsePattern.h"
#include "ComplexFactory.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//=================================================================
//静态成员初始化;
//=================================================================
ComplexFactory* ComplexFactory::m_onlyOneInstance = 0;
bool            ComplexFactory::m_onlyOne = false;
//=================================================================
//构造函数;
//=================================================================
ComplexFactory::ComplexFactory()
{

}
//=================================================================
//析构函数;
//=================================================================
ComplexFactory::~ComplexFactory()
{

}
//=================================================================
//实例化函数;
//=================================================================
ComplexFactory* ComplexFactory::Instance()
{
	if( m_onlyOne == false )
	{
		m_onlyOne = true;
		m_onlyOneInstance = new ComplexFactory;
	}
	return m_onlyOneInstance;
}

⌨️ 快捷键说明

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