-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// Author : Anthony GEAY (EDF R&D)
#include "SALOMESDS_PickelizedPyObjRdExtServer.hxx"
+#include "SALOMESDS_PickelizedPyObjRdExtInitServer.hxx"
#include "SALOMESDS_DataScopeServer.hxx"
#include "SALOMESDS_Exception.hxx"
return SALOME::PickelizedPyObjRdExtServer::_narrow(obj);
}
+PickelizedPyObjRdExtInitServer *PickelizedPyObjRdExtServer::buildInitInstanceFrom(const std::string& varName)
+{
+ PyObject *pyobj(this->getPyObj()); Py_XINCREF(pyobj);
+ return new PickelizedPyObjRdExtInitServer(getFather(),varName,pyobj);
+}
+
void PickelizedPyObjRdExtServer::checkRdExtnessOf(const std::string& methodName, PyObject *argsPy)
{
if(!_self)
Py_XDECREF(argsPy);
throw Exception("PickelizedPyObjRdExtServer::checkRdExtnessOf : self is NULL !");
}
- if(PyTuple_Check(_self)==1 || PyString_Check(_self)==1 || PyInt_Check(_self)==1 || PyBool_Check(_self)==1 || PyFloat_Check(_self)==1)
+ if(PyTuple_Check(_self)==1 || PyBytes_Check(_self)==1 || PyLong_Check(_self)==1 || PyBool_Check(_self)==1 || PyFloat_Check(_self)==1)
return ;//_self is tuple, str, int or float -> immutable in python. So no method can break the RdExtness of _self.
if(PyList_Check(_self)==1)
checkListRdExtnessOf(methodName,argsPy);
{
return std::string(ACCESS_REPR);
}
+
+
+PickelizedPyObjRdExtInitServer *PickelizedPyObjRdExtFreeStyleServer::buildInitInstanceFrom(const std::string& varName)
+{
+ PyObject *pyobj(this->getPyObj()); Py_XINCREF(pyobj);
+ return new PickelizedPyObjRdExtInitFreeStyleServer(getFather(),varName,pyobj,std::move(_cmp_func_content),std::move(_cmp_func));
+}