ps::Module Class Reference

Class which holds a single module. More...

#include <module.hpp>

List of all members.

Public Member Functions

 Module (VM *vm)
 ~Module ()
bool loadSource (const char *filename)
 Loads the module from a script file.
bool loadBytecode (const char *filename)
 Loads the module from a file holding the parsed bytecode.
bool saveBytecode (const char *filename)
 Saves the parsed bytecode to a file.
void displayBytecode (void)
 Sends a listing of the bytecode to stdout.


Detailed Description

Class which holds a single module.

A module consists of one script file, multiple modules are connected wihtin the VM, functions can be called across different modules.


Constructor & Destructor Documentation

ps::Module::Module ( VM vm  ) 

ps::Module::~Module (  ) 


Member Function Documentation

bool ps::Module::loadSource ( const char *  filename  ) 

Loads the module from a script file.

Do not use this function directly, use VM::loadModule() instead.

bool ps::Module::loadBytecode ( const char *  filename  ) 

Loads the module from a file holding the parsed bytecode.

Do not use this function directly, use VM::loadBytecode() instead.

bool ps::Module::saveBytecode ( const char *  filename  ) 

Saves the parsed bytecode to a file.

Bytecode can be loaded much faster than source files which need to be parsed first, however, there can be some caveats when the environment while parsing the source differs from the environment used to compile the bytecode.

void ps::Module::displayBytecode ( void   ) 

Sends a listing of the bytecode to stdout.


The documentation for this class was generated from the following file:
Generated on Sun Feb 3 21:38:49 2008 for libplusscript++ by  doxygen 1.5.3