Back to index

salome-gui  6.5.0
Public Types | Public Slots | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Static Private Attributes | Friends
PYINTERP_EXPORT Protocol Reference

#include <PyInterp_Dispatcher.h>

Inheritance diagram for PYINTERP_EXPORT:
Inheritance graph
[legend]
Collaboration diagram for PYINTERP_EXPORT:
Collaboration graph
[legend]

List of all members.

Public Types

enum  {
  ES_NOTIFY = QEvent::User + 5000, ES_OK, ES_ERROR, ES_INCOMPLETE,
  ES_LAST
}

Public Slots

void onDestroyed (QObject *o)

Public Member Functions

 PyInterp_Request (QObject *listener, bool sync=false)
bool IsSync () const
 PyInterp_LockRequest (PyInterp_Interp *interp, QObject *listener=0, bool sync=false)
 PyInterp_Event (int type, PyInterp_Request *request)
virtual ~PyInterp_Event ()
PyInterp_RequestGetRequest () const
 operator PyInterp_Request * () const
virtual ~PyInterp_Dispatcher ()
bool IsBusy () const
void Exec (PyInterp_Request *)
 PyLockWrapper (PyThreadState *theThreadState)
 ~PyLockWrapper ()
 PyInterp_Interp ()
virtual ~PyInterp_Interp ()
void initialize ()
virtual int run (const char *command)
PyLockWrapper GetLockWrapper ()
std::string getbanner ()
void setverrcb (PyOutChanged *, void *)
void setvoutcb (PyOutChanged *, void *)
const char * getPrevious ()
const char * getNext ()
 PyObjWrapper (PyObject *theObject)
 PyObjWrapper ()
virtual ~PyObjWrapper ()
 operator PyObject * ()
PyObject * operator-> ()
PyObject * get ()
bool operator! ()
bool operator== (PyObject *theObject)
PyObject ** operator& ()
PyObjWrapperoperator= (PyObjWrapper *theObjWrapper)
 PyInterp_Watcher ()
virtual ~PyInterp_Watcher ()

Static Public Member Functions

static void Destroy (PyInterp_Request *)
static PyInterp_DispatcherGet ()

Static Public Attributes

static int _argc
static char * _argv []
static PyObject * builtinmodule
static PyThreadState * _gtstate
static PyInterpreterState * _interp

Protected Member Functions

virtual ~PyInterp_Request ()
virtual void safeExecute ()
virtual void execute ()=0
virtual QEvent * createEvent () const
virtual void processEvent (QObject *)
QObjectlistener () const
void setListener (QObject *)
PyInterp_InterpgetInterp () const
virtual void safeExecute ()
virtual int beforeRun ()
int simpleRun (const char *command, const bool addToHistory=true)
virtual bool initRun ()
virtual void initPython ()
virtual bool initState ()=0
virtual bool initContext ()=0

Protected Attributes

PyThreadState * _tstate
PyObject * _vout
PyObject * _verr
PyObject * _g
PyObject * _codeop
std::list< std::string > _history
std::list< std::string >::iterator _ith

Private Types

typedef PyInterp_RequestRequestPtr

Private Member Functions

 PyInterp_Request ()
 PyInterp_Request (const PyInterp_Request &)
void process ()
 PyInterp_Event ()
 PyInterp_Event (const PyInterp_Event &)
 PyInterp_Dispatcher ()
virtual void run ()
void processRequest (PyInterp_Request *)
void objectDestroyed (const QObject *)

Private Attributes

QMutex myMutex
bool myIsSync
QObjectmyListener
PyInterp_InterpmyInterp
PyInterp_RequestmyRequest
QQueue< RequestPtrmyQueue
QMutex myQueueMutex
PyInterp_WatchermyWatcher
PyThreadState * myThreadState
PyThreadState * mySaveThreadState
PyGILState_STATE _savestate
PyObject * myObject

Static Private Attributes

static PyInterp_DispatchermyInstance

Friends

class PyInterp_Dispatcher
class PyInterp_ExecuteEvent
class PyInterp_Watcher

Detailed Description

Definition at line 44 of file PyInterp_Dispatcher.h.


Member Typedef Documentation

Definition at line 144 of file PyInterp_Dispatcher.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
ES_NOTIFY 
ES_OK 
ES_ERROR 
ES_INCOMPLETE 
ES_LAST 

Definition at line 112 of file PyInterp_Dispatcher.h.

{ ES_NOTIFY = QEvent::User + 5000, ES_OK, ES_ERROR, ES_INCOMPLETE, ES_LAST };

