-// Copyright (C) 2006-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2015 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include "TypeCode.hxx"
#include "WhileLoop.hxx"
#include "ForLoop.hxx"
+#include "ForEachLoop.hxx"
#include "SalomeOptimizerLoop.hxx"
#include "Bloc.hxx"
#include "InputPort.hxx"
//Components
#include "CORBAComponent.hxx"
#include "SalomeComponent.hxx"
+#include "SalomeHPComponent.hxx"
#include "SalomePythonComponent.hxx"
#include "CppComponent.hxx"
#include "SalomeContainer.hxx"
#include "CppContainer.hxx"
+#include "SalomeHPContainer.hxx"
//Nodes
#include "PythonNode.hxx"
typeMap["seqboolvec"]= createSequenceTc("seqboolvec","seqboolvec",typeMap["boolvec"]);
std::list<TypeCodeObjref *> ltc;
typeMap["pyobj"]= createInterfaceTc("python:obj:1.0","pyobj",ltc);
+ typeMap["seqpyobj"]= createSequenceTc("seqpyobj","seqpyobj",typeMap["pyobj"]);
+ composednodeMap["ForEachLoop_pyobj"]=createForEachLoop("ForEachLoop_pyobj",typeMap["pyobj"]);;
ENGINE::TypeCodeStruct *t = createStructTc("","Engines/dataref");
t->addMember("ref",_tc_string);
typeMap["dataref"]= t;
* bit1 (UseXml) true if python nodes are needed
* bit1 (UseCpp) true if C++ nodes are needed
* bit1 (UseSalome) true if Salome nodes are needed
+ * \param argc number of command line arguments (used to initialize the Python interpreter)
+ * \param argv command line arguments (used to initialize the Python interpreter)
*
*/
#else
Py_InitializeEx(0); // do not install signal handlers
#endif
- PySys_SetArgv(argc, argv);
+ if (argc > 0 && argv != NULL)
+ PySys_SetArgv(argc, argv);
+ else
+ {
+ int pyArgc = 1;
+ char* pyArgv[1];
+ char defaultName[] = "SALOME_YACS_RUNTIME";
+ pyArgv[0] = defaultName;
+ PySys_SetArgv(pyArgc, pyArgv);
+ }
PyEval_InitThreads(); /* Create (and acquire) the interpreter lock (for threads)*/
PyEval_SaveThread(); /* Release the thread state */
//here we do not have the Global Interpreter Lock
return new SalomePythonComponent(name);
else if (kind == CppComponent::KIND)
return new CppComponent(name);
+ else if (kind == SalomeHPComponent::KIND)
+ return new SalomeHPComponent(name);
std::string msg="Component Instance kind ("+kind+") unknown";
throw Exception(msg);
}
Container *RuntimeSALOME::createContainer(const std::string& kind)
{
- if(kind == "" || kind == SalomeComponent::KIND)
+ if(kind == "" || kind == SalomeContainer::KIND)
return new SalomeContainer;
- else if (kind == CppComponent::KIND)
+ if(kind==SalomeHPContainer::KIND)
+ return new SalomeHPContainer;
+ else if (kind == CppContainer::KIND)
return new CppContainer;
std::string msg="Container kind ("+kind+") unknown";
throw Exception(msg);