1 //=============================================================================
2 // File : PyInterp_base.h
3 // Created : ven fév 7 10:01:36 CET 2003
4 // Author : Christian CAREMOLI, Paul RASCLE, EDF
6 // Copyright : EDF 2003
8 //=============================================================================
10 #ifndef _PYINTERP_BASE_H_
11 #define _PYINTERP_BASE_H_
19 #define TOP_HISTORY_PY "--- top of history ---"
20 #define BEGIN_HISTORY_PY "--- begin of history ---"
23 * We have our own routines which are identical to the SIP routines
24 * to not depend from SIP software evolutions
27 extern "C" void salomeAcquireLock();
28 extern "C" void salomeReleaseLock();
29 extern "C" int salomeCondAcquireLock();
30 extern "C" void salomeCondReleaseLock(int rellock);
32 /*! this class can only be used with derivation :
33 * 2 pure virtual methods, initstate() & initcontext()
39 static PyThreadState *_gtstate;
42 static PyObject *builtinmodule;
43 static PyObject *salome_shared_modules_module;
48 int run(const char *command);
52 const char * getPrevious();
53 const char * getNext();
56 void basicRun(const char *command);
59 PyThreadState * _tstate;
63 list <string> _history;
64 list <string>::iterator _ith;
67 int simpleRun(const char* command);
70 virtual void initState() = 0;
71 virtual void initContext() =0;