V8 Project
v8::String::ExternalStringResource Class Referenceabstract

An ExternalStringResource is a wrapper around a two-byte string buffer that resides outside V8's heap. More...

#include <v8.h>

+ Inheritance diagram for v8::String::ExternalStringResource:
+ Collaboration diagram for v8::String::ExternalStringResource:

Public Member Functions

virtual ~ExternalStringResource ()
 Override the destructor to manage the life cycle of the underlying buffer. More...
 
virtual const uint16_t * data () const =0
 The string data from the underlying buffer. More...
 
virtual size_t length () const =0
 The length of the string. More...
 
- Public Member Functions inherited from v8::String::ExternalStringResourceBase
virtual ~ExternalStringResourceBase ()
 

Protected Member Functions

 ExternalStringResource ()
 
- Protected Member Functions inherited from v8::String::ExternalStringResourceBase
 ExternalStringResourceBase ()
 
virtual void Dispose ()
 Internally V8 will call this Dispose method when the external string resource is no longer needed. More...
 

Detailed Description

An ExternalStringResource is a wrapper around a two-byte string buffer that resides outside V8's heap.

Implement an ExternalStringResource to manage the life cycle of the underlying buffer. Note that the string data must be immutable.

Definition at line 1884 of file v8.h.

Constructor & Destructor Documentation

◆ ~ExternalStringResource()

virtual v8::String::ExternalStringResource::~ExternalStringResource ( )
inlinevirtual

Override the destructor to manage the life cycle of the underlying buffer.

Definition at line 1891 of file v8.h.

1891 {}

◆ ExternalStringResource()

v8::String::ExternalStringResource::ExternalStringResource ( )
inlineprotected

Definition at line 1904 of file v8.h.

1904 {}

Member Function Documentation

◆ data()

virtual const uint16_t* v8::String::ExternalStringResource::data ( ) const
pure virtual

The string data from the underlying buffer.

Referenced by v8::String::MakeExternal(), v8::internal::String::MakeExternal(), and v8::String::NewExternal().

+ Here is the caller graph for this function:

◆ length()

virtual size_t v8::String::ExternalStringResource::length ( ) const
pure virtual

The length of the string.

That is, the number of two-byte characters.

Referenced by v8::internal::String::MakeExternal().

+ Here is the caller graph for this function:

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