1 // SALOME SALOMEGUI : implementation of desktop and GUI kernel
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : PyInterp_base.h
8 // Author : Christian CAREMOLI, Paul RASCLE, EDF
12 #ifndef _PYINTERP_BASE_H_
13 #define _PYINTERP_BASE_H_
21 #define TOP_HISTORY_PY "--- top of history ---"
22 #define BEGIN_HISTORY_PY "--- begin of history ---"
25 * We have our own routines which are identical to the SIP routines
26 * to not depend from SIP software evolutions
29 extern "C" void salomeAcquireLock();
30 extern "C" void salomeReleaseLock();
31 extern "C" int salomeCondAcquireLock();
32 extern "C" void salomeCondReleaseLock(int rellock);
34 /*! this class can only be used with derivation :
35 * 2 pure virtual methods, initstate() & initcontext()
41 static PyThreadState *_gtstate;
44 static PyObject *builtinmodule;
45 static PyObject *salome_shared_modules_module;
50 int run(const char *command);
54 const char * getPrevious();
55 const char * getNext();
58 void basicRun(const char *command);
61 PyThreadState * _tstate;
65 list <string> _history;
66 list <string>::iterator _ith;
69 int simpleRun(const char* command);
72 virtual void initState() = 0;
73 virtual void initContext() =0;