Ultralight C++ API 1.3.0
Loading...
Searching...
No Matches
ultralight::JSString Class Reference

#include <AppCore/JSHelpers.h>

Details

JavaScript String wrapper that automatically manages JSStringRef lifetime and provides helpful conversions.

Public Member Functions

 JSString ()
 Create empty string.
 
 JSString (const char *str)
 Create from C-string.
 
 JSString (const String &str)
 Create from Ultralight String.
 
 JSString (JSStringRef str)
 Create from existing JSStringRef.
 
 JSString (const JSString &other)
 Copy constructor.
 
 ~JSString ()
 Destructor.
 
JSStringoperator= (const JSString &other)
 Assignment operator.
 
 operator String ()
 Cast to String.
 
 operator JSStringRef () const
 Cast to underlying JSStringRef.
 

Protected Attributes

JSStringRef instance_
 

Constructor & Destructor Documentation

◆ JSString() [1/5]

ultralight::JSString::JSString ( )

Create empty string.

◆ JSString() [2/5]

ultralight::JSString::JSString ( const char *  str)

Create from C-string.

◆ JSString() [3/5]

ultralight::JSString::JSString ( const String str)

Create from Ultralight String.

◆ JSString() [4/5]

ultralight::JSString::JSString ( JSStringRef  str)

Create from existing JSStringRef.

◆ JSString() [5/5]

ultralight::JSString::JSString ( const JSString other)

Copy constructor.

◆ ~JSString()

ultralight::JSString::~JSString ( )

Destructor.

Member Function Documentation

◆ operator JSStringRef()

ultralight::JSString::operator JSStringRef ( ) const
inline

Cast to underlying JSStringRef.

◆ operator String()

ultralight::JSString::operator String ( )

Cast to String.

◆ operator=()

JSString & ultralight::JSString::operator= ( const JSString other)

Assignment operator.

Member Data Documentation

◆ instance_

JSStringRef ultralight::JSString::instance_
protected

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