From: Anthony Geay Date: Fri, 14 Aug 2015 16:01:08 +0000 (+0200) Subject: KillKey also OK for RdExt. X-Git-Tag: V7_7_0a1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4375bf0fcff3302d2f7f7e6021e7b27a7504caa5;p=modules%2Fkernel.git KillKey also OK for RdExt. --- diff --git a/src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.cxx b/src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.cxx index 38c51e54a..a4aba64f2 100644 --- a/src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.cxx +++ b/src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.cxx @@ -115,13 +115,6 @@ void PickelizedPyObjRdWrServer::addKeyValueHard(PyObject *key, PyObject *value) throw Exception("PickelizedPyObjRdWrServer::addKeyValueHard : error when trying to add key,value to dict !"); } -void PickelizedPyObjRdWrServer::removeKeyInVarErrorIfNotAlreadyExisting(PyObject *key) -{ - checkKeyPresent(key); - if(PyDict_DelItem(_self,key)!=0) - throw Exception("PickelizedPyObjRdWrServer::removeKeyInVarErrorIfNotAlreadyExisting : error during deletion of key in dict !"); -} - std::string PickelizedPyObjRdWrServer::getAccessStr() const { return std::string(ACCESS_REPR); diff --git a/src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.hxx b/src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.hxx index 0a3a3e093..09e94e1ea 100644 --- a/src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.hxx +++ b/src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.hxx @@ -42,7 +42,6 @@ namespace SALOMESDS public: std::string getAccessStr() const; void addKeyValueHard(PyObject *key, PyObject *value); - void removeKeyInVarErrorIfNotAlreadyExisting(PyObject *key); public: static const char ACCESS_REPR[]; }; diff --git a/src/SALOMESDS/SALOMESDS_PickelizedPyObjServer.cxx b/src/SALOMESDS/SALOMESDS_PickelizedPyObjServer.cxx index 587bc55fa..c43fff87b 100644 --- a/src/SALOMESDS/SALOMESDS_PickelizedPyObjServer.cxx +++ b/src/SALOMESDS/SALOMESDS_PickelizedPyObjServer.cxx @@ -270,3 +270,10 @@ void PickelizedPyObjServerModifiable::addKeyValueErrorIfAlreadyExisting(PyObject if(!isOK) throw Exception("PickelizedPyObjServerModifiable::addKeyValueErrorIfAlreadyExisting : error when trying to add key,value to dict !"); } + +void PickelizedPyObjServerModifiable::removeKeyInVarErrorIfNotAlreadyExisting(PyObject *key) +{ + checkKeyPresent(key); + if(PyDict_DelItem(_self,key)!=0) + throw Exception("PickelizedPyObjServerModifiable::removeKeyInVarErrorIfNotAlreadyExisting : error during deletion of key in dict !"); +} diff --git a/src/SALOMESDS/SALOMESDS_PickelizedPyObjServer.hxx b/src/SALOMESDS/SALOMESDS_PickelizedPyObjServer.hxx index 034588775..d3ed0bd0d 100644 --- a/src/SALOMESDS/SALOMESDS_PickelizedPyObjServer.hxx +++ b/src/SALOMESDS/SALOMESDS_PickelizedPyObjServer.hxx @@ -76,7 +76,9 @@ namespace SALOMESDS public: PickelizedPyObjServerModifiable(DataScopeServerBase *father, const std::string& varName, const SALOME::ByteVec& value); PickelizedPyObjServerModifiable(DataScopeServerBase *father, const std::string& varName, PyObject *obj); + public: void addKeyValueErrorIfAlreadyExisting(PyObject *key, PyObject *value); + void removeKeyInVarErrorIfNotAlreadyExisting(PyObject *key); }; }