Jerryscript external context. More...

#include <Context.h>

Inheritance diagram for Jerryscript::Context:

Public Member Functions

 Context ()
 Create a context using the default JERRY_GLOBAL_HEAP_SIZE setting. More...
 
 Context (size_t heapSize)
 Create a context with custom heap size. More...
 
 ~Context ()
 
 operator bool () const
 
void select ()
 Make this the current context. More...
 
 operator jerry_context_t * () const
 

Static Public Member Functions

static ContextgetCurrent ()
 

Detailed Description

Jerryscript external context.

Applications may be segregated by running in separate contexts. Each context has its own dynamically allocated heap.

Constructor & Destructor Documentation

◆ Context() [1/2]

Jerryscript::Context::Context ( )

Create a context using the default JERRY_GLOBAL_HEAP_SIZE setting.

◆ Context() [2/2]

Jerryscript::Context::Context ( size_t  heapSize)

Create a context with custom heap size.

Parameters
heapSizeSize of heap in bytes. Will be rounded up as necessary.

◆ ~Context()

Jerryscript::Context::~Context ( )
inline

Member Function Documentation

◆ getCurrent()

static Context& Jerryscript::Context::getCurrent ( )
inlinestatic

◆ operator bool()

Jerryscript::Context::operator bool ( ) const
inlineexplicit

◆ operator jerry_context_t *()

Jerryscript::Context::operator jerry_context_t * ( ) const
inline

◆ select()

void Jerryscript::Context::select ( )
inline

Make this the current context.

Context must be selected before calling into jerryscript.


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