CCF
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ccf::js::core::JSWrappedValue Struct Reference

#include <wrapped_value.h>

Public Member Functions

 JSWrappedValue ()
 
 JSWrappedValue (JSContext *ctx, JSValue &&val)
 
 JSWrappedValue (JSContext *ctx, const JSValue &value)
 
 JSWrappedValue (const JSWrappedValue &other)
 
 JSWrappedValue (JSWrappedValue &&other) noexcept
 
 ~JSWrappedValue ()
 
JSWrappedValueoperator= (const JSWrappedValue &other)
 
JSWrappedValue operator[] (const char *prop) const
 
JSWrappedValue operator[] (const std::string &prop) const
 
JSWrappedValue operator[] (uint32_t i) const
 
int set (const char *prop, JSWrappedValue &&value) const
 
int set_getter (const char *prop, JSWrappedValue &&getter) const
 
int set (const std::string &prop, JSWrappedValue &&value) const
 
int set (const std::string &prop, JSValue &&value) const
 
int set_null (const std::string &prop) const
 
int set_uint32 (const std::string &prop, uint32_t i) const
 
int set_int64 (const std::string &prop, int64_t i) const
 
int set_bool (const std::string &prop, bool b) const
 
int set_at_index (uint32_t index, JSWrappedValue &&value)
 
bool is_exception () const
 
bool is_error () const
 
bool is_obj () const
 
bool is_str () const
 
bool is_true () const
 
bool is_undefined () const
 
JSValue take ()
 

Public Attributes

JSContext * ctx
 
JSValue val
 

Constructor & Destructor Documentation

◆ JSWrappedValue() [1/5]

ccf::js::core::JSWrappedValue::JSWrappedValue ( )

◆ JSWrappedValue() [2/5]

ccf::js::core::JSWrappedValue::JSWrappedValue ( JSContext *  ctx,
JSValue &&  val 
)

◆ JSWrappedValue() [3/5]

ccf::js::core::JSWrappedValue::JSWrappedValue ( JSContext *  ctx,
const JSValue &  value 
)

◆ JSWrappedValue() [4/5]

ccf::js::core::JSWrappedValue::JSWrappedValue ( const JSWrappedValue other)

◆ JSWrappedValue() [5/5]

ccf::js::core::JSWrappedValue::JSWrappedValue ( JSWrappedValue &&  other)
noexcept

◆ ~JSWrappedValue()

ccf::js::core::JSWrappedValue::~JSWrappedValue ( )

Member Function Documentation

◆ is_error()

bool ccf::js::core::JSWrappedValue::is_error ( ) const

◆ is_exception()

bool ccf::js::core::JSWrappedValue::is_exception ( ) const

◆ is_obj()

bool ccf::js::core::JSWrappedValue::is_obj ( ) const

◆ is_str()

bool ccf::js::core::JSWrappedValue::is_str ( ) const

◆ is_true()

bool ccf::js::core::JSWrappedValue::is_true ( ) const

◆ is_undefined()

bool ccf::js::core::JSWrappedValue::is_undefined ( ) const

◆ operator=()

JSWrappedValue & ccf::js::core::JSWrappedValue::operator= ( const JSWrappedValue other)

◆ operator[]() [1/3]

JSWrappedValue ccf::js::core::JSWrappedValue::operator[] ( const char *  prop) const

◆ operator[]() [2/3]

JSWrappedValue ccf::js::core::JSWrappedValue::operator[] ( const std::string &  prop) const

◆ operator[]() [3/3]

JSWrappedValue ccf::js::core::JSWrappedValue::operator[] ( uint32_t  i) const

◆ set() [1/3]

int ccf::js::core::JSWrappedValue::set ( const char *  prop,
JSWrappedValue &&  value 
) const

◆ set() [2/3]

int ccf::js::core::JSWrappedValue::set ( const std::string &  prop,
JSValue &&  value 
) const

◆ set() [3/3]

int ccf::js::core::JSWrappedValue::set ( const std::string &  prop,
JSWrappedValue &&  value 
) const

◆ set_at_index()

int ccf::js::core::JSWrappedValue::set_at_index ( uint32_t  index,
JSWrappedValue &&  value 
)

◆ set_bool()

int ccf::js::core::JSWrappedValue::set_bool ( const std::string &  prop,
bool  b 
) const

◆ set_getter()

int ccf::js::core::JSWrappedValue::set_getter ( const char *  prop,
JSWrappedValue &&  getter 
) const

◆ set_int64()

int ccf::js::core::JSWrappedValue::set_int64 ( const std::string &  prop,
int64_t  i 
) const

◆ set_null()

int ccf::js::core::JSWrappedValue::set_null ( const std::string &  prop) const

◆ set_uint32()

int ccf::js::core::JSWrappedValue::set_uint32 ( const std::string &  prop,
uint32_t  i 
) const

◆ take()

JSValue ccf::js::core::JSWrappedValue::take ( )

Member Data Documentation

◆ ctx

JSContext* ccf::js::core::JSWrappedValue::ctx

◆ val

JSValue ccf::js::core::JSWrappedValue::val

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