Version: 9.15.0
PythonNode.cxx File Reference
#include "RuntimeSALOME.hxx"
#include "PythonNode.hxx"
#include "PythonPorts.hxx"
#include "TypeCode.hxx"
#include "PythonCppUtils.hxx"
#include "Container.hxx"
#include "SalomeContainer.hxx"
#include "SalomeHPContainer.hxx"
#include "SalomeContainerTmpForHP.hxx"
#include "ConversionException.hxx"
#include "ReceiverFactory.hxx"
#include "SenderByteImpl.hxx"
#include "PyStdout.hxx"
#include <iostream>
#include <memory>
#include <sstream>
#include <fstream>
#include "YacsTrace.hxx"
#include <mutex>
Include dependency graph for PythonNode.cxx:

Go to the source code of this file.

Typedefs

typedef int Py_ssize_t
 

Functions

Engines::Container_var GetContainerObj (InlineNode *reqNode, bool &isStandardCont)
 

Variables

static char SCRIPT_FOR_BIGOBJECT []
 
static std::mutex data_mutex
 

Typedef Documentation

◆ Py_ssize_t

typedef int Py_ssize_t

Definition at line 45 of file PythonNode.cxx.

Function Documentation

◆ GetContainerObj()

Engines::Container_var GetContainerObj ( InlineNode reqNode,
bool &  isStandardCont 
)

Definition at line 139 of file PythonNode.cxx.

140 {
141  isStandardCont = false;
142  Container *container(reqNode->getContainer());
143  Engines::Container_var objContainer(Engines::Container::_nil());
144  if(!container)
145  throw YACS::Exception("No container specified !");
146  SalomeContainer *containerCast0(dynamic_cast<SalomeContainer *>(container));
147  SalomeHPContainer *containerCast1(dynamic_cast<SalomeHPContainer *>(container));
148  if(containerCast0)
149  {
150  isStandardCont = true;
151  objContainer=containerCast0->getContainerPtr(reqNode);
152  }
153  else if(containerCast1)
154  {
155  YACS::BASES::AutoCppPtr<SalomeContainerTmpForHP> tmpCont(SalomeContainerTmpForHP::BuildFrom(containerCast1,reqNode));
156  objContainer=tmpCont->getContainerPtr(reqNode);
157  }
158  else
159  throw YACS::Exception("Unrecognized type of container ! Salome one is expected for PythonNode/PyFuncNode !");
160  if(CORBA::is_nil(objContainer))
161  throw YACS::Exception("Container corba pointer is NULL for PythonNode !");
162  return objContainer;
163 }
virtual Container * getContainer()
Definition: InlineNode.cxx:100

References YACS::ENGINE::SalomeContainerTmpForHP::BuildFrom(), YACS::ENGINE::InlineNode::getContainer(), and YACS::ENGINE::SalomeContainer::getContainerPtr().

Referenced by YACS::ENGINE::PythonNode::executeRemote(), and YACS::ENGINE::PythonEntry::loadPythonAdapter().

Variable Documentation

◆ data_mutex

◆ SCRIPT_FOR_BIGOBJECT

char SCRIPT_FOR_BIGOBJECT[]
static
Initial value:
="import SALOME_PyNode\n"
"BigObjectOnDiskBase = SALOME_PyNode.BigObjectOnDiskBase\n"

Definition at line 84 of file PythonNode.cxx.

Referenced by YACS::ENGINE::PythonEntry::loadRemoteContext().