Constructor & Destructor Documentation

virtual PYINTERP_EXPORT::~PyInterp_Request ( ) [inline, protected, virtual]

Definition at line 53 of file PyInterp_Dispatcher.h.

{};
virtual PYINTERP_EXPORT::~PyInterp_Event ( ) [virtual]
virtual PYINTERP_EXPORT::~PyInterp_Interp ( ) [virtual]
virtual PYINTERP_EXPORT::~PyObjWrapper ( ) [inline, virtual]

Definition at line 96 of file PyInterp_Interp.h.

{ Py_XDECREF(myObject); }
virtual PYINTERP_EXPORT::~PyInterp_Watcher ( ) [inline, virtual]

Definition at line 43 of file PyInterp_Watcher.h.

{}

Member Function Documentation

virtual int PYINTERP_EXPORT::beforeRun ( ) [inline, protected, virtual]

Definition at line 81 of file PyInterp_Interp.h.

{ return 0; }
virtual QEvent* PYINTERP_EXPORT::createEvent ( ) const [protected, virtual]
virtual void PYINTERP_EXPORT::execute ( ) [protected, pure virtual]
PyObject* PYINTERP_EXPORT::get ( ) [inline]

Definition at line 100 of file PyInterp_Interp.h.

{ return myObject;  }

Here is the caller graph for this function:

std::string PYINTERP_EXPORT::getbanner ( )
PyInterp_Interp* PYINTERP_EXPORT::getInterp ( ) const [inline, protected]

Definition at line 97 of file PyInterp_Dispatcher.h.

{ return myInterp; }
const char* PYINTERP_EXPORT::getNext ( )

Definition at line 119 of file PyInterp_Dispatcher.h.

{ return myRequest; }
virtual bool PYINTERP_EXPORT::initContext ( ) [protected, pure virtual]
virtual void PYINTERP_EXPORT::initPython ( ) [protected, virtual]
virtual bool PYINTERP_EXPORT::initRun ( ) [protected, virtual]
virtual bool PYINTERP_EXPORT::initState ( ) [protected, pure virtual]
bool PYINTERP_EXPORT::IsBusy ( ) const
bool PYINTERP_EXPORT::IsSync ( ) const [inline]

Definition at line 63 of file PyInterp_Dispatcher.h.

{ return myIsSync; }
QObject* PYINTERP_EXPORT::listener ( ) const [inline, protected]

Definition at line 78 of file PyInterp_Dispatcher.h.

{ return myListener; }
void PYINTERP_EXPORT::onDestroyed ( QObject o) [inline, slot]

Definition at line 46 of file PyInterp_Watcher.h.

{ PyInterp_Dispatcher::Get()->objectDestroyed( o ); }

Here is the call graph for this function:

PYINTERP_EXPORT::operator PyInterp_Request * ( ) const [inline]

Definition at line 120 of file PyInterp_Dispatcher.h.

{ return myRequest; }
PYINTERP_EXPORT::operator PyObject * ( ) [inline]

Definition at line 98 of file PyInterp_Interp.h.

{ return myObject;  }
bool PYINTERP_EXPORT::operator! ( ) [inline]

Definition at line 101 of file PyInterp_Interp.h.

{ return !myObject; }
PyObject** PYINTERP_EXPORT::operator& ( ) [inline]

Definition at line 103 of file PyInterp_Interp.h.

{ return &myObject; }
PyObject* PYINTERP_EXPORT::operator-> ( ) [inline]

Definition at line 99 of file PyInterp_Interp.h.

{ return myObject;  }
PyObjWrapper& PYINTERP_EXPORT::operator= ( PyObjWrapper theObjWrapper) [inline]

Definition at line 104 of file PyInterp_Interp.h.

  {
    Py_XDECREF(myObject);
    myObject = theObjWrapper->myObject;
    return *this;
  }
bool PYINTERP_EXPORT::operator== ( PyObject *  theObject) [inline]

Definition at line 102 of file PyInterp_Interp.h.

{ return myObject == theObject; }
virtual void PYINTERP_EXPORT::processEvent ( QObject ) [protected, virtual]
PYINTERP_EXPORT::PyInterp_Event ( int  type,
PyInterp_Request request 
) [inline]

Definition at line 114 of file PyInterp_Dispatcher.h.

    : QEvent( (QEvent::Type)type ), myRequest( request ) {}
PYINTERP_EXPORT::PyInterp_LockRequest ( PyInterp_Interp interp,
QObject listener = 0,
bool  sync = false 
) [inline]

