interface XEngine in module com::sun::star::script::

(Global Index)

Syntax

interface XEngine : com::sun::star::uno::XInterface ;

Description

makes it possible to control a scripting engine.

Method Summary

setRoot sets an interface to an object as a scripting root.

getRoot gets an interface to the object which is the scripting root.

setLibraryAccess sets an access object to get external functions.

compile compiles a script module in the scope of the root object.

run runs a script specified by a string.

runAsync runs the script specified by a string and makes callbacks.

cancel terminates the execution of the running script.

addEngineListener adds an engine listener.

removeEngineListener removes an engine listener.

Method Details



setRoot

Syntax

void setRoot (
com::sun::star::uno::XInterface xRoot );

Description

sets an interface to an object as a scripting root.

If the root object implements the XInvocation interface, then the engine uses this interface to set/get properties and call methods.


getRoot

Syntax

com::sun::star::uno::XInterface getRoot ();

Description

gets an interface to the object which is the scripting root.


setLibraryAccess

Syntax

void setLibraryAccess (
com::sun::star::script::XLibraryAccess Library );

Description

sets an access object to get external functions.


compile

Syntax

boolean compile (
string ModuleName,
string Script,
boolean CreateDebugInfo );

Description

compiles a script module in the scope of the root object.


run

Syntax

any run (
string aScript,
com::sun::star::uno::XInterface xThis,
sequence< any > aArgs );

Description

runs a script specified by a string.

The arguments given in aArgs can be ignored by the engine. The Script is executed synchronously.


runAsync

Syntax

void runAsync (
string acript,
com::sun::star::uno::XInterface xThis,
sequence< any > args,
com::sun::star::script::XEngineListener xCallback );

Description

runs the script specified by a string and makes callbacks.

The arguments given in aArgs can be ignored by the engine. The script is executed asynchronously.


cancel

Syntax

void cancel ();

Description

terminates the execution of the running script.

The waiting queue (see ) is cleared too.


addEngineListener

Syntax

void addEngineListener (
com::sun::star::script::XEngineListener Listener );

Description

adds an engine listener.


removeEngineListener

Syntax

void removeEngineListener (
com::sun::star::script::XEngineListener Listener );

Description

removes an engine listener.

Top of Page