ProgramLoader Class Reference

Compile and load programs. More...

#include <programloader.h>

Inherited by QtProgramLoader.

List of all members.

Public Member Functions

 ProgramLoader (const HmcModule &module, const std::vector< std::string > &compilerDirs, const std::string userDir)
Program fromString (const std::string &exp) const
 Load a program from a string to be used as a right value.
Program fromHM (const std::string &path) const
 Compile and load a program from an HMDL file to be used as a module.
Program fromHMC (const std::string &path) const
 Compile program from a compiled HMDL file to be used as a module.
Program fromFile (const std::string &basePath) const
 Load a program from the appopriate source to be used as a module.

Protected Member Functions

virtual bool executeCommand (const std::string &program, const std::vector< std::string > &arguments) const
virtual long long lastModified (const std::string &file) const

Detailed Description

Compile and load programs.

The program loader can load a program from a compiled HMDL file to be used as a module : FromFileModule. It can also compile a HMDL file in order to load subsequently the compiled version.

The program loader can also load a program from a string compiled by expcompiler to be used as a right value that can be evaluated. This is for instance used by filters to evaluate if an object should pass filtering test or not.


Constructor & Destructor Documentation

ProgramLoader::ProgramLoader ( const HmcModule &  module,
const std::vector< std::string > &  compilerDirs,
const std::string  userDir 
)
Parameters:
moduleused to parse compiled HMDL files
compilerDirs
userDir

Member Function Documentation

virtual bool ProgramLoader::executeCommand ( const std::string &  program,
const std::vector< std::string > &  arguments 
) const [protected, virtual]

Reimplemented in QtProgramLoader.

Program ProgramLoader::fromFile ( const std::string &  basePath) const

Load a program from the appopriate source to be used as a module.

The basePath is the name of the HMDL file stripped of its extension. The function will either use the HMDL file or the compiled HMDL file, depending on their existences and their last modification times.

Program ProgramLoader::fromHM ( const std::string &  path) const

Compile and load a program from an HMDL file to be used as a module.

Program ProgramLoader::fromHMC ( const std::string &  path) const

Compile program from a compiled HMDL file to be used as a module.

Program ProgramLoader::fromString ( const std::string &  exp) const

Load a program from a string to be used as a right value.

virtual long long ProgramLoader::lastModified ( const std::string &  file) const [protected, virtual]

Reimplemented in QtProgramLoader.


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