6 #include "PyClassFactory.h"
7 #include "ScriptProcessorPy.h"
10 extern "C" __declspec(dllexport)
IStdClassFactory* __cdecl GetStdClassFactory()
27 PyClassFactory::PyClassFactory()
32 PyClassFactory::~PyClassFactory()
39 ScriptProcessor *PyClassFactory::CreateScriptProcessor(std::string strType,
bool bThrowError)
41 ScriptProcessor *lpScript=NULL;
47 if(strType ==
"SCRIPTPROCESSORPY")
48 lpScript =
new ScriptProcessorPy();
53 THROW_PARAM_ERROR(Al_Err_lInvalidPartType, Al_Err_strInvalidPartType,
"PartType", strType);
58 catch(CStdErrorInfo oError)
60 if(lpScript)
delete lpScript;
66 if(lpScript)
delete lpScript;
67 THROW_ERROR(Std_Err_lUnspecifiedError, Std_Err_strUnspecifiedError);
76 CStdSerialize *PyClassFactory::CreateObject(std::string strClassType, std::string strObjectType,
bool bThrowError)
82 if(strClassType ==
"SCRIPTPROCESSOR")
83 lpObject = CreateScriptProcessor(strObjectType, bThrowError);
88 THROW_PARAM_ERROR(Std_Err_lInvalidClassType, Std_Err_strInvalidClassType,
"ClassType", strClassType);
std::string Std_Trim(std::string strVal)
Trims a string.
std::string Std_ToUpper(std::string strVal)
Converts a string to upper case.