#include <dart_wrappable.h>
Public Types | |
| enum | DartNativeFields { kPeerIndex , kNumberOfNativeFields } |
Public Member Functions | |
| DartWrappable () | |
| virtual const DartWrapperInfo & | GetDartWrapperInfo () const =0 |
| virtual void | RetainDartWrappableReference () const =0 |
| virtual void | ReleaseDartWrappableReference () const =0 |
| Dart_Handle | CreateDartWrapper (DartState *dart_state) |
| void | AssociateWithDartWrapper (Dart_Handle wrappable) |
| void | ClearDartWrapper () |
| Dart_WeakPersistentHandle | dart_wrapper () const |
Protected Member Functions | |
| virtual | ~DartWrappable () |
Static Protected Member Functions | |
| static Dart_PersistentHandle | GetTypeForWrapper (tonic::DartState *dart_state, const tonic::DartWrapperInfo &wrapper_info) |
Definition at line 22 of file dart_wrappable.h.
| Enumerator | |
|---|---|
| kPeerIndex | |
| kNumberOfNativeFields | |
Definition at line 24 of file dart_wrappable.h.
|
inline |
Definition at line 29 of file dart_wrappable.h.
|
protectedvirtual |
Definition at line 14 of file dart_wrappable.cc.
| void tonic::DartWrappable::AssociateWithDartWrapper | ( | Dart_Handle | wrappable | ) |
Definition at line 47 of file dart_wrappable.cc.
References tonic::CheckAndHandleError(), tonic::DartWeakPersistentValue::Clear(), tonic::DartState::Current(), tonic::DartWeakPersistentValue::Get(), tonic::DartWeakPersistentValue::is_empty(), kPeerIndex, RetainDartWrappableReference(), tonic::DartWeakPersistentValue::Set(), TONIC_CHECK, and TONIC_DCHECK.
Referenced by flutter::ImmutableBuffer::init(), flutter::ImmutableBuffer::initFromAsset(), and flutter::ImmutableBuffer::initFromFile().
| void tonic::DartWrappable::ClearDartWrapper | ( | ) |
Definition at line 66 of file dart_wrappable.cc.
References tonic::CheckAndHandleError(), tonic::DartWeakPersistentValue::Clear(), tonic::DartWeakPersistentValue::Get(), tonic::DartWeakPersistentValue::is_empty(), kPeerIndex, ReleaseDartWrappableReference(), TONIC_CHECK, and TONIC_DCHECK.
Referenced by flutter::ParagraphBuilder::build(), flutter::SceneBuilder::build(), flutter::SemanticsUpdateBuilder::build(), flutter::Scene::dispose(), flutter::Codec::dispose(), flutter::CanvasImage::dispose(), flutter::ImageDescriptor::dispose(), flutter::ImageShader::dispose(), flutter::ImmutableBuffer::dispose(), flutter::Picture::dispose(), flutter::SemanticsUpdate::dispose(), and flutter::PictureRecorder::endRecording().
| Dart_Handle tonic::DartWrappable::CreateDartWrapper | ( | DartState * | dart_state | ) |
Definition at line 19 of file dart_wrappable.cc.
References tonic::CheckAndHandleError(), tonic::DartState::class_library(), tonic::DartWeakPersistentValue::Clear(), tonic::DartWeakPersistentValue::Get(), tonic::DartClassLibrary::GetClass(), GetDartWrapperInfo(), tonic::DartWeakPersistentValue::is_empty(), kPeerIndex, tonic::DartState::private_constructor_name(), RetainDartWrappableReference(), tonic::DartWeakPersistentValue::Set(), TONIC_DCHECK, and type.
Referenced by tonic::DartConverter< T *, typename std::enable_if< std::is_convertible< T *, const DartWrappable * >::value >::type >::SetReturnValue(), and tonic::DartConverter< T *, typename std::enable_if< std::is_convertible< T *, const DartWrappable * >::value >::type >::ToDart().
|
inline |
Definition at line 47 of file dart_wrappable.h.
References tonic::DartWeakPersistentValue::value().
Referenced by flutter::FragmentProgram::initFromAsset(), tonic::DartConverter< T *, typename std::enable_if< std::is_convertible< T *, const DartWrappable * >::value >::type >::SetReturnValue(), and tonic::DartConverter< T *, typename std::enable_if< std::is_convertible< T *, const DartWrappable * >::value >::type >::ToDart().
|
pure virtual |
Referenced by CreateDartWrapper().
|
staticprotected |
Definition at line 81 of file dart_wrappable.cc.
References tonic::DartState::class_library(), and tonic::DartClassLibrary::GetClass().
|
pure virtual |
Implemented in flutter::RefCountedDartWrappable< T >, flutter::RefCountedDartWrappable< Canvas >, flutter::RefCountedDartWrappable< CanvasImage >, flutter::RefCountedDartWrappable< CanvasPath >, flutter::RefCountedDartWrappable< CanvasPathMeasure >, flutter::RefCountedDartWrappable< Codec >, flutter::RefCountedDartWrappable< ColorFilter >, flutter::RefCountedDartWrappable< CommandBuffer >, flutter::RefCountedDartWrappable< Context >, flutter::RefCountedDartWrappable< DeviceBuffer >, flutter::RefCountedDartWrappable< EngineLayer >, flutter::RefCountedDartWrappable< FragmentProgram >, flutter::RefCountedDartWrappable< ImageDescriptor >, flutter::RefCountedDartWrappable< ImageFilter >, flutter::RefCountedDartWrappable< ImmutableBuffer >, flutter::RefCountedDartWrappable< MyNativeClass >, flutter::RefCountedDartWrappable< NativeSemanticsFlags >, flutter::RefCountedDartWrappable< NativeStringAttribute >, flutter::RefCountedDartWrappable< Paragraph >, flutter::RefCountedDartWrappable< ParagraphBuilder >, flutter::RefCountedDartWrappable< Picture >, flutter::RefCountedDartWrappable< PictureRecorder >, flutter::RefCountedDartWrappable< RenderPass >, flutter::RefCountedDartWrappable< RenderPipeline >, flutter::RefCountedDartWrappable< RSuperellipse >, flutter::RefCountedDartWrappable< Scene >, flutter::RefCountedDartWrappable< SceneBuilder >, flutter::RefCountedDartWrappable< SemanticsUpdate >, flutter::RefCountedDartWrappable< SemanticsUpdateBuilder >, flutter::RefCountedDartWrappable< Shader >, flutter::RefCountedDartWrappable< ShaderLibrary >, flutter::RefCountedDartWrappable< Texture >, and flutter::RefCountedDartWrappable< Vertices >.
Referenced by ClearDartWrapper().
|
pure virtual |
Implemented in flutter::RefCountedDartWrappable< T >, flutter::RefCountedDartWrappable< Canvas >, flutter::RefCountedDartWrappable< CanvasImage >, flutter::RefCountedDartWrappable< CanvasPath >, flutter::RefCountedDartWrappable< CanvasPathMeasure >, flutter::RefCountedDartWrappable< Codec >, flutter::RefCountedDartWrappable< ColorFilter >, flutter::RefCountedDartWrappable< CommandBuffer >, flutter::RefCountedDartWrappable< Context >, flutter::RefCountedDartWrappable< DeviceBuffer >, flutter::RefCountedDartWrappable< EngineLayer >, flutter::RefCountedDartWrappable< FragmentProgram >, flutter::RefCountedDartWrappable< ImageDescriptor >, flutter::RefCountedDartWrappable< ImageFilter >, flutter::RefCountedDartWrappable< ImmutableBuffer >, flutter::RefCountedDartWrappable< MyNativeClass >, flutter::RefCountedDartWrappable< NativeSemanticsFlags >, flutter::RefCountedDartWrappable< NativeStringAttribute >, flutter::RefCountedDartWrappable< Paragraph >, flutter::RefCountedDartWrappable< ParagraphBuilder >, flutter::RefCountedDartWrappable< Picture >, flutter::RefCountedDartWrappable< PictureRecorder >, flutter::RefCountedDartWrappable< RenderPass >, flutter::RefCountedDartWrappable< RenderPipeline >, flutter::RefCountedDartWrappable< RSuperellipse >, flutter::RefCountedDartWrappable< Scene >, flutter::RefCountedDartWrappable< SceneBuilder >, flutter::RefCountedDartWrappable< SemanticsUpdate >, flutter::RefCountedDartWrappable< SemanticsUpdateBuilder >, flutter::RefCountedDartWrappable< Shader >, flutter::RefCountedDartWrappable< ShaderLibrary >, flutter::RefCountedDartWrappable< Texture >, and flutter::RefCountedDartWrappable< Vertices >.
Referenced by AssociateWithDartWrapper(), and CreateDartWrapper().