v8  9.0.257(node16.0.0)
V8 is Google's open source JavaScript engine
BasicCrossThreadPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > Class Template Referencefinal

#include <cross-thread-persistent.h>

Inheritance diagram for BasicCrossThreadPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >:
Collaboration diagram for BasicCrossThreadPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >:

Public Types

using PointeeType = T
 

Public Member Functions

 ~BasicCrossThreadPersistent ()
 
 BasicCrossThreadPersistent (const SourceLocation &loc=SourceLocation::Current())
 
 BasicCrossThreadPersistent (std::nullptr_t, const SourceLocation &loc=SourceLocation::Current())
 
 BasicCrossThreadPersistent (SentinelPointer s, const SourceLocation &loc=SourceLocation::Current())
 
 BasicCrossThreadPersistent (T *raw, const SourceLocation &loc=SourceLocation::Current())
 
 BasicCrossThreadPersistent (T &raw, const SourceLocation &loc=SourceLocation::Current())
 
template<typename U , typename MemberBarrierPolicy , typename MemberWeaknessTag , typename MemberCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
 BasicCrossThreadPersistent (internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy > member, const SourceLocation &loc=SourceLocation::Current())
 
 BasicCrossThreadPersistent (const BasicCrossThreadPersistent &other, const SourceLocation &loc=SourceLocation::Current())
 
template<typename U , typename OtherWeaknessPolicy , typename OtherLocationPolicy , typename OtherCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
 BasicCrossThreadPersistent (const BasicCrossThreadPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > &other, const SourceLocation &loc=SourceLocation::Current())
 
 BasicCrossThreadPersistent (BasicCrossThreadPersistent &&other, const SourceLocation &loc=SourceLocation::Current()) noexcept
 
BasicCrossThreadPersistentoperator= (const BasicCrossThreadPersistent &other)
 
template<typename U , typename OtherWeaknessPolicy , typename OtherLocationPolicy , typename OtherCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicCrossThreadPersistentoperator= (const BasicCrossThreadPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > &other)
 
BasicCrossThreadPersistentoperator= (BasicCrossThreadPersistent &&other)
 
BasicCrossThreadPersistentoperator= (T *other)
 
template<typename U , typename MemberBarrierPolicy , typename MemberWeaknessTag , typename MemberCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicCrossThreadPersistentoperator= (internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy > member)
 
BasicCrossThreadPersistentoperator= (std::nullptr_t)
 
BasicCrossThreadPersistentoperator= (SentinelPointer s)
 
 V8_CLANG_NO_SANITIZE ("cfi-unrelated-cast") T *Get() const
 
void Clear ()
 
T * Release ()
 
 operator bool () const
 
 operator T* () const
 
T * operator-> () const
 
T & operator* () const
 
template<typename U , typename OtherWeaknessPolicy = WeaknessPolicy, typename OtherLocationPolicy = LocationPolicy, typename OtherCheckingPolicy = CheckingPolicy>
BasicCrossThreadPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > To () const
 
template<typename U = T, typename = typename std::enable_if<!BasicCrossThreadPersistent< U, WeaknessPolicy>::IsStrongPersistent::value>::type>
BasicCrossThreadPersistent< U, internal::StrongCrossThreadPersistentPolicyLock () const
 

Friends

class cppgc::Visitor
 

Additional Inherited Members

- Protected Member Functions inherited from PersistentBase
 PersistentBase ()=default
 
 PersistentBase (const void *raw)
 
const void * GetValue () const
 
void SetValue (const void *value)
 
PersistentNodeGetNode () const
 
void SetNode (PersistentNode *node)
 
void ClearFromGC () const
 

Detailed Description

template<typename T, typename WeaknessPolicy, typename LocationPolicy, typename CheckingPolicy>
class cppgc::internal::BasicCrossThreadPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >

Definition at line 21 of file cross-thread-persistent.h.

Member Typedef Documentation

◆ PointeeType

using PointeeType = T

Definition at line 27 of file cross-thread-persistent.h.

Constructor & Destructor Documentation

◆ ~BasicCrossThreadPersistent()

