v8  9.4.146 (node 16.13.0)
V8 is Google's open source JavaScript engine
BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > Class Template Reference

#include <persistent.h>

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

Public Types

using PointeeType = T
 

Public Member Functions

 BasicPersistent (const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (std::nullptr_t, const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (SentinelPointer s, const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (T *raw, const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (T &raw, const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (const BasicPersistent &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>>
 BasicPersistent (const BasicPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > &other, const SourceLocation &loc=SourceLocation::Current())
 
 BasicPersistent (BasicPersistent &&other, const SourceLocation &loc=SourceLocation::Current()) noexcept
 
template<typename U , typename MemberBarrierPolicy , typename MemberWeaknessTag , typename MemberCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
 BasicPersistent (internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy > member, const SourceLocation &loc=SourceLocation::Current())
 
 ~BasicPersistent ()
 
BasicPersistentoperator= (const BasicPersistent &other)
 
template<typename U , typename OtherWeaknessPolicy , typename OtherLocationPolicy , typename OtherCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicPersistentoperator= (const BasicPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > &other)
 
BasicPersistentoperator= (BasicPersistent &&other) noexcept
 
template<typename U , typename MemberBarrierPolicy , typename MemberWeaknessTag , typename MemberCheckingPolicy , typename = std::enable_if_t<std::is_base_of<T, U>::value>>
BasicPersistentoperator= (internal::BasicMember< U, MemberBarrierPolicy, MemberWeaknessTag, MemberCheckingPolicy > member)
 
BasicPersistentoperator= (T *other)
 
BasicPersistentoperator= (std::nullptr_t)
 
BasicPersistentoperator= (SentinelPointer s)
 
 operator bool () const
 
 operator T* () const
 
T * operator-> () const
 
T & operator* () const
 
 V8_CLANG_NO_SANITIZE ("cfi-unrelated-cast") T *Get() const
 
void Clear ()
 
T * Release ()
 
template<typename U , typename OtherWeaknessPolicy = WeaknessPolicy, typename OtherLocationPolicy = LocationPolicy, typename OtherCheckingPolicy = CheckingPolicy>
BasicPersistent< U, OtherWeaknessPolicy, OtherLocationPolicy, OtherCheckingPolicy > To () 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
 
- Protected Attributes inherited from PersistentBase
const void * raw_ = nullptr
 
PersistentNodenode_ = nullptr
 

Detailed Description

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

Definition at line 54 of file persistent.h.

Member Typedef Documentation

◆ PointeeType

using PointeeType = T

Definition at line 60 of file persistent.h.

Constructor & Destructor Documentation

◆ BasicPersistent() [1/9]

Definition at line 63 of file persistent.h.

◆ BasicPersistent() [2/9]

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

Definition at line 67 of file persistent.h.

◆ BasicPersistent() [3/9]

Definition at line 71 of file persistent.h.

◆ BasicPersistent() [4/9]

◆ BasicPersistent() [5/9]

BasicPersistent ( T &  raw,
const SourceLocation loc = SourceLocation::Current() 
)
inline

Definition at line 85 of file persistent.h.

References Visitor::internal::BasicPersistent.

◆ BasicPersistent() [6/9]

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

Definition at line 90 of file persistent.h.

References Visitor::internal::BasicPersistent.

◆ BasicPersistent() [7/9]

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

Definition at line 98 of file persistent.h.

References Visitor::internal::BasicPersistent.

◆ BasicPersistent() [8/9]

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

Definition at line 106 of file persistent.h.

References PersistentBase::GetNode().

◆ BasicPersistent() [9/9]

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

Definition at line 121 of file persistent.h.

References Visitor::internal::BasicPersistent.

◆ ~BasicPersistent()

Member Function Documentation

◆ Clear()

◆ operator bool()

operator bool ( ) const
inlineexplicit

Definition at line 183 of file persistent.h.

◆ operator T*()

operator T* ( ) const
inline

Definition at line 184 of file persistent.h.

◆ operator*()

T& operator* ( ) const
inline

Definition at line 186 of file persistent.h.

◆ operator->()

T* operator-> ( ) const
inline

Definition at line 185 of file persistent.h.

◆ operator=() [1/7]

BasicPersistent& operator= ( BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy > &&  other)
inlinenoexcept

◆ operator=() [2/7]

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

Definition at line 130 of file persistent.h.

◆ operator=() [3/7]

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

Definition at line 137 of file persistent.h.

◆ operator=() [4/7]

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

Definition at line 161 of file persistent.h.

◆ operator=() [5/7]

BasicPersistent& operator= ( SentinelPointer  s)
inline

Definition at line 178 of file persistent.h.

◆ operator=() [6/7]

BasicPersistent& operator= ( std::nullptr_t  )
inline

◆ operator=() [7/7]

BasicPersistent& operator= ( T *  other)
inline

Definition at line 168 of file persistent.h.

◆ Release()

T* Release ( )
inline

◆ To()

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

Definition at line 219 of file persistent.h.

References Visitor::internal::BasicPersistent.

◆ V8_CLANG_NO_SANITIZE()

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

Definition at line 191 of file persistent.h.

References PersistentBase::GetValue().

Friends And Related Function Documentation

◆ cppgc::Visitor

friend class cppgc::Visitor
friend

Definition at line 268 of file persistent.h.


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