cohtml::ScriptCompiler

#include <Library.h>

Public Functions

Name
virtual DataBuffer *Compile(DataBuffer * utf8Source) =0
Compiles a script file synchronously.
virtual voidDestroy() =0
Destroys the ScriptCompiler and frees memory.

Protected Functions

Name
virtual~ScriptCompiler()

Public Functions Documentation

function Compile

virtual DataBuffer * Compile(
    DataBuffer * utf8Source
) =0

Compiles a script file synchronously.

Parameters:

  • utf8Source a data buffer, containing an utf8 encoded script source

Return: A data buffer, containing the compiled data.

Note:

  • Can be used on any thread, should not be used on multiple threads simultaneously.
  • Scripts can be precompiled on Windows then later used on other platforms where Cohtml works with V8’s pointer compression feature enabled. Currently, those are only Microsoft Xbox consoles.

function Destroy

virtual void Destroy() =0

Destroys the ScriptCompiler and frees memory.

Protected Functions Documentation

function ~ScriptCompiler

virtual ~ScriptCompiler()