cppexpose  1.0.0.b785e04f23b8
C++ library for type introspection, reflection, and scripting interface
Public Member Functions | Protected Attributes | List of all members
cppexpose::AbstractScriptBackend Class Referenceabstract

Base class for scripting context backends. More...

#include <cppexpose/include/cppexpose/scripting/AbstractScriptBackend.h>

Collaboration diagram for cppexpose::AbstractScriptBackend:
Collaboration graph
[legend]

Public Member Functions

 AbstractScriptBackend ()
 Constructor. More...
 
virtual ~AbstractScriptBackend ()
 Destructor. More...
 
ScriptContextscriptContext () const
 Get script context that owns the backend. More...
 
virtual void initialize (ScriptContext *scriptContext)=0
 Initialize scripting backend. More...
 
virtual void addGlobalObject (Object *obj)=0
 Add a global object that is exposed into the scripting environment. More...
 
virtual void removeGlobalObject (Object *obj)=0
 Remove a global object that is exposed into the scripting environment. More...
 
virtual Variant evaluate (const std::string &code)=0
 Execute script. More...
 

Protected Attributes

ScriptContextm_scriptContext
 Script context holding this backend. More...
 

Detailed Description

Base class for scripting context backends.

Constructor & Destructor Documentation

cppexpose::AbstractScriptBackend::AbstractScriptBackend ( )

Constructor.

virtual cppexpose::AbstractScriptBackend::~AbstractScriptBackend ( )
virtual

Destructor.

Member Function Documentation

ScriptContext* cppexpose::AbstractScriptBackend::scriptContext ( ) const

Get script context that owns the backend.

Returns
Script context that owns the backend (can be null)
virtual void cppexpose::AbstractScriptBackend::initialize ( ScriptContext scriptContext)
pure virtual

Initialize scripting backend.

Parameters
[in]scriptContextScript context that owns the backend (must NOT be null)
Remarks
Be sure to assign the script context to m_scriptContext.
virtual void cppexpose::AbstractScriptBackend::addGlobalObject ( Object obj)
pure virtual

Add a global object that is exposed into the scripting environment.

Parameters
[in]objGlobal object (must NOT be null)
virtual void cppexpose::AbstractScriptBackend::removeGlobalObject ( Object obj)
pure virtual

Remove a global object that is exposed into the scripting environment.

Parameters
[in]objGlobal object (must NOT be null)
virtual Variant cppexpose::AbstractScriptBackend::evaluate ( const std::string &  code)
pure virtual

Execute script.

Parameters
[in]codeScripting code
Returns
Return value of the executed code

Member Data Documentation

ScriptContext* cppexpose::AbstractScriptBackend::m_scriptContext
protected

Script context holding this backend.


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