Skip to content

Namespace jac

Namespace List > jac

Namespaces

Type Name
namespace ProtoBuilder
namespace detail

Classes

Type Name
class ArrayBufferWrapper <managed>
A wrapper for JSValue with ArrayBuffer type with RAII.
class ArrayWrapper <managed>
A wrapper for JSValue with Array type with RAII.
class Atom
A wrapper around JSAtom with RAII. In the context of QuickJS, Atom is used to represent identifiers of properties, variables, functions, etc.
class BasicStreamFeature <class Next>
class Class <class Builder>
struct ComposeMachine <class Base, MFeatures>
struct ComposeMachine< Base > <class Base>
struct ComposeMachine< Base, FirstFeature, MFeatures... > <class Base, FirstFeature, MFeatures>
class ContextRef
A wrapper around JSContext* providing some related functionality.
struct ConvTraits <typename T, typename En>
struct ConvTraits< T, std::enable_if_t< std::is_integral_v< T > &&detail::is_leq_i32< T >, T > > <typename T>
struct ConvTraits< bool > <>
struct ConvTraits< std::chrono::milliseconds > <>
class EventLoopFeature <class Next>
class EventLoopTerminal <class Next>
class EventQueueFeature <class Next>
class ExceptionWrapper <managed>
An exception wrapper which can either wrap a JSValue or contain an exception description and can be thrown into JS as a specific Error type.
class File
struct FileProtoBuilder
class FilesystemFeature <class Next>
class FunctionFactory
Various methods for wrapping C++ functions into javascript functions.
class FunctionWrapper <managed>
A wrapper for JSValue with Function type with RAII.
class MachineBase
class Module
A wrapper around JSModuleDef that allows for easy exporting of values.
class ModuleLoaderFeature <class Next>
class ObjectWrapper <managed>
A wrapper for JSValue with Object type with RAII.
class OsWritable
class Plugin
A base class for all plugins.
class PluginHandle
A handle which can be used to retrieve a plugin from a machine.
class PluginHolderFeature <typename Next>
An MFeature that allows for inserting plugins into the machine and retrieving them using PluginHandeles.
class PluginManager
A class for managing groups of plugins and initializing them all at once.
class PromiseWrapper <managed>
A wrapper for JSValue with Promise type with RAII.
class Readable
struct ReadableProtoBuilder
class ReadableRef
struct SgnUnwrap <typename Sgn>
struct SgnUnwrap< Res(Args...)> <typename Res, Args>
class StdioFeature <class Next>
class StringView
A wrapper around QuickJS C-string with automatic memory management.
class TimersFeature <class Next>
class ValueWrapper <managed>
A wrapper around JSValue with RAII.
class Writable
struct WritableProtoBuilder
class WritableRef
struct is_base_of_template <Base, typename Derived>
Checks if a type is derived from a template class.

Public Types

Type Name
typedef ArrayWrapper< true > Array
typedef ArrayBufferWrapper< true > ArrayBuffer
typedef ArrayBufferWrapper< false > ArrayBufferWeak
typedef ArrayWrapper< false > ArrayWeak
enum int EvalFlags
typedef ExceptionWrapper< true > Exception
typedef ExceptionWrapper< false > ExceptionWeak
typedef FunctionWrapper< true > Function
typedef FunctionWrapper< false > FunctionWeak
typedef ObjectWrapper< true > Object
typedef ObjectWrapper< false > ObjectWeak
typedef PromiseWrapper< true > Promise
typedef PromiseWrapper< false > PromiseWeak
enum int PropFlags
Flags to specify property access attributes.
typedef ValueWrapper< true > Value
typedef ValueWrapper< false > ValueWeak
typedef typename is_base_of_template< Base, Derived >::type is_base_of_template_t

Public Attributes

Type Name
constexpr bool is_base_of_template_v = = is_base_of_template<Base, Derived>::value

Public Functions

