coolray.org FAQ Contact Us
CoolRay Banner
CoolRay / Documentation
Main Page   Class Hierarchy   Compound List   Compound Members   Related Pages  

VirtualMachine Class Reference

Interface to the virtual machine. More...

#include <VirtualMachine.h>

Collaboration diagram for VirtualMachine:

Collaboration graph
[legend]
List of all members.

Public Methods

 VirtualMachine ()
 ~VirtualMachine ()
void setProgram (ObjectFile *pFile)
 Associate a VM program with the VirtualMachine. More...

const ObjectFilegetProgram ()const throw ()
 Get the associated program. More...

void setGlobalObject (const string &sName,Object *pObject) throw ()
 Set a object into the global object table.

ObjectgetGlobalObject (const string &sName)const throw ()
 Get a object from the global object table.

void run () throw (RuntimeException)
 Execute the program loaded into the virtual machine. More...

void setDebugger (Debugger *pDebugger) throw ()
 Set a custom debugger to watch and debug program execution. More...

Debugger* getDebugger ()const throw ()
 Get the currently installed debugger.

void setTrapHandler (int trap,TrapHandler *pTrapHandler) throw ()
TrapHandler* getTrapHandler (int trap)const throw ()

Friends

class  VirtualMachineImp

Detailed Description

Interface to the virtual machine.

The class implements the facade design-pattern using the C++ Pimpl-idiom.


Member Function Documentation

const ObjectFile * VirtualMachine::getProgram ( ) const throw ()
 

Get the associated program.

If no program is associated NULL is returned instead.

void VirtualMachine::run ( ) throw (RuntimeException)
 

Execute the program loaded into the virtual machine.

If neither a program nor a scene is associated with the virtual machine a RuntimeException is thrown immediately. Any exceptions that the program causes are thrown by this operation.

void VirtualMachine::setDebugger ( Debugger * pDebugger ) throw ()
 

Set a custom debugger to watch and debug program execution.

Parameters:
pDebugger   Pointer to a valid debugger object NULL, to uninstall a debugger

See also:
Debugger, VirtualMachineDebug;

void VirtualMachine::setProgram ( ObjectFile * pFile )
 

Associate a VM program with the VirtualMachine.

Parameters:
pFile   a valid object file with the virtual machine program


The documentation for this class was generated from the following file:
  • VirtualMachine.h
You are visitor No.

counter

Copyright (c) 2001 Stefan Michel, All Rights Reserved.
Last modified: