///////////////////////////////////////////////////////////
//  Factory.cpp
//  Implementation of the Class Factory
//  Created on:      10-九月-2008 9:40:09
//  Original author: sunxy
///////////////////////////////////////////////////////////

#include "RequFactory.h"
#include "RequBase.h"
#include "IntfData.h"
#include "SESOperator.h"

using namespace std;

RequFactory::RequFactory()
{

}

RequFactory::~RequFactory()
{

}

RequBase* RequFactory::Create(const string& type)
{
	RequBase* pOperator = NULL;

	if (0 == type.compare(TEACHER_SEARCHPROGRAM))//myType.Message_Search_PRGM_Requ))
	{
		pOperator = new CSearchPRGMRequ();
	}
//	else if (0 == type.compare(TEACHER_DEPLOYSCHEDULEPOLICYLIST))
//	{
//		pOperator = new CDeployLockShceduleRequ();
//	}
	else if (0 == type.compare(TEACHER_DEPLOYTABNAVPOLICYLIST))
	{
		pOperator = new CDeployPRGMListRequ();
	}
	else if (0 == type.compare(TEACHER_DEPLOYSCHEDULEPOLICY))
	{
		pOperator = new CDeployAutoLockRequ();
	}
	else if (0 == type.compare(TEACHER_DEPLOYTABNAVPOLICY))
	{
		pOperator = new CDeployPRGMRequ();
	}
	else if (0 == type.compare(TEACHER_MANUALLOCKREMOTESTUDENT))//myType.Message_Manual_Lock_Requ))
	{
		pOperator = new CManualLockRequ();
	}
	else if (0 == type.compare(TEACHER_MANUALUNLOCKREMOTESTUDENT))
	{
		pOperator = new CManualUnlockRequ();
	}
	else if (0 == type.compare(TEACHER_QUERYLOCKSCHEDULE))
	{
		pOperator = new CQueryPolicyRequ();
	}
	else if (0 == type.compare(TEACHER_ISREMOTESTUDENTLOCKED))
	{
		pOperator = new CIsRemoteStuLocked();
	}

	return pOperator;
}