◆ BasicCrossThreadPersistent() [1/9]

Definition at line 31 of file cross-thread-persistent.h.

◆ BasicCrossThreadPersistent() [2/9]

BasicCrossThreadPersistent ( std::nullptr_t  ,
const SourceLocation loc = SourceLocation::Current() 
)
inline

Definition at line 35 of file cross-thread-persistent.h.

◆ BasicCrossThreadPersistent() [3/9]

Definition at line 39 of file cross-thread-persistent.h.

◆ BasicCrossThreadPersistent() [4/9]

◆ BasicCrossThreadPersistent() [5/9]

◆ BasicCrossThreadPersistent() [6/9]

BasicCrossThreadPersistent ( internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy >  member,
const SourceLocation loc = SourceLocation::Current() 
)
inline

◆ BasicCrossThreadPersistent() [7/9]

BasicCrossThreadPersistent ( const BasicCrossThreadPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > &  other,
const SourceLocation loc = SourceLocation::Current() 
)
inline

◆ BasicCrossThreadPersistent() [8/9]

BasicCrossThreadPersistent ( const BasicCrossThreadPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > &  other,
const SourceLocation loc = SourceLocation::Current() 
)
inline

◆ BasicCrossThreadPersistent() [9/9]

BasicCrossThreadPersistent ( BasicCrossThreadPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > &&  other,
const SourceLocation loc = SourceLocation::Current() 
)
inlinenoexcept

Definition at line 87 of file cross-thread-persistent.h.

Member Function Documentation

◆ Clear()

◆ Lock()

◆ operator bool()

operator bool ( ) const
inlineexplicit

Conversio to boolean.

Note: Not thread-safe.

Returns
true if an actual object has been stored and false otherwise.

Definition at line 203 of file cross-thread-persistent.h.

◆ operator T*()

operator T* ( ) const
inline

Conversion to object of type T.

Note: Not thread-safe.

Returns
the object.

Definition at line 212 of file cross-thread-persistent.h.

◆ operator*()

T& operator* ( ) const
inline

Definition at line 220 of file cross-thread-persistent.h.

◆ operator->()

T* operator-> ( ) const
inline

Dereferences the stored object.

Note: Not thread-safe.

Definition at line 219 of file cross-thread-persistent.h.

◆ operator=() [1/7]

◆ operator=() [2/7]

BasicCrossThreadPersistent& operator= ( const BasicCrossThreadPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > &  other)
inline

Definition at line 94 of file cross-thread-persistent.h.

◆ operator=() [3/7]

BasicCrossThreadPersistent& operator= ( const BasicCrossThreadPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > &  other)
inline

Definition at line 104 of file cross-thread-persistent.h.

◆ operator=() [4/7]

BasicCrossThreadPersistent& operator= ( internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy >  member)
inline

Definition at line 136 of file cross-thread-persistent.h.

◆ operator=() [5/7]

BasicCrossThreadPersistent& operator= ( SentinelPointer  s)
inline

Definition at line 148 of file cross-thread-persistent.h.

◆ operator=() [6/7]

◆ operator=() [7/7]

BasicCrossThreadPersistent& operator= ( T *  other)
inline

Definition at line 127 of file cross-thread-persistent.h.

◆ Release()

T* Release ( )
inline

Returns a pointer to the stored object and releases it.

Note: Not thread-safe.

Returns
a pointer to the stored object.

Definition at line 190 of file cross-thread-persistent.h.

References BasicCrossThreadPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >::Clear().

◆ To()

BasicCrossThreadPersistent<U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy> To ( ) const
inline

◆ V8_CLANG_NO_SANITIZE()

V8_CLANG_NO_SANITIZE ( "cfi-unrelated-cast"  ) const
inline

Returns a pointer to the stored object.

Note: Not thread-safe.

Returns
a pointer to the stored object.

Definition at line 163 of file cross-thread-persistent.h.

References PersistentBase::GetValue().

Friends And Related Function Documentation

◆ cppgc::Visitor

friend class cppgc::Visitor
friend

Definition at line 299 of file cross-thread-persistent.h.


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