te::v8::common::JsContext Class Reference

A class for keeping reference to a persistent context. More...

#include <JsContext.h>

Public Member Functions

::v8::Persistent<::v8::Context > getCtx () const
 
 JsContext ()
 Default constructor. More...
 
 ~JsContext ()
 Destructor. More...
 

Private Member Functions

 JsContext (const JsContext &rhs)
 Copy constructor not allowed. More...
 
JsContextoperator= (const JsContext &rhs)
 Assignment operator not allowed. More...
 

Private Attributes

::v8::Persistent<::v8::Context > m_ctx
 The context to run JavaScript code. More...
 

Detailed Description

A class for keeping reference to a persistent context.

As stated in the Google's V8 JavaScript Engine, a context is an executiion environment that allows separate, unrelated, JavaScript applications to run in a single instance of V8.

In TerraLib, several plugins can use the same context.

See also
JsContextManager

Definition at line 54 of file JsContext.h.

Constructor & Destructor Documentation

te::v8::common::JsContext::JsContext ( )

Default constructor.

Definition at line 35 of file JsContext.cpp.

References m_ctx.

te::v8::common::JsContext::~JsContext ( )

Destructor.

Definition at line 41 of file JsContext.cpp.

References m_ctx.

te::v8::common::JsContext::JsContext ( const JsContext rhs)
private

Copy constructor not allowed.

Parameters
rhsThe right-hand-side copy that would be used to copy from.

Member Function Documentation

::v8::Persistent<::v8::Context> te::v8::common::JsContext::getCtx ( ) const
inline

Definition at line 64 of file JsContext.h.

JsContext& te::v8::common::JsContext::operator= ( const JsContext rhs)
private

Assignment operator not allowed.

Parameters
rhsThe right-hand-side copy that would be used to copy from.
Returns
A reference to this.

Member Data Documentation

::v8::Persistent<::v8::Context> te::v8::common::JsContext::m_ctx
private

The context to run JavaScript code.

Definition at line 89 of file JsContext.h.

Referenced by JsContext(), and ~JsContext().


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