Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
v8::DictionaryTemplate Class Referencefinal

#include <v8-template.h>

Public Member Functions

Local< ObjectNewInstance (Local< Context > context, MemorySpan< MaybeLocal< Value > > property_values)
 

Static Public Member Functions

static Local< DictionaryTemplateNew (Isolate *isolate, MemorySpan< const std::string_view > names)
 
static DictionaryTemplateCast (Data *data)
 

Detailed Description

A template to create dictionary objects at runtime.

Member Function Documentation

◆ Cast()

DictionaryTemplate * v8::DictionaryTemplate::Cast ( Data data)
inlinestatic

◆ New()

static Local< DictionaryTemplate > v8::DictionaryTemplate::New ( Isolate isolate,
MemorySpan< const std::string_view >  names 
)
static

Creates a new template. Also declares data properties that can be passed on instantiation of the template. Properties can only be declared on construction and are then immutable. The values are passed on creating the object via NewInstance().

Parameters
namesthe keys that can be passed on instantiation.

◆ NewInstance()

Local< Object > v8::DictionaryTemplate::NewInstance ( Local< Context context,
MemorySpan< MaybeLocal< Value > >  property_values 
)

Creates a new instance of this template.

Parameters
contextThe context used to create the dictionary object.
property_valuesValues of properties that were declared using DeclareDataProperties(). The span only passes values and expectes the order to match the declaration. Non-existent properties are signaled via empty MaybeLocals.

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