Public Member Functions | Static Public Member Functions | Static Public Attributes

frepple::utils::CommandPython Class Reference

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

#include <utils.h>

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

List of all members.

Public Member Functions

 CommandPython ()
void execute ()
string getCommandLine () 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 3908 of file utils.h.


Constructor & Destructor Documentation

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

Default constructor.

Definition at line 3922 of file utils.h.

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

Destructor.

Definition at line 3925 of file utils.h.


Member Function Documentation

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

Executes the python command or source file.

Implements frepple::utils::Command.

Definition at line 54 of file pythonutils.cpp.

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

Return the command line.

Definition at line 3931 of file utils.h.

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

Return the filename.

Definition at line 3934 of file utils.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 3943 of file utils.h.

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

Update the commandline field and clears the filename field.

Definition at line 3928 of file utils.h.

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

Update the filename field and clear the filename field.

Definition at line 3937 of file utils.h.


Member Data Documentation

Metadata for registration as an XML instruction.

Definition at line 3940 of file utils.h.


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