Version: 9.16.0
SALOMESDS_PickelizedPyObjRdExtServer.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// This library is free software; you can redistribute it and/or
4// modify it under the terms of the GNU Lesser General Public
5// License as published by the Free Software Foundation; either
6// version 2.1 of the License, or (at your option) any later version.
7//
8// This library is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11// Lesser General Public License for more details.
12//
13// You should have received a copy of the GNU Lesser General Public
14// License along with this library; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19// Author : Anthony GEAY (EDF R&D)
20
21#ifndef __SALOMESDS_PICKELIZEDPYOBJRDEXTSERVER_HXX__
22#define __SALOMESDS_PICKELIZEDPYOBJRDEXTSERVER_HXX__
23
24#include "SALOMEconfig.h"
25#include CORBA_SERVER_HEADER(SALOME_SDS)
26
27#include <Python.h>
28
31
32namespace SALOMESDS
33{
34 class PickelizedPyObjRdExtInitServer;
35
36 class PickelizedPyObjRdExtServer : public PickelizedPyObjServerModifiable, public virtual POA_SALOME::PickelizedPyObjRdExtServer
37 {
38 public:
39 PickelizedPyObjRdExtServer(DataScopeServerBase *father, const std::string& varName, const SALOME::ByteVec& value);
40 PickelizedPyObjRdExtServer(DataScopeServerBase *father, const std::string& varName, PyObject *obj);
42 SALOME::PickelizedPyObjRdExtServer_ptr invokePythonMethodOn(const char *method, const SALOME::ByteVec& args);
44 public:
45 std::string getAccessStr() const;
46 private:
47 void checkRdExtnessOf(const std::string& methodName, PyObject *argsPy);
48 void checkListRdExtnessOf(const std::string& methodName, PyObject *argsPy);
49 void checkDictRdExtnessOf(const std::string& methodName, PyObject *argsPy);
50 void checkDictSetitemRdExtness(PyObject *argsPy);
51 public:
52 static const char ACCESS_REPR[];
53 };
54
56 {
57 public:
58 PickelizedPyObjRdExtFreeStyleServer(DataScopeServerBase *father, const std::string& varName, const SALOME::ByteVec& value, std::string&& compareFuncContent, SALOME::AutoPyRef&& compareFunc):PickelizedPyObjRdExtServer(father,varName,value),Sha1Keeper(std::move(compareFuncContent),std::move(compareFunc)) { }
59 PickelizedPyObjRdExtFreeStyleServer(DataScopeServerBase *father, const std::string& varName, PyObject *obj, std::string&& compareFuncContent, SALOME::AutoPyRef&& compareFunc):PickelizedPyObjRdExtServer(father,varName,obj),Sha1Keeper(std::move(compareFuncContent),std::move(compareFunc)) { }
61 };
62}
63
64#endif
Definition: SALOMESDS_DataScopeServer.hxx:76
Definition: SALOMESDS_PickelizedPyObjRdExtServer.hxx:56
PickelizedPyObjRdExtFreeStyleServer(DataScopeServerBase *father, const std::string &varName, const SALOME::ByteVec &value, std::string &&compareFuncContent, SALOME::AutoPyRef &&compareFunc)
Definition: SALOMESDS_PickelizedPyObjRdExtServer.hxx:58
PickelizedPyObjRdExtFreeStyleServer(DataScopeServerBase *father, const std::string &varName, PyObject *obj, std::string &&compareFuncContent, SALOME::AutoPyRef &&compareFunc)
Definition: SALOMESDS_PickelizedPyObjRdExtServer.hxx:59
PickelizedPyObjRdExtInitServer * buildInitInstanceFrom(const std::string &varName) override
Definition: SALOMESDS_PickelizedPyObjRdExtServer.cxx:161
State during the producer/consumer phase.
Definition: SALOMESDS_PickelizedPyObjRdExtInitServer.hxx:40
Definition: SALOMESDS_PickelizedPyObjRdExtServer.hxx:37
virtual PickelizedPyObjRdExtInitServer * buildInitInstanceFrom(const std::string &varName)
Definition: SALOMESDS_PickelizedPyObjRdExtServer.cxx:81
void checkDictRdExtnessOf(const std::string &methodName, PyObject *argsPy)
Definition: SALOMESDS_PickelizedPyObjRdExtServer.cxx:118
std::string getAccessStr() const
Definition: SALOMESDS_PickelizedPyObjRdExtServer.cxx:155
void checkDictSetitemRdExtness(PyObject *argsPy)
Definition: SALOMESDS_PickelizedPyObjRdExtServer.cxx:136
static const char ACCESS_REPR[]
Definition: SALOMESDS_PickelizedPyObjRdExtServer.hxx:52
void checkListRdExtnessOf(const std::string &methodName, PyObject *argsPy)
Definition: SALOMESDS_PickelizedPyObjRdExtServer.cxx:106
void checkRdExtnessOf(const std::string &methodName, PyObject *argsPy)
Definition: SALOMESDS_PickelizedPyObjRdExtServer.cxx:88
virtual ~PickelizedPyObjRdExtServer()
Definition: SALOMESDS_PickelizedPyObjRdExtServer.cxx:43
PickelizedPyObjRdExtServer(DataScopeServerBase *father, const std::string &varName, const SALOME::ByteVec &value)
Definition: SALOMESDS_PickelizedPyObjRdExtServer.cxx:34
SALOME::PickelizedPyObjRdExtServer_ptr invokePythonMethodOn(const char *method, const SALOME::ByteVec &args)
Called remotely -> to protect against throw.
Definition: SALOMESDS_PickelizedPyObjRdExtServer.cxx:50
Definition: SALOMESDS_PickelizedPyObjServer.hxx:75
Definition: SALOMESDS_Sha1Keeper.hxx:31
Definition: SALOMESDS_Auto.hxx:28
obj
Definition: batchmode_salome.py:275
Definition: SALOMESDS_AutoRefCountPtr.hxx:29
sequence< octet > ByteVec
Definition: SALOME_CommonTypes.idl:28
string varName
Definition: TestSalomeSDSHelper0.py:25
args
Definition: pythfilter.py:547