Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Friends | List of all members
dart::PersistentHandle Class Reference

#include <dart_api_state.h>

Public Member Functions

ObjectPtr ptr () const
 
void set_ptr (ObjectPtr ref)
 
void set_ptr (const LocalHandle &ref)
 
void set_ptr (const Object &object)
 
ObjectPtrraw_addr ()
 
Dart_PersistentHandle apiHandle ()
 

Static Public Member Functions

static intptr_t ptr_offset ()
 
static PersistentHandleCast (Dart_PersistentHandle handle)
 

Friends

class PersistentHandles
 

Detailed Description

Definition at line 149 of file dart_api_state.h.

Member Function Documentation

◆ apiHandle()

Dart_PersistentHandle dart::PersistentHandle::apiHandle ( )
inline

Definition at line 158 of file dart_api_state.h.

158 {
159 return reinterpret_cast<Dart_PersistentHandle>(this);
160 }
Dart_Handle Dart_PersistentHandle
Definition: dart_api.h:259

◆ Cast()

PersistentHandle * dart::PersistentHandle::Cast ( Dart_PersistentHandle  handle)
static

Definition at line 695 of file dart_api_impl.cc.

695 {
696 ASSERT(IsolateGroup::Current()->api_state()->IsValidPersistentHandle(handle));
697 return reinterpret_cast<PersistentHandle*>(handle);
698}
static IsolateGroup * Current()
Definition: isolate.h:539
#define ASSERT(E)

◆ ptr()

ObjectPtr dart::PersistentHandle::ptr ( ) const
inline

Definition at line 152 of file dart_api_state.h.

152{ return ptr_; }

◆ ptr_offset()

static intptr_t dart::PersistentHandle::ptr_offset ( )
inlinestatic

Definition at line 162 of file dart_api_state.h.

162{ return OFFSET_OF(PersistentHandle, ptr_); }
#define OFFSET_OF(type, field)
Definition: globals.h:138

◆ raw_addr()

ObjectPtr * dart::PersistentHandle::raw_addr ( )
inline

Definition at line 156 of file dart_api_state.h.

156{ return &ptr_; }

◆ set_ptr() [1/3]

void dart::PersistentHandle::set_ptr ( const LocalHandle ref)
inline

Definition at line 154 of file dart_api_state.h.

154{ ptr_ = ref.ptr(); }

◆ set_ptr() [2/3]

void dart::PersistentHandle::set_ptr ( const Object object)
inline

Definition at line 155 of file dart_api_state.h.

155{ ptr_ = object.ptr(); }

◆ set_ptr() [3/3]

void dart::PersistentHandle::set_ptr ( ObjectPtr  ref)
inline

Definition at line 153 of file dart_api_state.h.

153{ ptr_ = ref; }

Friends And Related Function Documentation

◆ PersistentHandles

friend class PersistentHandles
friend

Definition at line 167 of file dart_api_state.h.


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