-// Copyright (C) 2006-2014 CEA/DEN, EDF R&D
+// Copyright (C) 2006-2016 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
return ret;
}
+std::string InputPyPort::getHumanRepr()
+{
+ if(!_data)
+ return dump();
+ PyObject *ret(PyObject_Str(_data));
+ if(!ret)
+ return dump();
+ std::string retCpp;
+ char *val(PyString_AsString(ret));
+ if(val)
+ retCpp=val;
+ Py_XDECREF(ret);
+ return retCpp;
+}
+
bool InputPyPort::isEmpty()
{
return _data == Py_None;
OutputPyPort::OutputPyPort(const OutputPyPort& other, Node *newHelder):OutputPort(other,newHelder),DataPort(other,newHelder),Port(other,newHelder),
_data(Py_None)
{
+ Py_INCREF(_data);
}
void OutputPyPort::put(const void *data) throw(ConversionException)