Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
fml::SymbolMapping Class Referencefinal

#include <mapping.h>

Inheritance diagram for fml::SymbolMapping:
fml::Mapping

Public Member Functions

 SymbolMapping (fml::RefPtr< fml::NativeLibrary > native_library, const char *symbol_name)
 
 ~SymbolMapping () override
 
size_t GetSize () const override
 
const uint8_t * GetMapping () const override
 
bool IsDontNeedSafe () const override
 
- Public Member Functions inherited from fml::Mapping
 Mapping ()
 
virtual ~Mapping ()
 

Detailed Description

Definition at line 194 of file mapping.h.

Constructor & Destructor Documentation

◆ SymbolMapping()

fml::SymbolMapping::SymbolMapping ( fml::RefPtr< fml::NativeLibrary native_library,
const char *  symbol_name 
)

Definition at line 164 of file mapping.cc.

166 : native_library_(std::move(native_library)) {
167 if (native_library_ && symbol_name != nullptr) {
168 mapping_ = native_library_->ResolveSymbol(symbol_name);
169
170 if (mapping_ == nullptr) {
171 // Apparently, dart_bootstrap seems to account for the Mac behavior of
172 // requiring the underscore prefixed symbol name on non-Mac platforms as
173 // well. As a fallback, check the underscore prefixed variant of the
174 // symbol name and allow callers to not have handle this on a per platform
175 // toolchain quirk basis.
176
177 std::stringstream underscore_symbol_name;
178 underscore_symbol_name << "_" << symbol_name;
179 mapping_ =
180 native_library_->ResolveSymbol(underscore_symbol_name.str().c_str());
181 }
182 }
183}
const uint8_t * ResolveSymbol(const char *symbol)

◆ ~SymbolMapping()

fml::SymbolMapping::~SymbolMapping ( )
overridedefault

Member Function Documentation

◆ GetMapping()

const uint8_t * fml::SymbolMapping::GetMapping ( ) const
overridevirtual

Implements fml::Mapping.

Definition at line 191 of file mapping.cc.

191 {
192 return mapping_;
193}

◆ GetSize()

size_t fml::SymbolMapping::GetSize ( ) const
overridevirtual

Implements fml::Mapping.

Definition at line 187 of file mapping.cc.

187 {
188 return 0;
189}

◆ IsDontNeedSafe()

bool fml::SymbolMapping::IsDontNeedSafe ( ) const
overridevirtual

Implements fml::Mapping.

Definition at line 195 of file mapping.cc.

195 {
196 return true;
197}

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