v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::LocalVector< T > Class Template Reference

#include <v8-local-handle.h>

Collaboration diagram for v8::LocalVector< T >:

Public Types

using value_type = Local<T>
 
using reference = value_type&
 
using const_reference = const value_type&
 
using size_type = size_t
 
using difference_type = ptrdiff_t
 
using iterator
 
using const_iterator
 

Public Member Functions

 LocalVector (Isolate *isolate)
 
 LocalVector (Isolate *isolate, size_t n)
 
 LocalVector (Isolate *isolate, std::initializer_list< Local< T > > init)
 
iterator begin () noexcept
 
const_iterator begin () const noexcept
 
iterator end () noexcept
 
const_iterator end () const noexcept
 
size_t size () const noexcept
 
bool empty () const noexcept
 
void reserve (size_t n)
 
void shrink_to_fit ()
 
Local< T > & operator[] (size_t n)
 
const Local< T > & operator[] (size_t n) const
 
Local< T > & at (size_t n)
 
const Local< T > & at (size_t n) const
 
Local< T > & front ()
 
const Local< T > & front () const
 
Local< T > & back ()
 
const Local< T > & back () const
 
Local< T > * data () noexcept
 
const Local< T > * data () const noexcept
 
iterator insert (const_iterator pos, const Local< T > &value)
 
template<typename InputIt >
iterator insert (const_iterator pos, InputIt first, InputIt last)
 
iterator insert (const_iterator pos, std::initializer_list< Local< T > > init)
 
LocalVector< T > & operator= (std::initializer_list< Local< T > > init)
 
void push_back (const Local< T > &x)
 
void pop_back ()
 
template<typename... Args>
void emplace_back (Args &&... args)
 
void clear () noexcept
 
void resize (size_t n)
 
void swap (LocalVector< T > &other)
 

Private Types

using element_type = internal::LocalUnchecked<T>
 
using allocator_type = std::allocator<element_type>
 
using vector_type = std::vector<element_type, allocator_type>
 

Static Private Member Functions

static allocator_type make_allocator (Isolate *isolate) noexcept
 

Private Attributes

vector_type backing_
 

Friends

bool operator== (const LocalVector< T > &x, const LocalVector< T > &y)
 
bool operator!= (const LocalVector< T > &x, const LocalVector< T > &y)
 
bool operator< (const LocalVector< T > &x, const LocalVector< T > &y)
 
bool operator> (const LocalVector< T > &x, const LocalVector< T > &y)
 
bool operator<= (const LocalVector< T > &x, const LocalVector< T > &y)
 
bool operator>= (const LocalVector< T > &x, const LocalVector< T > &y)
 

Detailed Description

template<typename T>
class v8::LocalVector< T >

Definition at line 495 of file v8-local-handle.h.

Member Typedef Documentation

◆ allocator_type

template<typename T >
using v8::LocalVector< T >::allocator_type = std::allocator<element_type>
private

Definition at line 506 of file v8-local-handle.h.

◆ const_iterator

template<typename T >
using v8::LocalVector< T >::const_iterator
Initial value:
internal::WrappedIterator<typename vector_type::const_iterator,
const Local<T>>

Definition at line 523 of file v8-local-handle.h.

◆ const_reference

template<typename T >
using v8::LocalVector< T >::const_reference = const value_type&

Definition at line 518 of file v8-local-handle.h.

◆ difference_type

template<typename T >
using v8::LocalVector< T >::difference_type = ptrdiff_t

Definition at line 520 of file v8-local-handle.h.

◆ element_type

template<typename T >
using v8::LocalVector< T >::element_type = internal::LocalUnchecked<T>
private

Definition at line 497 of file v8-local-handle.h.

◆ iterator

template<typename T >
using v8::LocalVector< T >::iterator
Initial value:
internal::WrappedIterator<typename vector_type::iterator, Local<T>>

Definition at line 521 of file v8-local-handle.h.

◆ reference

template<typename T >
using v8::LocalVector< T >::reference = value_type&

