PyObject *_context = nullptr;
};
-void AdaoExchangeLayer::loadTemplate(AdaoModel::MainModel *model)
+void AdaoExchangeLayer::setFunctionCallbackInModel(AdaoModel::MainModel *model)
{
AutoGIL agil;
const char DECORATOR_FUNC[]="def DecoratorAdao(cppFunc):\n"
//
Visitor1 visitor(this->_internal->_decorator_func,this->_internal->_context);
model->visitPythonLeaves(&visitor);
- //
+}
+
+void AdaoExchangeLayer::loadTemplate(AdaoModel::MainModel *model)
+{
+ AutoGIL agil;
{
std::string sciptPyOfModelMaker(model->pyStr());
PyObjectRAII res(PyObjectRAII::FromNew(PyRun_String(sciptPyOfModelMaker.c_str(),Py_file_input,this->_internal->_context,this->_internal->_context)));
PyObject *getPythonContext() const;
std::string printContext() const;
void init();
+ void setFunctionCallbackInModel(AdaoModel::MainModel *model);
void loadTemplate(AdaoModel::MainModel *model);
void execute();
bool next(PyObject *& inputRequested);
AdaoExchangeLayer adao;
adao.init();
// For bounds, Background/Vector, Observation/Vector
+ adao.setFunctionCallbackInModel(&mm);
Visitor2 visitorPythonObj(adao.getPythonContext());
{
AutoGIL agil;
AdaoExchangeLayer adao;
adao.init();
// For bounds, Background/Vector, Observation/Vector
+ adao.setFunctionCallbackInModel(&mm);
Visitor2 visitorPythonObj(adao.getPythonContext());
{
AutoGIL agil;
AdaoExchangeLayer adao;
adao.init();
// For bounds, Background/Vector, Observation/Vector
+ adao.setFunctionCallbackInModel(&mm);
Visitor2 visitorPythonObj(adao.getPythonContext());
{
AutoGIL agil;
AdaoExchangeLayer adao;
adao.init();
// For bounds, Background/Vector, Observation/Vector
+ adao.setFunctionCallbackInModel(&mm);
VisitorCruePython visitorPythonObj(adao.getPythonContext());
{
AutoGIL agil;