Salome HOME
Copyright update 2022
[modules/gui.git] / tools / PyInterp / src / PyInterp_Interp.h
index 88e5519166450fe10e93ed39061f5a36636343bb..e0b741e22daa06faeecdede91cdd987d3bbd1164 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -27,6 +27,7 @@
 
 #include "PyInterp.h"   // !!! WARNING !!! THIS INCLUDE MUST BE THE VERY FIRST !!!
 #include "PyInterp_Utils.h"
+#include "PyInterp_RefCounterObj.h"
 
 #include <list>
 #include <string>
@@ -50,20 +51,17 @@ typedef struct {
  * (only there namespace is made available when importing in another context).
  * See also class PyConsole_Interp.
  */
-class PYINTERP_EXPORT PyInterp_Interp
+class PYINTERP_EXPORT PyInterp_Interp : public PyInterp_RefCounterObj
 {
 public:
   static int _argc;
   static char* _argv[];
   
-  PyInterp_Interp();
-  virtual ~PyInterp_Interp();
-  
   void initialize();
   void destroy();
 
   virtual int run(const char *command); 
-  virtual void initStudy() {};
+  virtual void initStudy() {}
 
   std::string getBanner() const;
   void setverrcb(PyOutChanged*, void*);
@@ -72,6 +70,11 @@ public:
   const char* getPrevious();
   const char* getNext();
 
+protected:
+  
+  PyInterp_Interp();
+  virtual ~PyInterp_Interp();
+
 protected:
   /** Redirection of stdout and stderr */
   PyObject* _vout;