PythonInterface.h
Go to the documentation of this file.
1 /*
2  * PythonInterface.h
3  *
4  * Created on: Jan. 14, 2021
5  * Author: mathieu
6  */
7 
8 #ifndef CORELIB_SRC_PYTHON_PYTHONINTERFACE_H_
9 #define CORELIB_SRC_PYTHON_PYTHONINTERFACE_H_
10 
11 
12 #include <string>
13 #include <rtabmap/utilite/UMutex.h>
14 #include <Python.h>
15 
16 namespace rtabmap {
17 
19 {
20 public:
22  virtual ~PythonInterface();
23 
24 protected:
25  std::string getTraceback(); // should be called between lock() and unlock()
26  void lock();
27  void unlock();
28 
29 private:
30  static UMutex mutex_;
31  static int refCount_;
32 
33 protected:
34  static PyThreadState * mainThreadState_;
35  static unsigned long mainThreadID_;
36  PyThreadState * threadState_;
37 };
38 
39 }
40 
41 #endif /* CORELIB_SRC_PYTHON_PYTHONINTERFACE_H_ */
static unsigned long mainThreadID_
Definition: UMutex.h:54
static PyThreadState * mainThreadState_
PyThreadState * threadState_


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:37:29