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

#include <embedder_resources.h>

Public Member Functions

 EmbedderResources (runtime::ResourcesEntry *resources_table)
 
int ResourceLookup (const char *path, const char **resource)
 
const char * Path (int idx)
 

Static Public Attributes

static const int kNoSuchInstance = -1
 

Detailed Description

Definition at line 22 of file embedder_resources.h.

Constructor & Destructor Documentation

◆ EmbedderResources()

flutter::EmbedderResources::EmbedderResources ( runtime::ResourcesEntry resources_table)
explicit

Definition at line 15 of file embedder_resources.cc.

16 : resources_table_(resources_table) {}

Member Function Documentation

◆ Path()

const char * flutter::EmbedderResources::Path ( int  idx)

Definition at line 32 of file embedder_resources.cc.

32 {
33 FML_DCHECK(idx >= 0);
34 ResourcesEntry* entry = At(idx);
35 if (entry == nullptr) {
36 return nullptr;
37 }
38 FML_DCHECK(entry->path_ != nullptr);
39 return entry->path_;
40}
#define FML_DCHECK(condition)
Definition logging.h:103

◆ ResourceLookup()

int flutter::EmbedderResources::ResourceLookup ( const char *  path,
const char **  resource 
)

Definition at line 20 of file embedder_resources.cc.

20 {
21 for (int i = 0; resources_table_[i].path_ != nullptr; i++) {
22 const ResourcesEntry& entry = resources_table_[i];
23 if (strcmp(path, entry.path_) == 0) {
24 *resource = entry.resource_;
25 FML_DCHECK(entry.length_ > 0);
26 return entry.length_;
27 }
28 }
29 return kNoSuchInstance;
30}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition switches.h:57

Member Data Documentation

◆ kNoSuchInstance

const int flutter::EmbedderResources::kNoSuchInstance = -1
static

Definition at line 26 of file embedder_resources.h.


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