v8  8.6.395 (node 15.0.1)
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)
 
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 ()
 

Friends

class cppgc::Visitor
 

Additional Inherited Members

- Protected Member Functions inherited from PersistentBase
 PersistentBase ()=default
 
 PersistentBase (void *raw)
 
void * GetValue () const
 
void SetValue (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::BasicPersistent< T, WeaknessPolicy, LocationPolicy, CheckingPolicy >

Definition at line 51 of file persistent.h.

Member Typedef Documentation

◆ PointeeType

using PointeeType = T

Definition at line 57 of file persistent.h.

Constructor & Destructor Documentation

◆ BasicPersistent() [1/9]

Definition at line 60 of file persistent.h.

◆ BasicPersistent() [2/9]

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

Definition at line 64 of file persistent.h.

◆ BasicPersistent() [3/9]

Definition at line 68 of file persistent.h.

◆ BasicPersistent() [4/9]

◆ BasicPersistent() [5/9]

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

Definition at line 82 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 87 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 95 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 103 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 118 of file persistent.h.

References Visitor::internal::BasicPersistent.

◆ ~BasicPersistent()

Member Function Documentation

◆ Clear()

◆ operator bool()

operator bool ( ) const
inlineexplicit

Definition at line 180 of file persistent.h.

◆ operator T*()

operator T* ( ) const
inline

Definition at line 181 of file persistent.h.

◆ operator*()

T& operator* ( ) const
inline

Definition at line 183 of file persistent.h.

◆ operator->()

T* operator-> ( ) const
inline

Definition at line 182 of file persistent.h.

◆ operator=() [1/7]

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

◆ operator=() [2/7]

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

Definition at line 127 of file persistent.h.

◆ operator=() [3/7]

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

Definition at line 134 of file persistent.h.

◆ operator=() [4/7]

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

Definition at line 158 of file persistent.h.

◆ operator=() [5/7]

BasicPersistent& operator= ( SentinelPointer  s)
inline

Definition at line 175 of file persistent.h.

◆ operator=() [6/7]

BasicPersistent& operator= ( std::nullptr_t  )
inline

◆ operator=() [7/7]

BasicPersistent& operator= ( T *  other)
inline

Definition at line 165 of file persistent.h.

◆ Release()

T* Release ( )
inline

◆ V8_CLANG_NO_SANITIZE()

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

Definition at line 188 of file persistent.h.

References PersistentBase::GetValue().

Friends And Related Function Documentation

◆ cppgc::Visitor

friend class cppgc::Visitor
friend

Definition at line 238 of file persistent.h.


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