Definition at line 517 of file v8-local-handle.h.

◆ size_type

template<typename T >
using v8::LocalVector< T >::size_type = size_t

Definition at line 519 of file v8-local-handle.h.

◆ value_type

template<typename T >
using v8::LocalVector< T >::value_type = Local<T>

Definition at line 516 of file v8-local-handle.h.

◆ vector_type

template<typename T >
using v8::LocalVector< T >::vector_type = std::vector<element_type, allocator_type>
private

Definition at line 513 of file v8-local-handle.h.

Constructor & Destructor Documentation

◆ LocalVector() [1/3]

template<typename T >
v8::LocalVector< T >::LocalVector ( Isolate * isolate)
inlineexplicit

Definition at line 527 of file v8-local-handle.h.

◆ LocalVector() [2/3]

template<typename T >
v8::LocalVector< T >::LocalVector ( Isolate * isolate,
size_t n )
inline

Definition at line 528 of file v8-local-handle.h.

◆ LocalVector() [3/3]

template<typename T >
v8::LocalVector< T >::LocalVector ( Isolate * isolate,
std::initializer_list< Local< T > > init )
inlineexplicit

Definition at line 530 of file v8-local-handle.h.

Member Function Documentation

◆ at() [1/2]

template<typename T >
Local< T > & v8::LocalVector< T >::at ( size_t n)
inline

Definition at line 552 of file v8-local-handle.h.

◆ at() [2/2]

template<typename T >
const Local< T > & v8::LocalVector< T >::at ( size_t n) const
inline

Definition at line 553 of file v8-local-handle.h.

◆ back() [1/2]

template<typename T >
Local< T > & v8::LocalVector< T >::back ( )
inline

Definition at line 557 of file v8-local-handle.h.

◆ back() [2/2]

template<typename T >
const Local< T > & v8::LocalVector< T >::back ( ) const
inline

Definition at line 558 of file v8-local-handle.h.

◆ begin() [1/2]

template<typename T >
const_iterator v8::LocalVector< T >::begin ( ) const
inlinenoexcept

Definition at line 538 of file v8-local-handle.h.

◆ begin() [2/2]

template<typename T >
iterator v8::LocalVector< T >::begin ( )
inlinenoexcept

Definition at line 537 of file v8-local-handle.h.

◆ clear()

template<typename T >
void v8::LocalVector< T >::clear ( )
inlinenoexcept

Definition at line 591 of file v8-local-handle.h.

◆ data() [1/2]

template<typename T >
const Local< T > * v8::LocalVector< T >::data ( ) const
inlinenoexcept

Definition at line 561 of file v8-local-handle.h.

◆ data() [2/2]

template<typename T >
Local< T > * v8::LocalVector< T >::data ( )
inlinenoexcept

Definition at line 560 of file v8-local-handle.h.

◆ emplace_back()

template<typename T >
template<typename... Args>
void v8::LocalVector< T >::emplace_back ( Args &&... args)
inline

Definition at line 587 of file v8-local-handle.h.

◆ empty()

template<typename T >
bool v8::LocalVector< T >::empty ( ) const
inlinenoexcept

Definition at line 545 of file v8-local-handle.h.

Here is the caller graph for this function:

◆ end() [1/2]

template<typename T >
const_iterator v8::LocalVector< T >::end ( ) const
inlinenoexcept

Definition at line 542 of file v8-local-handle.h.

◆ end() [2/2]

template<typename T >
iterator v8::LocalVector< T >::end ( )
inlinenoexcept

Definition at line 541 of file v8-local-handle.h.

◆ front() [1/2]

template<typename T >
Local< T > & v8::LocalVector< T >::front ( )
inline

Definition at line 555 of file v8-local-handle.h.

◆ front() [2/2]

template<typename T >
const Local< T > & v8::LocalVector< T >::front ( ) const
inline

Definition at line 556 of file v8-local-handle.h.

◆ insert() [1/3]

