frepple::utils::CommandPython Class Reference

This command executes Python code in the embedded interpreter. More...

#include <pythonutils.h>

Inheritance diagram for frepple::utils::CommandPython:
frepple::utils::Command

List of all members.

Public Member Functions

 CommandPython ()
void execute ()
string getCommandLine () const
string getDescription () const
string getFileName () const
void setCommandLine (const string &s)
void setFileName (const string &s)
virtual ~CommandPython ()

Static Public Member Functions

static void processorXMLInstruction (const char *d)

Static Public Attributes

static const MetaClassmetadata2

Detailed Description

This command executes Python code in the embedded interpreter.

The interpreter can execute generic scripts, and it also has access to the frePPLe objects.
The interpreter is multi-threaded. Multiple python scripts can run in parallel. Internally Python allows only one thread at a time to execute and the interpreter switches between the active threads, i.e. a quite primitive threading model.
FrePPLe uses a single global interpreter. A global Python variable or function is thus visible across multiple invocations of the Python interpreter.

Definition at line 215 of file pythonutils.h.


Constructor & Destructor Documentation

frepple::utils::CommandPython::CommandPython (  )  [inline, explicit]

Default constructor.

Definition at line 232 of file pythonutils.h.

virtual frepple::utils::CommandPython::~CommandPython (  )  [inline, virtual]

Destructor.

Definition at line 235 of file pythonutils.h.


Member Function Documentation

void frepple::utils::CommandPython::execute (  )  [virtual]

Executes the python command or source file.

Implements frepple::utils::Command.

Definition at line 53 of file pythonutils.cpp.

string frepple::utils::CommandPython::getCommandLine (  )  const [inline]

Return the command line.

Definition at line 241 of file pythonutils.h.

string frepple::utils::CommandPython::getDescription (  )  const [inline, virtual]

Returns a descriptive string.

Reimplemented from frepple::utils::Command.

Definition at line 229 of file pythonutils.h.

string frepple::utils::CommandPython::getFileName (  )  const [inline]

Return the filename.

Definition at line 244 of file pythonutils.h.

static void frepple::utils::CommandPython::processorXMLInstruction ( const char *  d  )  [inline, static]

This method is called when a processing instruction is read.

Definition at line 253 of file pythonutils.h.

void frepple::utils::CommandPython::setCommandLine ( const string &  s  )  [inline]

Update the commandline field and clears the filename field.

Definition at line 238 of file pythonutils.h.

void frepple::utils::CommandPython::setFileName ( const string &  s  )  [inline]

Update the filename field and clear the filename field.

Definition at line 247 of file pythonutils.h.


Member Data Documentation

Metadata for registration as an XML instruction.

Definition at line 250 of file pythonutils.h.


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

Generated on 25 Feb 2010 for frePPLe by  doxygen 1.6.1