Type Name
SgnUnwrap (Res(Class::*)(Args...))
std::tuple< Args... > convertArgs (]ContextRef ctx, std::vector< ValueWeak > argv, std::index_sequence< Is... >)
std::tuple< Args... > convertArgs (]ContextRef ctx, JSValueConst * argv, int argc, std::index_sequence< Is... >)
T fromValue (ContextRef ctx, ValueWeak val)
T fromValue (] ContextRef ctx, ] ValueWeak val)
constexpr EvalFlags operator& (EvalFlags a, EvalFlags b)
constexpr PropFlags operator& (PropFlags a, PropFlags b)
constexpr EvalFlags operator| (EvalFlags a, EvalFlags b)
constexpr PropFlags operator| (PropFlags a, PropFlags b)
Value processCall (ContextRef ctx, ValueWeak, std::vector< ValueWeak > argv, Func & f)
JSValue processCallRaw (ContextRef ctx, JSValueConst, int argc, JSValueConst * argv, Func & f)
Value processCallThis (ContextRef ctx, ValueWeak thisVal, std::vector< ValueWeak > argv, Func & f)
Value processCallThisVariadic (ContextRef ctx, ValueWeak thisVal, std::vector< ValueWeak > argv, Func & f)
Value processCallVariadic (ContextRef ctx, ValueWeak, std::vector< ValueWeak > argv, Func & f)
JSValue processCallVariadicRaw (ContextRef ctx, JSValueConst, int argc, JSValueConst * argv, Func & f)
JSValue propagateExceptions (ContextRef ctx, Func & f) noexcept
JSValue propagateExceptions (ContextRef ctx, Func && f) noexcept
constexpr bool static_false ()
Value toValue (ContextRef ctx, T val)
Value toValue (] ContextRef ctx, ] T value)

Public Static Functions

Type Name
void initializeIo (Machine & machine)

Public Types Documentation

typedef Array

using jac::Array = typedef ArrayWrapper<true>;

typedef ArrayBuffer

using jac::ArrayBuffer = typedef ArrayBufferWrapper<true>;

typedef ArrayBufferWeak

using jac::ArrayBufferWeak = typedef ArrayBufferWrapper<false>;

typedef ArrayWeak

using jac::ArrayWeak = typedef ArrayWrapper<false>;

enum EvalFlags

enum jac::EvalFlags {
    Global = JS_EVAL_TYPE_GLOBAL,
    Module = JS_EVAL_TYPE_MODULE,
    Strict = JS_EVAL_FLAG_STRICT,
    Strip = JS_EVAL_FLAG_STRIP,
    CompileOnly = JS_EVAL_FLAG_COMPILE_ONLY,
    BacktraceBarrier = JS_EVAL_FLAG_BACKTRACE_BARRIER
};

typedef Exception

using jac::Exception = typedef ExceptionWrapper<true>;

typedef ExceptionWeak

using jac::ExceptionWeak = typedef ExceptionWrapper<false>;

typedef Function

using jac::Function = typedef FunctionWrapper<true>;

typedef FunctionWeak

using jac::FunctionWeak = typedef FunctionWrapper<false>;

typedef Object

using jac::Object = typedef ObjectWrapper<true>;

typedef ObjectWeak

using jac::ObjectWeak = typedef ObjectWrapper<false>;

typedef Promise

using jac::Promise = typedef PromiseWrapper<true>;

typedef PromiseWeak

using jac::PromiseWeak = typedef PromiseWrapper<false>;

enum PropFlags

enum jac::PropFlags {
    Default = 0,
    Configurable = JS_PROP_CONFIGURABLE,
    Writable = JS_PROP_WRITABLE,
    Enumerable = JS_PROP_ENUMERABLE,
    C_W_E = JS_PROP_C_W_E
};

typedef Value

using jac::Value = typedef ValueWrapper<true>;

typedef ValueWeak

using jac::ValueWeak = typedef ValueWrapper<false>;