template<typename T >
iterator v8::LocalVector< T >::insert ( const_iterator pos,
const Local< T > & value )
inline

Definition at line 563 of file v8-local-handle.h.

◆ insert() [2/3]

template<typename T >
template<typename InputIt >
iterator v8::LocalVector< T >::insert ( const_iterator pos,
InputIt first,
InputIt last )
inline

Definition at line 568 of file v8-local-handle.h.

◆ insert() [3/3]

template<typename T >
iterator v8::LocalVector< T >::insert ( const_iterator pos,
std::initializer_list< Local< T > > init )
inline

Definition at line 572 of file v8-local-handle.h.

◆ make_allocator()

template<typename T >
static allocator_type v8::LocalVector< T >::make_allocator ( Isolate * isolate)
inlinestaticprivatenoexcept

Definition at line 508 of file v8-local-handle.h.

◆ operator=()

template<typename T >
LocalVector< T > & v8::LocalVector< T >::operator= ( std::initializer_list< Local< T > > init)
inline

Definition at line 576 of file v8-local-handle.h.

◆ operator[]() [1/2]

template<typename T >
Local< T > & v8::LocalVector< T >::operator[] ( size_t n)
inline

Definition at line 549 of file v8-local-handle.h.

◆ operator[]() [2/2]

template<typename T >
const Local< T > & v8::LocalVector< T >::operator[] ( size_t n) const
inline

Definition at line 550 of file v8-local-handle.h.

◆ pop_back()

template<typename T >
void v8::LocalVector< T >::pop_back ( )
inline

Definition at line 584 of file v8-local-handle.h.

◆ push_back()

template<typename T >
void v8::LocalVector< T >::push_back ( const Local< T > & x)
inline

Definition at line 583 of file v8-local-handle.h.

Here is the caller graph for this function:

◆ reserve()

template<typename T >
void v8::LocalVector< T >::reserve ( size_t n)
inline

Definition at line 546 of file v8-local-handle.h.

Here is the caller graph for this function:

◆ resize()

template<typename T >
void v8::LocalVector< T >::resize ( size_t n)
inline

Definition at line 592 of file v8-local-handle.h.

◆ shrink_to_fit()

template<typename T >
void v8::LocalVector< T >::shrink_to_fit ( )
inline

Definition at line 547 of file v8-local-handle.h.

◆ size()

template<typename T >
size_t v8::LocalVector< T >::size ( ) const
inlinenoexcept

Definition at line 544 of file v8-local-handle.h.

Here is the caller graph for this function:

◆ swap()

template<typename T >
void v8::LocalVector< T >::swap ( LocalVector< T > & other)
inline

Definition at line 593 of file v8-local-handle.h.

Friends And Related Symbol Documentation

◆ operator!=

template<typename T >
bool operator!= ( const LocalVector< T > & x,
const LocalVector< T > & y )
friend

Definition at line 598 of file v8-local-handle.h.

◆ operator<

template<typename T >
bool operator< ( const LocalVector< T > & x,
const LocalVector< T > & y )
friend

Definition at line 601 of file v8-local-handle.h.

◆ operator<=

template<typename T >
bool operator<= ( const LocalVector< T > & x,
const LocalVector< T > & y )
friend

Definition at line 607 of file v8-local-handle.h.

◆ operator==

template<typename T >
bool operator== ( const LocalVector< T > & x,
const LocalVector< T > & y )
friend

Definition at line 595 of file v8-local-handle.h.

◆ operator>

template<typename T >
bool operator> ( const LocalVector< T > & x,
const LocalVector< T > & y )
friend

Definition at line 604 of file v8-local-handle.h.

◆ operator>=

template<typename T >
bool operator>= ( const LocalVector< T > & x,
const LocalVector< T > & y )
friend

Definition at line 610 of file v8-local-handle.h.

Member Data Documentation

◆ backing_

template<typename T >
vector_type v8::LocalVector< T >::backing_
private

Definition at line 615 of file v8-local-handle.h.


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