-// Copyright (C) 2006-2022 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2024 CEA, EDF
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
#include <Python.h>
+#include <set>
+
namespace YACS
{
namespace ENGINE
class YACSRUNTIMESALOME_EXPORT PythonEntry
{
public:
+ static bool IsProxy( PyObject *ob );
/*! return true only if ob is a proxy and destroy flag set to true*/
static bool GetDestroyStatus( PyObject *ob );
static void DoNotTouchFileIfProxy( PyObject *ob );
static void UnlinkOnDestructorIfProxy( PyObject *ob );
+ static void IfProxyDoSomething( PyObject *ob, const char *meth );
protected:
PythonEntry();
~PythonEntry();
void loadRemoteContext(InlineNode *reqNode, Engines::Container_ptr objContainer, bool isInitializeRequested);
static std::string GetContainerLog(const std::string& mode, Container *container, const Task *askingTask);
virtual bool hasImposedResource()const;
- static void IfProxyDoSomething( PyObject *ob, const char *meth );
protected:
PyObject *_context;
PyObject *_pyfuncSer;
PythonNode* cloneNode(const std::string& name);
virtual std::string typeName() { return "YACS__ENGINE__PythonNode"; }
void applyDPLScope(ComposedNode *gfn);
+ void setSqueezeStatusWithExceptions(bool sqStatus, const std::vector<std::string>& squeezeExceptions);
void setSqueezeStatus(bool sqStatus) { _autoSqueeze=sqStatus; }
bool getSqueezeStatus() const { return _autoSqueeze; }
void squeezeMemorySafe();
+ static void ExecuteLocalInternal(const std::string& codeStr, PyObject *context, std::string& errorDetails);
private:
void executeLocalInternal(const std::string& codeStr);
protected:
static const char DPL_INFO_NAME[];
protected:
bool _autoSqueeze = false;
+ //! list on output port name excluded from the squeeze mecanism
+ std::set<std::string> _nonSqueezableOutputNodes;
Engines::PyScriptNode_var _pynode;
};