casa  $Rev:20696$
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
casa::CasaPyInterpreter Class Reference

Class that grabs a handle onto the currently running casapy Python interpreter shell. More...

#include <CasaPyInterpreter.h>

List of all members.

Public Member Functions

 CasaPyInterpreter (Bool usegui=True)
 Default Constructor.
 CasaPyInterpreter (CasaPyInterpreter const &)
 Copy Constructor.
CasaPyInterpreteroperator= (CasaPyInterpreter const &)
 Assignment.
 ~CasaPyInterpreter ()
 Destructor.
void pyrunString (String cmd)
 Send in a python command string.
void CheckPlotError (String cmd)
 Periodically check if the internal interpreter has thrown an exception.
void setupCustomGuiFeatures ()
 Add Gui buttons and bind them.

Private Member Functions

void CasaPyInterpreterError (String msg)
 Exception generator.

Private Attributes

PyObject * interp
 Handle to the internal python interpreter.
SLoglog

Static Private Attributes

static String clname

Detailed Description

Class that grabs a handle onto the currently running casapy Python interpreter shell.

Prerequisite

Etymology

A link between Casa and a Python-Interpreter.

Synopsis

This class creates and maintains a link between C++ and the current instance of the python interpreter. ( Wes Young wrote the first part of the constructor, that creates a local python interpreter, and loads "pylab" into it. )

All python commands that TPPlotter runs, are sent into this class for transmission to the python interpreter.

Motivation

To isolate the process of connecting between C++ and Python.

Thrown Exceptions

To Do

Definition at line 95 of file CasaPyInterpreter.h.


Constructor & Destructor Documentation

casa::CasaPyInterpreter::CasaPyInterpreter ( Bool  usegui = True)

Default Constructor.

casa::CasaPyInterpreter::CasaPyInterpreter ( CasaPyInterpreter const &  )

Copy Constructor.

casa::CasaPyInterpreter::~CasaPyInterpreter ( )

Destructor.


Member Function Documentation

void casa::CasaPyInterpreter::CasaPyInterpreterError ( String  msg) [private]

Exception generator.

void casa::CasaPyInterpreter::CheckPlotError ( String  cmd)

Periodically check if the internal interpreter has thrown an exception.

If so, grab the message and create an AipsError exception.

CasaPyInterpreter& casa::CasaPyInterpreter::operator= ( CasaPyInterpreter const &  )

Assignment.

void casa::CasaPyInterpreter::pyrunString ( String  cmd)

Send in a python command string.

Be very wary of newlines and blank spaces

void casa::CasaPyInterpreter::setupCustomGuiFeatures ( )

Add Gui buttons and bind them.

Usually called immediately after construction, and only once.


Member Data Documentation

Definition at line 127 of file CasaPyInterpreter.h.

PyObject* casa::CasaPyInterpreter::interp [private]

Handle to the internal python interpreter.

Definition at line 124 of file CasaPyInterpreter.h.

Definition at line 126 of file CasaPyInterpreter.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines