![]() |
Carousel
|
This interface used by the IScriptEngineConfigurationDelegate to configure QScriptEngine by the component extension. More...
#include <IScriptExtension.h>
Inherits IComponentExtension.
Public Member Functions | |
IScriptExtension () | |
virtual void | configureEngine (QScriptEngine *engine)=0 |
This interface used by the IScriptEngineConfigurationDelegate to configure QScriptEngine by the component extension.
If some component wants to extend script with new funcitons or types, or register wrappers for some non-QObject classes, it should be a child of the JsScriptingComponent. This mean a dependency of component parent name: "org.carousel.JsScripting". Then to get chance for registration, this component should also provide IScriptExtension extension. The overridden IScriptExtension::configureEngine method will be invoked every time, when QScriptEngine configuration is needed. So, in your extension you can register what ever you want in the QScriptEngine.
|
inline |
Initializes a new instance of the IScriptExtension class.
|
pure virtual |
This method will be invoked every time when a new instance of the QScriptEngine is needed to be configured by other components. Usually each execution of the IScriptUnit is required a new engine.
Implement this method to extend an engine with additional functions, classes or wrappers for your types.