te::vm::python::VirtualMachine Class Reference

#include <VirtualMachine.h>

Inheritance diagram for te::vm::python::VirtualMachine:
te::vm::core::VirtualMachine

Public Slots

void execute ()
 
void readline (QString msg)
 
void stop ()
 
void write (const QString &str)
 

Signals

virtual void output (QString msg)
 output Signal emmited when the Virtual Machine receives a string. More...
 
virtual void requestReadline ()
 Signal emmited when the Virtual Machine needs to execute a input operation. More...
 

Public Member Functions

std::string getDescription () const
 Returns a brief description about the underlying Virtual Machine. More...
 
std::string getName () const
 
std::string getTitle () const
 Return the title of Virtual Machine: a name that can be used by applications to show in a GUI. More...
 
std::string readline ()
 readline Method to be used by the language of the Virtual Machine when doing a input operation. More...
 
void setFileName (QString file)
 setFileName Sets the file that will be used in the Virtual Machine. More...
 
 VirtualMachine ()
 
 ~VirtualMachine ()
 Virtual destructor. More...
 

Private Attributes

std::string m_filename
 
PyThreadState * m_mainThreadState
 
QEventLoop * m_readlineLoop
 
std::string m_readlineStr
 
VirtualMachineOutput m_stderr
 
VirtualMachineInput m_stdin
 
VirtualMachineOutput m_stdout
 

Detailed Description

Definition at line 81 of file VirtualMachine.h.

Constructor & Destructor Documentation

◆ VirtualMachine()

te::vm::python::VirtualMachine::VirtualMachine ( )

◆ ~VirtualMachine()

te::vm::python::VirtualMachine::~VirtualMachine ( )
virtual

Virtual destructor.

Reimplemented from te::vm::core::VirtualMachine.

Member Function Documentation

◆ execute

void te::vm::python::VirtualMachine::execute ( )
slot

◆ getDescription()

std::string te::vm::python::VirtualMachine::getDescription ( ) const
virtual

Returns a brief description about the underlying Virtual Machine.

Implements te::vm::core::VirtualMachine.

◆ getName()

std::string te::vm::python::VirtualMachine::getName ( ) const
virtual

the name of the Virtual Machine: it is also an identifier about the VM type.

Implements te::vm::core::VirtualMachine.

◆ getTitle()

std::string te::vm::python::VirtualMachine::getTitle ( ) const
virtual

Return the title of Virtual Machine: a name that can be used by applications to show in a GUI.

Implements te::vm::core::VirtualMachine.

◆ output

virtual void te::vm::core::VirtualMachine::output ( QString  msg)
virtualsignalinherited

output Signal emmited when the Virtual Machine receives a string.

Parameters
msgString received from the Virtual Machine.

◆ readline() [1/2]

std::string te::vm::python::VirtualMachine::readline ( )
virtual

readline Method to be used by the language of the Virtual Machine when doing a input operation.

Returns
A string containing the user input.

Implements te::vm::core::VirtualMachine.

◆ readline [2/2]

void te::vm::python::VirtualMachine::readline ( QString  msg)
slot

◆ requestReadline

virtual void te::vm::core::VirtualMachine::requestReadline ( )
virtualsignalinherited

Signal emmited when the Virtual Machine needs to execute a input operation.

◆ setFileName()

void te::vm::python::VirtualMachine::setFileName ( QString  file)
virtual

setFileName Sets the file that will be used in the Virtual Machine.

Parameters
fileThe full path filename.

Implements te::vm::core::VirtualMachine.

◆ stop

void te::vm::python::VirtualMachine::stop ( )
slot

◆ write

void te::vm::python::VirtualMachine::write ( const QString &  str)
slot

Member Data Documentation

◆ m_filename

std::string te::vm::python::VirtualMachine::m_filename
private

Definition at line 107 of file VirtualMachine.h.

◆ m_mainThreadState

PyThreadState* te::vm::python::VirtualMachine::m_mainThreadState
private

Definition at line 112 of file VirtualMachine.h.

◆ m_readlineLoop

QEventLoop* te::vm::python::VirtualMachine::m_readlineLoop
private

Definition at line 113 of file VirtualMachine.h.

◆ m_readlineStr

std::string te::vm::python::VirtualMachine::m_readlineStr
private

Definition at line 111 of file VirtualMachine.h.

◆ m_stderr

VirtualMachineOutput te::vm::python::VirtualMachine::m_stderr
private

Definition at line 110 of file VirtualMachine.h.

◆ m_stdin

VirtualMachineInput te::vm::python::VirtualMachine::m_stdin
private

Definition at line 108 of file VirtualMachine.h.

◆ m_stdout

VirtualMachineOutput te::vm::python::VirtualMachine::m_stdout
private

Definition at line 109 of file VirtualMachine.h.


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