Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
flutter::NativeStringAttribute Class Reference

The peer class for all of the StringAttribute subclasses in semantics.dart. More...

#include <string_attribute.h>

Inheritance diagram for flutter::NativeStringAttribute:
flutter::RefCountedDartWrappable< NativeStringAttribute > fml::RefCountedThreadSafe< T > tonic::DartWrappable fml::internal::RefCountedThreadSafeBase

Public Member Functions

 ~NativeStringAttribute () override
 
const StringAttributePtr GetAttribute () const
 Returns the c++ representataion of StringAttribute.
 
- Public Member Functions inherited from flutter::RefCountedDartWrappable< NativeStringAttribute >
virtual void RetainDartWrappableReference () const override
 
virtual void ReleaseDartWrappableReference () const override
 
- Public Member Functions inherited from fml::RefCountedThreadSafe< T >
void Release () const
 
- Public Member Functions inherited from fml::internal::RefCountedThreadSafeBase
void AddRef () const
 
bool HasOneRef () const
 
void AssertHasOneRef () const
 
- Public Member Functions inherited from tonic::DartWrappable
 DartWrappable ()
 
virtual const DartWrapperInfoGetDartWrapperInfo () const =0
 
Dart_Handle CreateDartWrapper (DartState *dart_state)
 
void AssociateWithDartWrapper (Dart_Handle wrappable)
 
void ClearDartWrapper ()
 
Dart_WeakPersistentHandle dart_wrapper () const
 

Static Public Member Functions

static void initSpellOutStringAttribute (Dart_Handle string_attribute_handle, int32_t start, int32_t end)
 The init method for SpellOutStringAttribute constructor.
 
static void initLocaleStringAttribute (Dart_Handle string_attribute_handle, int32_t start, int32_t end, std::string locale)
 The init method for LocaleStringAttribute constructor.
 

Additional Inherited Members

- Public Types inherited from tonic::DartWrappable
enum  DartNativeFields { kPeerIndex , kNumberOfNativeFields }
 
- Protected Member Functions inherited from fml::RefCountedThreadSafe< T >
 RefCountedThreadSafe ()
 
 ~RefCountedThreadSafe ()
 
- Protected Member Functions inherited from fml::internal::RefCountedThreadSafeBase
 RefCountedThreadSafeBase ()
 
 ~RefCountedThreadSafeBase ()
 
bool Release () const
 
void Adopt ()
 
- Protected Member Functions inherited from tonic::DartWrappable
virtual ~DartWrappable ()
 
- Static Protected Member Functions inherited from tonic::DartWrappable
static Dart_PersistentHandle GetTypeForWrapper (tonic::DartState *dart_state, const tonic::DartWrapperInfo &wrapper_info)
 

Detailed Description

The peer class for all of the StringAttribute subclasses in semantics.dart.

Definition at line 56 of file string_attribute.h.

Constructor & Destructor Documentation

◆ ~NativeStringAttribute()

flutter::NativeStringAttribute::~NativeStringAttribute ( )
override

Definition at line 21 of file string_attribute.cc.

21{}

Member Function Documentation

◆ GetAttribute()

const StringAttributePtr flutter::NativeStringAttribute::GetAttribute ( ) const

Returns the c++ representataion of StringAttribute.

Definition at line 55 of file string_attribute.cc.

55 {
56 return attribute_;
57}

◆ initLocaleStringAttribute()

void flutter::NativeStringAttribute::initLocaleStringAttribute ( Dart_Handle  string_attribute_handle,
int32_t  start,
int32_t  end,
std::string  locale 
)
static

The init method for LocaleStringAttribute constructor.

Definition at line 38 of file string_attribute.cc.

42 {
44 auto native_string_attribute = fml::MakeRefCounted<NativeStringAttribute>();
45 native_string_attribute->AssociateWithDartWrapper(string_attribute_handle);
46
47 auto locale_attribute = std::make_shared<LocaleStringAttribute>();
48 locale_attribute->start = start;
49 locale_attribute->end = end;
50 locale_attribute->type = StringAttributeType::kLocale;
51 locale_attribute->locale = std::move(locale);
52 native_string_attribute->attribute_ = locale_attribute;
53}
static void ThrowIfUIOperationsProhibited()
glong glong end

◆ initSpellOutStringAttribute()

void flutter::NativeStringAttribute::initSpellOutStringAttribute ( Dart_Handle  string_attribute_handle,
int32_t  start,
int32_t  end 
)
static

The init method for SpellOutStringAttribute constructor.

Definition at line 23 of file string_attribute.cc.

26 {
28 auto native_string_attribute = fml::MakeRefCounted<NativeStringAttribute>();
29 native_string_attribute->AssociateWithDartWrapper(string_attribute_handle);
30
31 native_string_attribute->attribute_ =
32 std::make_shared<SpellOutStringAttribute>();
33 native_string_attribute->attribute_->start = start;
34 native_string_attribute->attribute_->end = end;
35 native_string_attribute->attribute_->type = StringAttributeType::kSpellOut;
36}

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