typedef is_base_of_template_t

using jac::is_base_of_template_t = typedef typename is_base_of_template<Base, Derived>::type;

Public Attributes Documentation

variable is_base_of_template_v

constexpr bool jac::is_base_of_template_v;

Public Functions Documentation

function SgnUnwrap

template<class Class, typename Res, typename... Args>
jac::SgnUnwrap (
    Res(Class::*)(Args...)
) 

function convertArgs

template<typename... Args, std::size_t... Is>
inline std::tuple< Args... > jac::convertArgs (
    ] ContextRef ctx,
    std::vector< ValueWeak > argv,
    std::index_sequence< Is... >
) 

function convertArgs

template<typename... Args, std::size_t... Is>
inline std::tuple< Args... > jac::convertArgs (
    ] ContextRef ctx,
    JSValueConst * argv,
    int argc,
    std::index_sequence< Is... >
) 

function fromValue

template<typename T>
T jac::fromValue (
    ContextRef ctx,
    ValueWeak val
) 

function fromValue

template<typename T>
T jac::fromValue (
    ] ContextRef ctx,
    ] ValueWeak val
) 

function operator&

inline constexpr EvalFlags jac::operator& (
    EvalFlags a,
    EvalFlags b
) 

function operator&

inline constexpr PropFlags jac::operator& (
    PropFlags a,
    PropFlags b
) 

function operator|

inline constexpr EvalFlags jac::operator| (
    EvalFlags a,
    EvalFlags b
) 

function operator|

inline constexpr PropFlags jac::operator| (
    PropFlags a,
    PropFlags b
) 

function processCall

template<typename Func, typename Res, typename... Args>
inline Value jac::processCall (
    ContextRef ctx,
    ValueWeak,
    std::vector< ValueWeak > argv,
    Func & f
) 

function processCallRaw

template<typename Func, typename Res, typename... Args>
inline JSValue jac::processCallRaw (
    ContextRef ctx,
    JSValueConst,
    int argc,
    JSValueConst * argv,
    Func & f
) 

function processCallThis

template<typename Func, typename Res, typename... Args>
inline Value jac::processCallThis (
    ContextRef ctx,
    ValueWeak thisVal,
    std::vector< ValueWeak > argv,
    Func & f
) 

function processCallThisVariadic

template<typename Func, typename Res>
inline Value jac::processCallThisVariadic (
    ContextRef ctx,
    ValueWeak thisVal,
    std::vector< ValueWeak > argv,
    Func & f
) 

function processCallVariadic

template<typename Func, typename Res>
inline Value jac::processCallVariadic (
    ContextRef ctx,
    ValueWeak,
    std::vector< ValueWeak > argv,
    Func & f
) 

function processCallVariadicRaw

template<typename Func, typename Res>
inline JSValue jac::processCallVariadicRaw (
    ContextRef ctx,
    JSValueConst,
    int argc,
    JSValueConst * argv,
    Func & f
) 

function propagateExceptions

template<typename Func>
inline JSValue jac::propagateExceptions (
    ContextRef ctx,
    Func & f
) noexcept

Various functions to process function calls with unprocessed javascript arguments. Arguments and return value of the functions are automatically converted to and from javascript values. Exceptions thrown within the functions are caught and propagated to the javascript side.


function propagateExceptions

template<typename Func>
inline JSValue jac::propagateExceptions (
    ContextRef ctx,
    Func && f
) noexcept

function static_false

template<typename T>
constexpr bool jac::static_false () 

function toValue

template<typename T>
Value jac::toValue (
    ContextRef ctx,
    T val
) 

function toValue

template<typename T>
Value jac::toValue (
    ] ContextRef ctx,
    ] T value
) 

Public Static Functions Documentation

function initializeIo

template<class Machine>
static inline void jac::initializeIo (
    Machine & machine
) 


The documentation for this class was generated from the following file src/jac/features/basicStreamFeature.h