Definition at line 93 of file PyInterp_Dispatcher.h.

    : PyInterp_Request( listener, sync ), myInterp( interp ) {}
PYINTERP_EXPORT::PyInterp_Request ( QObject listener,
bool  sync = false 
) [inline]

Definition at line 57 of file PyInterp_Dispatcher.h.

    : myIsSync( sync ), myListener( listener ) {};

Definition at line 42 of file PyInterp_Watcher.h.

: QObject( 0 ) {}
PYINTERP_EXPORT::PyLockWrapper ( PyThreadState *  theThreadState)
PYINTERP_EXPORT::PyObjWrapper ( PyObject *  theObject) [inline]

Definition at line 94 of file PyInterp_Interp.h.

: myObject(theObject) {}

Definition at line 95 of file PyInterp_Interp.h.

: myObject(0) {}
virtual int PYINTERP_EXPORT::run ( const char *  command) [virtual]
virtual void PYINTERP_EXPORT::run ( ) [private, virtual]
virtual void PYINTERP_EXPORT::safeExecute ( ) [protected, virtual]
virtual void PYINTERP_EXPORT::safeExecute ( ) [protected, virtual]
int PYINTERP_EXPORT::simpleRun ( const char *  command,
const bool  addToHistory = true 
) [protected]

Friends And Related Function Documentation

friend class PyInterp_Dispatcher [friend]

Definition at line 46 of file PyInterp_Dispatcher.h.

friend class PyInterp_ExecuteEvent [friend]

Definition at line 47 of file PyInterp_Dispatcher.h.

friend class PyInterp_Watcher [friend]

Definition at line 152 of file PyInterp_Dispatcher.h.


Member Data Documentation

int PYINTERP_EXPORT::_argc [static]

Definition at line 50 of file PyInterp_Interp.h.

char* PYINTERP_EXPORT::_argv[] [static]

Definition at line 51 of file PyInterp_Interp.h.

PyObject* PYINTERP_EXPORT::_codeop [protected]

Definition at line 77 of file PyInterp_Interp.h.

PyObject* PYINTERP_EXPORT::_g [protected]

Definition at line 76 of file PyInterp_Interp.h.

PyThreadState* PYINTERP_EXPORT::_gtstate [static]

Definition at line 53 of file PyInterp_Interp.h.

std::list<std::string> PYINTERP_EXPORT::_history [protected]

Definition at line 78 of file PyInterp_Interp.h.

PyInterpreterState* PYINTERP_EXPORT::_interp [static]

Definition at line 54 of file PyInterp_Interp.h.

std::list<std::string>::iterator PYINTERP_EXPORT::_ith [protected]

Definition at line 79 of file PyInterp_Interp.h.

PyGILState_STATE PYINTERP_EXPORT::_savestate [private]

Definition at line 39 of file PyInterp_Interp.h.

PyThreadState* PYINTERP_EXPORT::_tstate [protected]

Definition at line 73 of file PyInterp_Interp.h.

PyObject* PYINTERP_EXPORT::_verr [protected]

Definition at line 75 of file PyInterp_Interp.h.

PyObject* PYINTERP_EXPORT::_vout [protected]

Definition at line 74 of file PyInterp_Interp.h.

PyObject* PYINTERP_EXPORT::builtinmodule [static]

Definition at line 52 of file PyInterp_Interp.h.

Definition at line 150 of file PyInterp_Dispatcher.h.

Definition at line 102 of file PyInterp_Dispatcher.h.

bool PYINTERP_EXPORT::myIsSync [private]

Definition at line 86 of file PyInterp_Dispatcher.h.

Definition at line 87 of file PyInterp_Dispatcher.h.

QMutex PYINTERP_EXPORT::myMutex [private]

Definition at line 85 of file PyInterp_Dispatcher.h.

PyObject* PYINTERP_EXPORT::myObject [private]

Definition at line 92 of file PyInterp_Interp.h.

Definition at line 146 of file PyInterp_Dispatcher.h.

Definition at line 147 of file PyInterp_Dispatcher.h.

Definition at line 123 of file PyInterp_Dispatcher.h.

PyThreadState* PYINTERP_EXPORT::mySaveThreadState [private]

Definition at line 38 of file PyInterp_Interp.h.

PyThreadState* PYINTERP_EXPORT::myThreadState [private]

Definition at line 37 of file PyInterp_Interp.h.

Definition at line 148 of file PyInterp_Dispatcher.h.


The documentation for this protocol was generated from the following files: