From 4375bf0fcff3302d2f7f7e6021e7b27a7504caa5 Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Fri, 14 Aug 2015 18:01:08 +0200 Subject: [PATCH] KillKey also OK for RdExt. --- src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.cxx | 7 ------- src/SALOMESDS/SALOMESDS_PickelizedPyObjRdWrServer.hxx | 1 - src/SALOMESDS/SALOMESDS_PickelizedPyObjServer.cxx | 7 +++++++ src/SALOMESDS/SALOMESDS_PickelizedPyObjServer.hxx | 2 ++ 4 files changed, 9 insertions(+), 8 deletions(-) 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); }; } -- 2.39.2