📄 democratfactory.cpp
字号:
// DemocratFactory.cpp: implementation of the DemocratFactory class.
//
//////////////////////////////////////////////////////////////////////
#include "DemocratFactory.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
DemocratFactory::DemocratFactory()
{
}
DemocratFactory::~DemocratFactory()
{
}
Officer* DemocratFactory::CreateOfficer(OfficialType type)
{
if(m_Officer!=NULL)
delete m_Officer;
switch(type)
{
case PresidentType:
m_Officer=new President("Democrat");
break;
case AttorneyGeneralType:
m_Officer=new AttorneyGeneral("Democrat");
break;
case MinorityPartyCongressPersonType:
m_Officer=new MinorityPartyCongressPerson("Democrat");
break;
default:
break;
}
return m_Officer;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -