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